You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by we...@apache.org on 2005/11/16 13:14:05 UTC
svn commit: r344987 -
/webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java
Author: werner
Date: Wed Nov 16 04:14:00 2005
New Revision: 344987
URL: http://svn.apache.org/viewcvs?rev=344987&view=rev
Log:
Use the provider defined/set in WSConfig to decrypt XML data.
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java?rev=344987&r1=344986&r2=344987&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java Wed Nov 16 04:14:00 2005
@@ -373,11 +373,17 @@
// initialize Cipher ....
XMLCipher xmlCipher = null;
try {
- xmlCipher = XMLCipher.getInstance(symEncAlgo);
- xmlCipher.init(XMLCipher.DECRYPT_MODE, symmetricKey);
- } catch (XMLEncryptionException e) {
- throw new WSSecurityException(WSSecurityException.UNSUPPORTED_ALGORITHM, null, null, e);
- }
+ String provider = wssConfig.getJceProviderId();
+ if (provider == null) {
+ xmlCipher = XMLCipher.getInstance(symEncAlgo);
+ } else {
+ xmlCipher = XMLCipher.getProviderInstance(symEncAlgo, provider);
+ }
+ xmlCipher.init(XMLCipher.DECRYPT_MODE, symmetricKey);
+ } catch (XMLEncryptionException e) {
+ throw new WSSecurityException(
+ WSSecurityException.UNSUPPORTED_ALGORITHM, null, null, e);
+ }
if (content) {
encBodyData = (Element) encBodyData.getParentNode();
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org