diff options
Diffstat (limited to 'id/server/stork2-saml-engine')
3 files changed, 41 insertions, 36 deletions
diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml index 8e249bb1a..b9620a782 100644 --- a/id/server/stork2-saml-engine/pom.xml +++ b/id/server/stork2-saml-engine/pom.xml @@ -49,6 +49,12 @@ <groupId>eu.stork</groupId>
<artifactId>Commons</artifactId>
<version>${commons.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk16</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java index 6d9ac9ce3..06e80dc14 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java @@ -41,7 +41,6 @@ import eu.stork.peps.auth.engine.X509PrincipalUtil; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.NotImplementedException; import org.bouncycastle.jce.X509Principal; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.opensaml.Configuration; import org.opensaml.common.SAMLObject; import org.opensaml.common.SignableSAMLObject; @@ -518,23 +517,23 @@ public final class SignP12 implements SAMLEngineSignI { FileInputStream fisTrustStore = null; try { - // Dynamically register Bouncy Castle provider. - boolean found = false; - // Check if BouncyCastle is already registered as a provider - final Provider[] providers = Security.getProviders(); - for (int i = 0; i < providers.length; i++) { - if (providers[i].getName().equals( - BouncyCastleProvider.PROVIDER_NAME)) { - found = true; - } - } - - // Register only if the provider has not been previously registered - if (!found) { - LOG.debug("SAMLCore: Register Bouncy Castle provider."); - Security.insertProviderAt(new BouncyCastleProvider(), Security - .getProviders().length); - } +// // Dynamically register Bouncy Castle provider. +// boolean found = false; +// // Check if BouncyCastle is already registered as a provider +// final Provider[] providers = Security.getProviders(); +// for (int i = 0; i < providers.length; i++) { +// if (providers[i].getName().equals( +// BouncyCastleProvider.PROVIDER_NAME)) { +// found = true; +// } +// } +// +// // Register only if the provider has not been previously registered +// if (!found) { +// LOG.debug("SAMLCore: Register Bouncy Castle provider."); +// Security.insertProviderAt(new BouncyCastleProvider(), Security +// .getProviders().length); +// } p12Store = KeyStore.getInstance(properties .getProperty("keystoreType")); diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java index e31688069..39be750cd 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java @@ -22,7 +22,7 @@ import eu.stork.peps.exceptions.SAMLEngineException; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.NotImplementedException; import org.bouncycastle.jce.X509Principal; -import org.bouncycastle.jce.provider.BouncyCastleProvider; +//import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.opensaml.Configuration; import org.opensaml.common.SAMLObject; import org.opensaml.common.SignableSAMLObject; @@ -488,23 +488,23 @@ public class SignSW implements SAMLEngineSignI { LOG.info("Load Cryptographic Service Provider"); FileInputStream fis = null; try { - // Dynamically register Bouncy Castle provider. - boolean found = false; - // Check if BouncyCastle is already registered as a provider - final Provider[] providers = Security.getProviders(); - for (int i = 0; i < providers.length; i++) { - if (providers[i].getName().equals( - BouncyCastleProvider.PROVIDER_NAME)) { - found = true; - } - } - - // Register only if the provider has not been previously registered - if (!found) { - LOG.info("SAMLCore: Register Bouncy Castle provider."); - Security.insertProviderAt(new BouncyCastleProvider(), Security - .getProviders().length); - } +// // Dynamically register Bouncy Castle provider. +// boolean found = false; +// // Check if BouncyCastle is already registered as a provider +// final Provider[] providers = Security.getProviders(); +// for (int i = 0; i < providers.length; i++) { +// if (providers[i].getName().equals( +// BouncyCastleProvider.PROVIDER_NAME)) { +// found = true; +// } +// } +// +// // Register only if the provider has not been previously registered +// if (!found) { +// LOG.info("SAMLCore: Register Bouncy Castle provider."); +// Security.insertProviderAt(new BouncyCastleProvider(), Security +// .getProviders().length); +// } storkOwnKeyStore = KeyStore.getInstance(properties .getProperty(KEYSTORE_TYPE)); |