ant/docs/manual/CoreTasks/signjar.html
Matthew Jason Benson c9028f9f98 Tighten security by sending storepass and keypass to signjar
via the input stream of the forked process.

Also, create signjar's helper ExecTask instance directly rather than by
typedef discovery mechanisms.
PR: 33433


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277629 13f79535-47bb-0310-9956-ffa450edef68
2005-02-10 22:43:27 +00:00

130 lines
4.0 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>SignJar Task</title>
</head>
<body>
<h2><a name="signjar">SignJar</a></h2>
<h3>Description</h3>
<p>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 <tt>signjar</tt> 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.
</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">jar</td>
<td valign="top">the jar file to sign</td>
<td valign="top" align="center">Yes, unless nested filesets have
been used.</td>
</tr>
<tr>
<td valign="top">alias</td>
<td valign="top">the alias to sign under</td>
<td valign="top" align="center">Yes.</td>
</tr>
<tr>
<td valign="top">storepass</td>
<td valign="top">password for keystore integrity.</td>
<td valign="top" align="center">Yes.</td>
</tr>
<tr>
<td valign="top">keystore</td>
<td valign="top">keystore location</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">storetype</td>
<td valign="top">keystore type</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">keypass</td>
<td valign="top">password for private key (if different)</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">sigfile</td>
<td valign="top">name of .SF/.DSA file</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">signedjar</td>
<td valign="top">name of signed JAR file</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">verbose</td>
<td valign="top">(true | false) verbose output when signing</td>
<td valign="top" align="center">No; default false</td>
</tr>
<tr>
<td valign="top">internalsf</td>
<td valign="top">(true | false) include the .SF file inside the signature
block</td>
<td valign="top" align="center">No; default false</td>
</tr>
<tr>
<td valign="top">sectionsonly</td>
<td valign="top">(true | false) don't compute hash of entire manifest</td>
<td valign="top" align="center">No; default false</td>
</tr>
<tr>
<td valign="top">lazy</td>
<td valign="top">flag to control whether the presence of a signature
file means a JAR is signed</td>
<td valign="top" align="center">No; default false</td>
</tr>
<tr>
<td valign="top">maxmemory</td>
<td valign="top">Specifies the maximum memory the jarsigner VM will use. Specified in the
style of standard java memory specs (e.g. 128m = 128 MBytes)</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">preservelastmodified</td>
<td valign="top">Give the signed file the same last modified
time as the original jar file.</td>
<td valign="top" align="center">No; default false.</td>
</tr>
</table>
<h3>Parameters as nested elements</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">fileset</td>
<td valign="top">fileset of JAR files to sign. Will be ignored if
the jar attribute of the task has been set.</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Examples</h3>
<blockquote>
<p><code>&lt;signjar jar=&quot;${dist}/lib/ant.jar&quot;
alias=&quot;apache-group&quot; storepass=&quot;secret&quot;/&gt;</code></p>
</blockquote>
<p>signs the ant.jar with alias &quot;apache-group&quot; accessing the
keystore and private key via &quot;secret&quot; password.</p>
<hr>
<p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. All rights
Reserved.</p>
</body>
</html>