|
@@ -109,6 +109,16 @@ public class SignJar extends AbstractJarSignerTask { |
|
|
*/ |
|
|
*/ |
|
|
private boolean force = false; |
|
|
private boolean force = false; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* signature algorithm |
|
|
|
|
|
*/ |
|
|
|
|
|
private String sigAlg; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* digest algorithm |
|
|
|
|
|
*/ |
|
|
|
|
|
private String digestAlg; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* error string for unit test verification: {@value} |
|
|
* error string for unit test verification: {@value} |
|
|
*/ |
|
|
*/ |
|
@@ -275,6 +285,38 @@ public class SignJar extends AbstractJarSignerTask { |
|
|
return force; |
|
|
return force; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Signature Algorithm; optional |
|
|
|
|
|
* |
|
|
|
|
|
* @param sigAlg the signature algorithm |
|
|
|
|
|
*/ |
|
|
|
|
|
public void setSigAlg(String sigAlg) { |
|
|
|
|
|
this.sigAlg = sigAlg; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Signature Algorithm; optional |
|
|
|
|
|
*/ |
|
|
|
|
|
public String getSigAlg() { |
|
|
|
|
|
return sigAlg; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Digest Algorithm; optional |
|
|
|
|
|
* |
|
|
|
|
|
* @param digestAlg the digest algorithm |
|
|
|
|
|
*/ |
|
|
|
|
|
public void setDigestAlg(String digestAlg) { |
|
|
|
|
|
this.digestAlg = digestAlg; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Digest Algorithm; optional |
|
|
|
|
|
*/ |
|
|
|
|
|
public String getDigestAlg() { |
|
|
|
|
|
return digestAlg; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* sign the jar(s) |
|
|
* sign the jar(s) |
|
|
* |
|
|
* |
|
@@ -420,6 +462,16 @@ public class SignJar extends AbstractJarSignerTask { |
|
|
addValue(cmd, "-sectionsonly"); |
|
|
addValue(cmd, "-sectionsonly"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (sigAlg != null) { |
|
|
|
|
|
addValue(cmd, "-sigalg"); |
|
|
|
|
|
addValue(cmd, sigAlg); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (digestAlg != null) { |
|
|
|
|
|
addValue(cmd, "-digestalg"); |
|
|
|
|
|
addValue(cmd, digestAlg); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//add -tsa operations if declared |
|
|
//add -tsa operations if declared |
|
|
addTimestampAuthorityCommands(cmd); |
|
|
addTimestampAuthorityCommands(cmd); |
|
|
|
|
|
|
|
|