Forum Stats

  • 3,826,604 Users
  • 2,260,675 Discussions
  • 7,897,026 Comments

Discussions

I can't start SUNJSSE in fips mode

Hi all,

By editing the "java.security" file, I can also use SunJSSE in fips mode, but I cannot do it with java code. I'm reading the documents says i using the following code to activate the fips mode.

new com.sun.net.ssl.internal.ssl.Provider("BCFIPS");

The following error is being thrown when I want to add it this way.

Exception in thread "main" java.security.ProviderException: SunJSSE already initialized in non-FIPS mode

at sun.security.ssl.SunJSSE.ensureFIPS(SunJSSE.java:93)

at sun.security.ssl.SunJSSE.<init>(SunJSSE.java:145)

at sun.security.ssl.SunJSSE.<init>(SunJSSE.java:122)

at com.sun.net.ssl.internal.ssl.Provider.<init>(Provider.java:51)

However, in my code, I cannot restart provider because there is a place that previously used SUNJSSE. How do I finalize and restart the running provider.

It is very difficult to find places that use SunJSSE because the project I use is very large. So I need to finalize the provider and start it again in FIPS mode.

I tried to delete it again and add it again, but it didn't.

Security.removeProvider("SunJSSE");

Please help me