You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2017/08/10 16:08:54 UTC

svn commit: r1804685 - /webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java

Author: coheigea
Date: Thu Aug 10 16:08:54 2017
New Revision: 1804685

URL: http://svn.apache.org/viewvc?rev=1804685&view=rev
Log:
Support ECDSA keys by default for signing in SamlAssertionWrapper

Modified:
    webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java?rev=1804685&r1=1804684&r2=1804685&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java Thu Aug 10 16:08:54 2017
@@ -119,6 +119,11 @@ public class SamlAssertionWrapper {
     private final String defaultDSASignatureAlgorithm = SignatureConstants.ALGO_ID_SIGNATURE_DSA;
 
     /**
+     * Default ECDSA Signature algorithm used for signing.
+     */
+    private final String defaultECDSASignatureAlgorithm = SignatureConstants.ALGO_ID_SIGNATURE_ECDSA_SHA1;
+
+    /**
      * Default Signature Digest algorithm
      */
     private final String defaultSignatureDigestAlgorithm = SignatureConstants.ALGO_ID_DIGEST_SHA1;
@@ -524,6 +529,8 @@ public class SamlAssertionWrapper {
         }
         if (pubKeyAlgo.equalsIgnoreCase("DSA")) {
             sigAlgo = defaultDSASignatureAlgorithm;
+        } else if (pubKeyAlgo.equalsIgnoreCase("EC")) {
+            sigAlgo = defaultECDSASignatureAlgorithm;
         }
         if (LOG.isDebugEnabled()) {
             LOG.debug("Using Signature algorithm " + sigAlgo);