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/02/14 12:05:30 UTC
[ws-wss4j] 02/03: Remove code to set IVParameterSpec for old
BouncyCastle versions
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
commit 50713a16dbe7e570246d8c2691757d6de4d2efe5
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Feb 14 12:04:52 2020 +0000
Remove code to set IVParameterSpec for old BouncyCastle versions
---
.../wss4j/common/crypto/WSProviderConfig.java | 29 +---------------------
1 file changed, 1 insertion(+), 28 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 8cbf6b7..139006b 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
@@ -101,16 +101,7 @@ public final class WSProviderConfig {
if (addBCProv) {
AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
public Boolean run() {
- String bcProviderStr =
- addJceProvider("BC", "org.bouncycastle.jce.provider.BouncyCastleProvider");
- // If we have BouncyCastle v1.49 installed then use IvParameterSpec in
- // Santuario. This can be removed when we pick up BouncyCastle 1.51+
- if (bcProviderStr != null) {
- Provider bcProvider = Security.getProvider(bcProviderStr);
- if (bcProvider.getVersion() < 1.50) {
- useIvParameterSpec();
- }
- }
+ addJceProvider("BC", "org.bouncycastle.jce.provider.BouncyCastleProvider");
return true;
}
});
@@ -194,24 +185,6 @@ public final class WSProviderConfig {
}
}
- private static void useIvParameterSpec() {
- try {
- // Don't override if it was set explicitly
- AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
- public Boolean run() {
- String ivParameterSpec = "org.apache.xml.security.cipher.gcm.useIvParameterSpec";
- if (System.getProperty(ivParameterSpec) == null) {
- System.setProperty(ivParameterSpec, "true");
- return false;
- }
- return true;
- }
- });
- } catch (Throwable t) { //NOPMD
- //ignore
- }
- }
-
private static void addXMLDSigRIInternal() {
Security.removeProvider("ApacheXMLDSig");
addJceProvider("ApacheXMLDSig", SantuarioUtil.getSantuarioProvider());