cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r698262 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security: SecurityConstants.java wss4j/policyhandlers/BindingBuilder.java
Date Tue, 23 Sep 2008 17:57:25 GMT
Author: dkulp
Date: Tue Sep 23 10:57:25 2008
New Revision: 698262

URL: http://svn.apache.org/viewvc?rev=698262&view=rev
Log:
Allow the "Crypto" objects to be passed in (from config or from programatic setting or maybe
another interceptor).

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/BindingBuilder.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java?rev=698262&r1=698261&r2=698262&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
Tue Sep 23 10:57:25 2008
@@ -31,6 +31,9 @@
     public static final String ENCRYPT_USERNAME = "ws-security.encryption.username";
     public static final String ENCRYPT_PROPERTIES = "ws-security.encryption.properties";
     
+    public static final String SIGNATURE_CRYPTO = "ws-security.signature.crypto";
+    public static final String ENCRYPT_CRYPTO = "ws-security.encryption.crypto";
+    
     private SecurityConstants() {
         //utility class
     }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/BindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/BindingBuilder.java?rev=698262&r1=698261&r2=698262&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/BindingBuilder.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/BindingBuilder.java
Tue Sep 23 10:57:25 2008
@@ -614,6 +614,14 @@
         return getCrypto(wrapper, false);
     }
     public Crypto getCrypto(TokenWrapper wrapper, boolean sign) {
+        Crypto crypto = (Crypto)message.getContextualProperty(sign 
+                                                      ? SecurityConstants.SIGNATURE_CRYPTO

+                                                      : SecurityConstants.ENCRYPT_CRYPTO);
+        if (crypto != null) {
+            return crypto;
+        }
+        
+        
         Object o = message.getContextualProperty(sign 
                                                  ? SecurityConstants.SIGNATURE_PROPERTIES

                                                  : SecurityConstants.ENCRYPT_PROPERTIES);



Mime
View raw message