Skip to content

Commit

Permalink
Fix for issue #104 Oxalis-AS4 v.4.1.7 cannot read keystore
Browse files Browse the repository at this point in the history
  • Loading branch information
FrodeBjerkholt committed Mar 5, 2020
1 parent 37c71c1 commit cb281db
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/main/java/no/difi/oxalis/as4/common/As4CommonModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.wss4j.dom.engine.WSSConfig;
import org.bouncycastle.jce.provider.BouncyCastleProvider;

import java.security.Provider;
import java.security.Security;

import static no.difi.oxalis.as4.common.AS4Constants.*;
Expand All @@ -64,14 +62,8 @@ protected void configure() {
new OxalisAlgorithmSuiteLoader(bus);
BusFactory.setThreadDefaultBus(bus);

Security.setProperty("jdk.security.provider.preferred", "AES/GCM/NoPadding:BC");
WSSConfig.init();

// Make sure that BouncyCastle is the preferred security provider
final Provider[] providers = Security.getProviders();
if (providers != null && providers.length > 0)
Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME);
log.debug("Registering BouncyCastle as preferred Java security provider");
Security.insertProviderAt(new BouncyCastleProvider(), 1);
}

@Provides
Expand Down

0 comments on commit cb281db

Please sign in to comment.