Author: coheigea
Date: Mon Apr 6 14:06:25 2009
New Revision: 762347
URL: http://svn.apache.org/viewvc?rev=762347&view=rev
Log:
[WSS-99] - Adding BouncyCastle provider using addProvider rather than
insertProviderAt(..., 2)
- The previous way of doing things where BouncyCastle was added as the second
provider was preventing WSS4J being used out of the box on Solaris and AIX.
- Also removed JuiCE provider.
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java?rev=762347&r1=762346&r2=762347&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSSConfig.java Mon Apr
6 14:06:25 2009
@@ -264,12 +264,7 @@
if (!staticallyInitialized) {
org.apache.xml.security.Init.init();
if (addJceProviders) {
- /*
- * The last provider added has precedence, that is if JuiCE
can be added
- * then WSS4J uses this provider.
- */
addJceProvider("BC",
"org.bouncycastle.jce.provider.BouncyCastleProvider");
- addJceProvider("JuiCE",
"org.apache.security.juice.provider.JuiCEProviderOpenSSL");
}
Transform.init();
try {
@@ -526,9 +521,9 @@
if (java.security.Security.getProvider(id) == null) {
Class c = Loader.loadClass(className, false);
int ret =
- java.security.Security.insertProviderAt(
- (java.security.Provider) c.newInstance(), 2
- );
+ java.security.Security.addProvider(
+ (java.security.Provider) c.newInstance()
+ );
if (log.isDebugEnabled()) {
log.debug("The provider " + id + " was added at position:
" + ret);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]