diff --git a/WHATSNEW b/WHATSNEW index 9d96ca56d..608527474 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -24,6 +24,10 @@ Other changes: * the selector has a new built-in algorithm 'lastmodified' 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 ===================================== diff --git a/manual/Tasks/signjar.html b/manual/Tasks/signjar.html index 32315c158..f6a7a376a 100644 --- a/manual/Tasks/signjar.html +++ b/manual/Tasks/signjar.html @@ -186,6 +186,29 @@ block name of digest algorithm No + + providername + name of a cryptographic service provider's name + when listed in the security properties file. + since Ant 1.9.14. + No + + + providerclass + name of a cryptographic service provider's master + class file when the service provider is not listed in the security + properties file. + since Ant 1.9.14. + No + + + providerarg + Represents an optional string input argument for + the constructor of provider_class_name. Ignored + if providerclass is not set. + since Ant 1.9.14. + No +

Parameters as nested elements

diff --git a/manual/Tasks/verifyjar.html b/manual/Tasks/verifyjar.html index 886075a79..bf442b728 100644 --- a/manual/Tasks/verifyjar.html +++ b/manual/Tasks/verifyjar.html @@ -105,6 +105,29 @@ supported since Ant 1.8.0. + + + + + + + + + + + + + + +
No
providernamename of a cryptographic service provider's name + when listed in the security properties file. + since Ant 1.9.14.No
providerclassname of a cryptographic service provider's master + class file when the service provider is not listed in the security + properties file. + since Ant 1.9.14.No
providerargRepresents an optional string input argument for + the constructor of provider_class_name. Ignored + if providerclass is not set. + since Ant 1.9.14.No

Parameters as nested elements

diff --git a/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java b/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java index b2fe8d441..b15d2bc9f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java @@ -116,6 +116,13 @@ public abstract class AbstractJarSignerTask extends Task { */ 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 * @@ -230,6 +237,39 @@ public abstract class AbstractJarSignerTask extends Task { 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) */ @@ -347,6 +387,20 @@ public abstract class AbstractJarSignerTask extends Task { 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"); + } } /**