| |
|
| org.apache.tools.ant.taskdefs.AbstractJarSignerTask org.apache.tools.ant.taskdefs.SignJar
SignJar | public class SignJar extends AbstractJarSignerTask (Code) | | Signs JAR or ZIP files with the javasign command line tool. The tool detailed
dependency checking: files are only signed if they are not signed. The
signjar attribute can point to the file to generate; if this file
exists then its modification date is used as a cue as to whether to resign
any JAR file.
Timestamp driven signing is based on the unstable and inadequately documented
information in the Java1.5 docs
See Also:
* beta documentation since: Ant 1.1 |
ERROR_BAD_MAP | final public static String ERROR_BAD_MAP(Code) | | error string for unit test verification:
|
ERROR_MAPPER_WITHOUT_DEST | final public static String ERROR_MAPPER_WITHOUT_DEST(Code) | | error string for unit test verification:
|
ERROR_NO_ALIAS | final public static String ERROR_NO_ALIAS(Code) | | error string for unit test verification:
|
ERROR_NO_STOREPASS | final public static String ERROR_NO_STOREPASS(Code) | | error string for unit test verification:
|
ERROR_SIGNEDJAR_AND_PATHS | final public static String ERROR_SIGNEDJAR_AND_PATHS(Code) | | error string for unit test verification
|
ERROR_TODIR_AND_SIGNEDJAR | final public static String ERROR_TODIR_AND_SIGNEDJAR(Code) | | error string for unit test verification:
|
ERROR_TOO_MANY_MAPPERS | final public static String ERROR_TOO_MANY_MAPPERS(Code) | | error string for unit test verification:
|
destDir | protected File destDir(Code) | | the output directory when using paths.
|
internalsf | protected boolean internalsf(Code) | | flag for internal sf signing
|
lazy | protected boolean lazy(Code) | | Whether to assume a jar which has an appropriate .SF file in is already
signed.
|
sectionsonly | protected boolean sectionsonly(Code) | | sign sections only?
|
sigfile | protected String sigfile(Code) | | name to a signature file
|
signedjar | protected File signedjar(Code) | | name of a single jar
|
tsacert | protected String tsacert(Code) | | alias for the TSA in the keystore
|
tsaurl | protected String tsaurl(Code) | | URL for a tsa; null implies no tsa support
|
add | public void add(FileNameMapper newMapper)(Code) | | add a mapper to determine file naming policy. Only used with toDir
processing.
Parameters: newMapper - the mapper to add. since: Ant 1.7 |
getMapper | public FileNameMapper getMapper()(Code) | | get the active mapper; may be null
mapper or null since: Ant 1.7 |
getTsacert | public String getTsacert()(Code) | | get the -tsacert option
since: Ant 1.7 a certificate alias or null |
getTsaurl | public String getTsaurl()(Code) | | get the -tsaurl url
url or null since: Ant 1.7 |
isSigned | protected boolean isSigned(File file)(Code) | | test for a file being signed, by looking for a signature in the META-INF
directory with our alias.
Parameters: file - the file to be checked true if the file is signed See Also: IsSigned.isSigned(FileString) |
isUpToDate | protected boolean isUpToDate(File jarFile, File signedjarFile)(Code) | | Compare a jar file with its corresponding signed jar. The logic for this
is complex, and best explained in the source itself. Essentially if
either file doesnt exist, or the destfile has an out of date timestamp,
then the return value is false.
If we are signing ourself, the check
SignJar.isSigned(File) is used to
trigger the process.
Parameters: jarFile - the unsigned jar file Parameters: signedjarFile - the result signed jar file true if the signedjarFile is considered up to date |
setDestDir | public void setDestDir(File destDir)(Code) | | Optionally sets the output directory to be used.
Parameters: destDir - the directory in which to place signed jars since: Ant 1.7 |
setInternalsf | public void setInternalsf(boolean internalsf)(Code) | | Flag to include the .SF file inside the signature; optional; default
false
Parameters: internalsf - if true include the .SF file inside the signature |
setLazy | public void setLazy(boolean lazy)(Code) | | flag to control whether the presence of a signature file means a JAR is
signed; optional, default false
Parameters: lazy - flag to control whether the presence of a signature |
setPreserveLastModified | public void setPreserveLastModified(boolean preserveLastModified)(Code) | | true to indicate that the signed jar modification date remains the same
as the original. Defaults to false
Parameters: preserveLastModified - if true preserve the last modified time |
setSectionsonly | public void setSectionsonly(boolean sectionsonly)(Code) | | flag to compute hash of entire manifest; optional, default false
Parameters: sectionsonly - flag to compute hash of entire manifest |
setSigfile | public void setSigfile(String sigfile)(Code) | | name of .SF/.DSA file; optional
Parameters: sigfile - the name of the .SF/.DSA file |
setSignedjar | public void setSignedjar(File signedjar)(Code) | | name of signed JAR file; optional
Parameters: signedjar - the name of the signed jar file |
setTsacert | public void setTsacert(String tsacert)(Code) | | set the alias in the keystore of the TSA to use;
Parameters: tsacert - the cert alias. |
setTsaurl | public void setTsaurl(String tsaurl)(Code) | | Parameters: tsaurl - the tsa url. since: Ant 1.7 |
|
|
|