Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

I can't start SUNJSSE in fips mode

5582abdb-244e-4178-b9c6-f8a225c60114Dec 3 2018 — edited Dec 3 2018

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

Comments
Post Details
Added on Dec 3 2018
1 comment
1,377 views