ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1547345 - in /webservices/wss4j/trunk: ws-security-common/src/main/java/org/apache/wss4j/common/saml/ ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/
Date Tue, 03 Dec 2013 11:35:24 GMT
Author: coheigea
Date: Tue Dec  3 11:35:24 2013
New Revision: 1547345

URL: http://svn.apache.org/r1547345
Log:
Make sure we can process a SAML Signature KeyInfo which uses a SecurityTokenReference

Modified:
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SAMLTokenProcessor.java

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java?rev=1547345&r1=1547344&r2=1547345&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java
(original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SAMLUtil.java
Tue Dec  3 11:35:24 2013
@@ -233,21 +233,6 @@ public final class SAMLUtil {
             }
         }
         
-        return getCredentialDirectlyFromKeyInfo(keyInfoElement, sigCrypto);
-    }
-    
-    /**
-     * This method returns a SAMLKeyInfo corresponding to the credential found in the
-     * KeyInfo (DOM Element) argument.
-     * @param keyInfoElement The KeyInfo as a DOM Element
-     * @param sigCrypto A Crypto instance
-     * @return The credential (as a SAMLKeyInfo object)
-     * @throws WSSecurityException
-     */
-    public static SAMLKeyInfo getCredentialDirectlyFromKeyInfo(
-        Element keyInfoElement,
-        Crypto sigCrypto
-    ) throws WSSecurityException {
         //
         // Next marshal the KeyInfo DOM element into a javax KeyInfo object and get the
         // (public key) credential

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java?rev=1547345&r1=1547344&r2=1547345&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
(original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
Tue Dec  3 11:35:24 2013
@@ -549,7 +549,7 @@ public class SamlAssertionWrapper {
                 );
             }
             SAMLKeyInfo samlKeyInfo = 
-                SAMLUtil.getCredentialDirectlyFromKeyInfo(keyInfo.getDOM(), sigCrypto);
+                SAMLUtil.getCredentialFromKeyInfo(keyInfo.getDOM(), keyInfoProcessor, sigCrypto);
             verifySignature(samlKeyInfo);
         } else {
             LOG.debug("SamlAssertionWrapper: no signature to validate");

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SAMLTokenProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SAMLTokenProcessor.java?rev=1547345&r1=1547344&r2=1547345&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SAMLTokenProcessor.java
(original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SAMLTokenProcessor.java
Tue Dec  3 11:35:24 2013
@@ -144,8 +144,8 @@ public class SAMLTokenProcessor implemen
                 );
             }
             SAMLKeyInfo samlKeyInfo = 
-                SAMLUtil.getCredentialDirectlyFromKeyInfo(
-                    keyInfo.getDOM(), data.getSigVerCrypto()
+                SAMLUtil.getCredentialFromKeyInfo(
+                    keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(data, docInfo), data.getSigVerCrypto()
                 );
             
             if (algorithmSuite != null) {



Mime
View raw message