You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by co...@apache.org on 2009/04/09 15:31:19 UTC
svn commit: r763644 -
/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/WSSConfig.java
Author: coheigea
Date: Thu Apr 9 13:31:19 2009
New Revision: 763644
URL: http://svn.apache.org/viewvc?rev=763644&view=rev
Log:
[WSS-99] - Backmerged fix from trunk.
Modified:
webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/WSSConfig.java
Modified: webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/WSSConfig.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/WSSConfig.java?rev=763644&r1=763643&r2=763644&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/WSSConfig.java (original)
+++ webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/WSSConfig.java Thu Apr 9 13:31:19 2009
@@ -525,10 +525,31 @@
try {
if (java.security.Security.getProvider(id) == null) {
Class c = Loader.loadClass(className, false);
- int ret =
+ java.security.Provider[] provs =
+ java.security.Security.getProviders();
+ //
+ // Install the provider after the SUN provider (see WSS-99)
+ // Otherwise fall back to the old behaviour of inserting
+ // the provider in position 2. For AIX, install it after
+ // the IBMJCE provider.
+ //
+ int ret = 0;
+ for (int i = 0; i < provs.length; i++) {
+ if ("SUN".equals(provs[i].getName())
+ || "IBMJCE".equals(provs[i].getName())) {
+ ret =
+ java.security.Security.insertProviderAt(
+ (java.security.Provider) c.newInstance(), i + 2
+ );
+ break;
+ }
+ }
+ if (ret == 0) {
+ ret =
java.security.Security.insertProviderAt(
(java.security.Provider) c.newInstance(), 2
);
+ }
if (log.isDebugEnabled()) {
log.debug("The provider " + id + " was added at position: " + ret);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org