Repository: ant Updated Branches: refs/heads/master c47bf80f0 -> c11dcf20f
add support for jarsigner's -tsadigestalg to <signjar>. https://bz.apache.org/bugzilla/show_bug.cgi?id=60665 Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/c11dcf20 Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/c11dcf20 Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/c11dcf20 Branch: refs/heads/master Commit: c11dcf20fa01d13c96a4017a734488ba763cc075 Parents: c47bf80 Author: Stefan Bodewig <[email protected]> Authored: Thu Mar 16 18:03:39 2017 +0100 Committer: Stefan Bodewig <[email protected]> Committed: Thu Mar 16 18:03:39 2017 +0100 ---------------------------------------------------------------------- WHATSNEW | 3 +++ manual/Tasks/signjar.html | 5 ++++ .../org/apache/tools/ant/taskdefs/SignJar.java | 28 ++++++++++++++++++++ 3 files changed, 36 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/c11dcf20/WHATSNEW ---------------------------------------------------------------------- diff --git a/WHATSNEW b/WHATSNEW index 86504f2..3284d98 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -12,6 +12,9 @@ Other changes: compiled attribute to scriptdef. Github Pull Request #30 + * Added support for jarsigner's -tsadigestalg to <signjar>. + Bugzilla Report 60665 + Fixed bugs: ----------- http://git-wip-us.apache.org/repos/asf/ant/blob/c11dcf20/manual/Tasks/signjar.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/signjar.html b/manual/Tasks/signjar.html index 0f9d778..0ff24df 100644 --- a/manual/Tasks/signjar.html +++ b/manual/Tasks/signjar.html @@ -184,6 +184,11 @@ block</td> <td valign="top">name of digest algorithm</td> <td valign="top" align="center">No</td> </tr> + <tr> + <td valign="top">tsadigestalg</td> + <td valign="top">name of tsa digest algorithm. <em>since Ant 1.10.2</em></td> + <td valign="top" align="center">No</td> + </tr> </table> <h3>Parameters as nested elements</h3> <table border="1" cellpadding="2" cellspacing="0"> http://git-wip-us.apache.org/repos/asf/ant/blob/c11dcf20/src/main/org/apache/tools/ant/taskdefs/SignJar.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/SignJar.java b/src/main/org/apache/tools/ant/taskdefs/SignJar.java index fc31b1d..ed271d8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SignJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/SignJar.java @@ -129,6 +129,11 @@ public class SignJar extends AbstractJarSignerTask { private String digestAlg; /** + * tsa digest algorithm + */ + private String tsaDigestAlg; + + /** * error string for unit test verification: {@value} */ public static final String ERROR_TODIR_AND_SIGNEDJAR @@ -363,6 +368,24 @@ public class SignJar extends AbstractJarSignerTask { } /** + * TSA Digest Algorithm; optional + * + * @param digestAlg the tsa digest algorithm + * @since Ant 1.10.2 + */ + public void setTSADigestAlg(String digestAlg) { + this.tsaDigestAlg = digestAlg; + } + + /** + * TSA Digest Algorithm; optional + * @since Ant 1.10.2 + */ + public String getTSADigestAlg() { + return tsaDigestAlg; + } + + /** * sign the jar(s) * * @throws BuildException on errors @@ -564,6 +587,11 @@ public class SignJar extends AbstractJarSignerTask { addProxyFor(cmd, "http"); } } + + if (tsaDigestAlg != null) { + addValue(cmd, "-tsadigestalg"); + addValue(cmd, tsaDigestAlg); + } } /**
