Browse Source

add support for jarsigner's -tsadigestalg to <signjar>.

https://bz.apache.org/bugzilla/show_bug.cgi?id=60665
master
Stefan Bodewig 8 years ago
parent
commit
c11dcf20fa
3 changed files with 36 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +5
    -0
      manual/Tasks/signjar.html
  3. +28
    -0
      src/main/org/apache/tools/ant/taskdefs/SignJar.java

+ 3
- 0
WHATSNEW View File

@@ -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:
-----------



+ 5
- 0
manual/Tasks/signjar.html View File

@@ -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">


+ 28
- 0
src/main/org/apache/tools/ant/taskdefs/SignJar.java View File

@@ -128,6 +128,11 @@ public class SignJar extends AbstractJarSignerTask {
*/
private String digestAlg;

/**
* tsa digest algorithm
*/
private String tsaDigestAlg;

/**
* error string for unit test verification: {@value}
*/
@@ -362,6 +367,24 @@ public class SignJar extends AbstractJarSignerTask {
return digestAlg;
}

/**
* 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)
*
@@ -564,6 +587,11 @@ public class SignJar extends AbstractJarSignerTask {
addProxyFor(cmd, "http");
}
}

if (tsaDigestAlg != null) {
addValue(cmd, "-tsadigestalg");
addValue(cmd, tsaDigestAlg);
}
}

/**


Loading…
Cancel
Save