@@ -24,6 +24,10 @@ Other changes: | |||||
* the <modified> selector has a new built-in algorithm 'lastmodified' | * the <modified> selector has a new built-in algorithm 'lastmodified' | ||||
which computes a value based upon the lastmodified time of the file. | which computes a value based upon the lastmodified time of the file. | ||||
* signjar and verifyjar now support the -providerName, -providerClass | |||||
and -providerArg command line options of keytool via new attributes. | |||||
Bugzilla Report 65234 | |||||
Changes from Ant 1.9.12 TO Ant 1.9.13 | Changes from Ant 1.9.12 TO Ant 1.9.13 | ||||
===================================== | ===================================== | ||||
@@ -186,6 +186,29 @@ block</td> | |||||
<td valign="top">name of digest algorithm</td> | <td valign="top">name of digest algorithm</td> | ||||
<td valign="top" align="center">No</td> | <td valign="top" align="center">No</td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td valign="top">providername</td> | |||||
<td valign="top">name of a cryptographic service provider's name | |||||
when listed in the security properties file. | |||||
<em>since Ant 1.9.14</em>.</td> | |||||
<td valign="top" align="center">No</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">providerclass</td> | |||||
<td valign="top">name of a cryptographic service provider's master | |||||
class file when the service provider is not listed in the security | |||||
properties file. | |||||
<em>since Ant 1.9.14</em>.</td> | |||||
<td valign="top" align="center">No</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">providerarg</td> | |||||
<td valign="top">Represents an optional string input argument for | |||||
the constructor of provider_class_name. Ignored | |||||
if <code>providerclass</code> is not set. | |||||
<em>since Ant 1.9.14</em>.</td> | |||||
<td valign="top" align="center">No</td> | |||||
</tr> | |||||
</table> | </table> | ||||
<h3>Parameters as nested elements</h3> | <h3>Parameters as nested elements</h3> | ||||
<table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
@@ -105,6 +105,29 @@ supported | |||||
<em>since Ant 1.8.0</em>.</td> | <em>since Ant 1.8.0</em>.</td> | ||||
<td align="center" valign="top">No</td> | <td align="center" valign="top">No</td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td valign="top">providername</td> | |||||
<td valign="top">name of a cryptographic service provider's name | |||||
when listed in the security properties file. | |||||
<em>since Ant 1.9.14</em>.</td> | |||||
<td valign="top" align="center">No</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">providerclass</td> | |||||
<td valign="top">name of a cryptographic service provider's master | |||||
class file when the service provider is not listed in the security | |||||
properties file. | |||||
<em>since Ant 1.9.14</em>.</td> | |||||
<td valign="top" align="center">No</td> | |||||
</tr> | |||||
<tr> | |||||
<td valign="top">providerarg</td> | |||||
<td valign="top">Represents an optional string input argument for | |||||
the constructor of provider_class_name. Ignored | |||||
if <code>providerclass</code> is not set. | |||||
<em>since Ant 1.9.14</em>.</td> | |||||
<td valign="top" align="center">No</td> | |||||
</tr> | |||||
</table> | </table> | ||||
<h3>Parameters as nested elements</h3> | <h3>Parameters as nested elements</h3> | ||||
<table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
@@ -116,6 +116,13 @@ public abstract class AbstractJarSignerTask extends Task { | |||||
*/ | */ | ||||
private String executable; | private String executable; | ||||
/** | |||||
* Values for the providerName, providerClass, and providerArg options. | |||||
* | |||||
* @since Ant 1.9.14 | |||||
*/ | |||||
private String providerName, providerClass, providerArg; | |||||
/** | /** | ||||
* Set the maximum memory to be used by the jarsigner process | * Set the maximum memory to be used by the jarsigner process | ||||
* | * | ||||
@@ -230,6 +237,39 @@ public abstract class AbstractJarSignerTask extends Task { | |||||
return path.createPath(); | return path.createPath(); | ||||
} | } | ||||
/** | |||||
* Sets the value for the -providerName command line argument. | |||||
* | |||||
* @param providerName the value for the -providerName command line argument | |||||
* | |||||
* @since Ant 1.9.14 | |||||
*/ | |||||
public void setProviderName(String providerName) { | |||||
this.providerName = providerName; | |||||
} | |||||
/** | |||||
* Sets the value for the -providerClass command line argument. | |||||
* | |||||
* @param providerClass the value for the -providerClass command line argument | |||||
* | |||||
* @since Ant 1.9.14 | |||||
*/ | |||||
public void setProviderClass(String providerClass) { | |||||
this.providerClass = providerClass; | |||||
} | |||||
/** | |||||
* Sets the value for the -providerArg command line argument. | |||||
* | |||||
* @param providerArg the value for the -providerArg command line argument | |||||
* | |||||
* @since Ant 1.9.14 | |||||
*/ | |||||
public void setProviderArg(String providerArg) { | |||||
this.providerArg = providerArg; | |||||
} | |||||
/** | /** | ||||
* init processing logic; this is retained through our execution(s) | * init processing logic; this is retained through our execution(s) | ||||
*/ | */ | ||||
@@ -347,6 +387,20 @@ public abstract class AbstractJarSignerTask extends Task { | |||||
addValue(cmd, "-storetype"); | addValue(cmd, "-storetype"); | ||||
addValue(cmd, storetype); | addValue(cmd, storetype); | ||||
} | } | ||||
if (null != providerName) { | |||||
addValue(cmd, "-providerName"); | |||||
addValue(cmd, providerName); | |||||
} | |||||
if (null != providerClass) { | |||||
addValue(cmd, "-providerClass"); | |||||
addValue(cmd, providerClass); | |||||
if (null != providerArg) { | |||||
addValue(cmd, "-providerArg"); | |||||
addValue(cmd, providerArg); | |||||
} | |||||
} else if (null != providerArg) { | |||||
log("Ignoring providerArg as providerClass has not been set"); | |||||
} | |||||
} | } | ||||
/** | /** | ||||