Author: coheigea
Date: Wed Apr  8 10:05:15 2009
New Revision: 763162

URL: http://svn.apache.org/viewvc?rev=763162&view=rev
Log:
A fix for some failing WCF interop wstrust10 tests.

Modified:
    webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties
    
webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedDataProcessor.java

Modified: webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties?rev=763162&r1=763161&r2=763162&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties 
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/errors.properties Wed 
Apr  8 10:05:15 2009
@@ -60,6 +60,7 @@
 unsupportedKeyTransp=unsupported key transport encryption algorithm: {0}
 noCipher=WSSecurityEngine: EncryptedKey does not contain 
xenc:CipherData/xenc:CipherValue
 noKeyinfo=WSSecurityEngine: EncryptedKey does not contain ds:KeyInfo
+noEncKey=WSSecurityEngine: EncryptedData does not contain xenc:EncryptedKey
 noSecTokRef=WSSecurityEngine: EncryptedKey does not contain 
ds:KeyInfo/wsse:SecurityTokenReference
 unsupportedKeyId=Unsupported key identification
 dataRef=WSSecurityEngine: DataReference - referenced data not found

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedDataProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedDataProcessor.java?rev=763162&r1=763161&r2=763162&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedDataProcessor.java
 (original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedDataProcessor.java
 Wed Apr  8 10:05:15 2009
@@ -54,11 +54,10 @@
         WSSConfig config
     ) throws WSSecurityException {
         Element kiElem = 
-            WSSecurityUtil.getDirectChildElement(elem, WSConstants.SIG_NS, 
"KeyInfo");
+            WSSecurityUtil.getDirectChildElement(elem, "KeyInfo", 
WSConstants.SIG_NS);
         if (kiElem == null) {
-            // TODO log and change alg
             throw new WSSecurityException(
-                WSSecurityException.UNSUPPORTED_ALGORITHM, "noEncAlgo"
+                WSSecurityException.UNSUPPORTED_ALGORITHM, "noKeyinfo"
             );
         }
         
@@ -67,9 +66,8 @@
                 kiElem, WSConstants.ENC_KEY_LN, WSConstants.ENC_NS
             );
         if (encryptedKeyElement == null) {
-            // TODO log and change alg
             throw new WSSecurityException(
-                WSSecurityException.UNSUPPORTED_ALGORITHM, "noEncAlgo"
+                WSSecurityException.UNSUPPORTED_ALGORITHM, "noEncKey"
             );
         }
         EncryptedKeyProcessor encrKeyProc = new EncryptedKeyProcessor();



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to