Author: coheigea Date: Fri Jan 4 11:51:21 2013 New Revision: 1428813 URL: http://svn.apache.org/viewvc?rev=1428813&view=rev Log: Merged revisions 1428803 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1428803 | coheigea | 2013-01-04 11:45:39 +0000 (Fri, 04 Jan 2013) | 10 lines Merged revisions 1428795 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1428795 | coheigea | 2013-01-04 11:28:22 +0000 (Fri, 04 Jan 2013) | 2 lines Some minor WS-Security changes ........ ........ Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java?rev=1428813&r1=1428812&r2=1428813&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java (original) +++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java Fri Jan 4 11:51:21 2013 @@ -59,7 +59,6 @@ public abstract class AbstractWSS4JInter } private Map<String, Object> properties = new ConcurrentHashMap<String, Object>(); - private Map<String, Crypto> cryptoMap = new ConcurrentHashMap<String, Crypto>(); private Set<String> before = new HashSet<String>(); private Set<String> after = new HashSet<String>(); private String phase; @@ -218,48 +217,4 @@ public abstract class AbstractWSS4JInter } } - // TODO Remove once we pick up WSS4J 1.6.8 - @Override - protected Crypto loadCrypto( - String cryptoPropertyFile, - String cryptoPropertyRefId, - RequestData requestData - ) throws WSSecurityException { - Object mc = requestData.getMsgContext(); - Crypto crypto = null; - - // - // Try the Property Ref Id first - // - String refId = getString(cryptoPropertyRefId, mc); - if (refId != null) { - crypto = cryptoMap.get(refId); - if (crypto == null) { - Object obj = getProperty(mc, refId); - if (obj instanceof Properties) { - crypto = CryptoFactory.getInstance((Properties)obj); - cryptoMap.put(refId, crypto); - } else if (obj instanceof Crypto) { - crypto = (Crypto)obj; - cryptoMap.put(refId, crypto); - } - } - } - - // - // Now try loading the properties file - // - if (crypto == null) { - String propFile = getString(cryptoPropertyFile, mc); - if (propFile != null) { - crypto = cryptoMap.get(propFile); - if (crypto == null) { - crypto = loadCryptoFromPropertiesFile(propFile, requestData); - cryptoMap.put(propFile, crypto); - } - } - } - return crypto; - } - } Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1428813&r1=1428812&r2=1428813&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java (original) +++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java Fri Jan 4 11:51:21 2013 @@ -161,12 +161,13 @@ public abstract class AbstractBindingBui protected List<byte[]> signatures = new ArrayList<byte[]>(); - Element lastSupportingTokenElement; - Element lastEncryptedKeyElement; - Element lastDerivedKeyElement; - Element bottomUpElement; - Element topDownElement; - Element bstElement; + protected Element bottomUpElement; + protected Element topDownElement; + protected Element bstElement; + + private Element lastSupportingTokenElement; + private Element lastEncryptedKeyElement; + private Element lastDerivedKeyElement; public AbstractBindingBuilder( WSSConfig config, @@ -390,7 +391,6 @@ public abstract class AbstractBindingBui ttl = 300; } timestampEl = new WSSecTimestamp(wssConfig); - timestampEl.setWsConfig(wssConfig); timestampEl.setTimeToLive(ttl); timestampEl.prepare(saaj.getSOAPPart()); for (AssertionInfo ai : ais) { Modified: cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java?rev=1428813&r1=1428812&r2=1428813&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java (original) +++ cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java Fri Jan 4 11:51:21 2013 @@ -733,7 +733,6 @@ public class SymmetricBindingHandler ext return doSignatureDK(sigs, policyTokenWrapper, policyToken, tok, included); } else { WSSecSignature sig = new WSSecSignature(wssConfig); - sig.setWsConfig(wssConfig); // If a EncryptedKeyToken is used, set the correct value type to // be used in the wsse:Reference in ds:KeyInfo int type = included ? WSConstants.CUSTOM_SYMM_SIGNING
