[xmlsectool] branch master updated: XSTJ-55 - remove ineffective --signatureRequired option

Ian Young ian at iay.org.uk
Sat May 14 12:17:14 EDT 2016


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch master
in repository xmlsectool.

The following commit(s) were added to refs/heads/master by this push:
       new  0a6c48b   XSTJ-55 - remove ineffective --signatureRequired option
0a6c48b is described below

commit 0a6c48b6fe6eb3846948c47657116912aebd3c65
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Sat May 14 17:17:08 2016 +0100

    XSTJ-55 - remove ineffective --signatureRequired option
---
 .../java/net/shibboleth/tool/xmlsectool/XmlSecTool.java     |  9 ++-------
 .../tool/xmlsectool/XmlSecToolCommandLineArguments.java     | 13 -------------
 2 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecTool.java b/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecTool.java
index f0f400f..61cc36b 100644
--- a/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecTool.java
+++ b/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecTool.java
@@ -644,13 +644,8 @@ public final class XmlSecTool {
             final Document xmlDocument) {
         final Element signatureElement = getSignatureElement(xmlDocument);
         if (signatureElement == null) {
-            if (cli.isSignatureRequired()) {
-                log.error("Signature required but XML document is not signed");
-                throw new Terminator(ReturnCode.RC_SIG);
-            } else {
-                log.info("XML document is not signed, no verification performed");
-                return;
-            }
+            log.error("Signature required but XML document is not signed");
+            throw new Terminator(ReturnCode.RC_SIG);
         }
         log.debug("XML document contained Signature element\n{}", SerializeSupport.prettyPrintXML(signatureElement));
 
diff --git a/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecToolCommandLineArguments.java b/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecToolCommandLineArguments.java
index 66f440e..7ee7c4c 100644
--- a/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecToolCommandLineArguments.java
+++ b/src/main/java/net/shibboleth/tool/xmlsectool/XmlSecToolCommandLineArguments.java
@@ -60,7 +60,6 @@ public class XmlSecToolCommandLineArguments {
     private static final String SIGNATURE_ALGORITHM_ARG = "signatureAlgorithm";
     private static final String KI_KEY_NAME_ARG = "keyInfoKeyName";
     private static final String KI_CRL_ARG = "keyInfoCRL";
-    private static final String SIG_REQUIRED_ARG = "signatureRequired";
     private static final String CERT_ARG = "certificate";
     private static final String KEY_ARG = "key";
     private static final String KEY_PASSWORD_ARG = "keyPassword";
@@ -129,9 +128,6 @@ public class XmlSecToolCommandLineArguments {
     private boolean rngSchema;
 
     // Signature
-    @Parameter(names = OPT + SIG_REQUIRED_ARG)
-    private boolean signatureRequired = true;
-
     @Parameter(names = OPT + SIG_REF_ID_ATT_ARG)
     private String refIdAttributeName;
 
@@ -321,10 +317,6 @@ public class XmlSecToolCommandLineArguments {
         return signatureVerify;
     }
 
-    public boolean isSignatureRequired() {
-        return signatureRequired;
-    }
-
     public String getReferenceIdAttributeName() {
         return refIdAttributeName;
     }
@@ -646,11 +638,6 @@ public class XmlSecToolCommandLineArguments {
                         + "Option may be used more than once."));
 
         out.println();
-        out.println("Signature Verification Options");
-        out.println(String.format("  --%-20s %s", SIG_REQUIRED_ARG,
-                "Treat unsigned documents as an error.  (default: true)"));
-
-        out.println();
         out.println("PEM/DER Encoded Certificate/Key Options - "
                 + "these options are mutually exclusive with the Keystore and PKCS#11 options. "
                 + "The '" + CERT_ARG + "' option is required for signature verification. "

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list