You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2020/01/21 16:33:27 UTC
[ws-wss4j] branch master updated: WSS-661 - Change BouncyCastle
provider registering
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git
The following commit(s) were added to refs/heads/master by this push:
new e5436f0 WSS-661 - Change BouncyCastle provider registering
e5436f0 is described below
commit e5436f0192c421b00ce7b3b1004439e28f29ff74
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Jan 21 16:30:43 2020 +0000
WSS-661 - Change BouncyCastle provider registering
---
.../apache/wss4j/common/crypto/WSProviderConfig.java | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/WSProviderConfig.java b/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/WSProviderConfig.java
index 117c1a1..8cbf6b7 100644
--- a/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/WSProviderConfig.java
+++ b/ws-security-common/src/main/java/org/apache/wss4j/common/crypto/WSProviderConfig.java
@@ -271,24 +271,7 @@ public final class WSProviderConfig {
Provider currentProvider = Security.getProvider(name);
if (currentProvider == null) {
try {
- //
- // 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;
- Provider[] provs = Security.getProviders();
- for (int i = 0; i < provs.length; i++) {
- if ("SUN".equals(provs[i].getName())
- || "IBMJCE".equals(provs[i].getName())) {
- ret = Security.insertProviderAt(provider, i + 2);
- break;
- }
- }
- if (ret == 0) {
- ret = Security.insertProviderAt(provider, 2);
- }
+ int ret = Security.addProvider(provider);
if (LOG.isDebugEnabled()) {
LOG.debug(
"The provider " + provider.getName() + " - "