1

I am using Java 6. And I am supposed to use TLS1.2 for a partner integration. So, I am using BouncyCastle provider to get this done in Java 6. But, I am seeing this error.

java.security.NoSuchAlgorithmException: TLSv1.2 SSLContext not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:142)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:125)

I have kept BouncyCastle jars in the classpath and added this line in the program.

Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

Could you help resolve this issue?

Thank you in advance.

Sreenivas
  • 63
  • 3
  • 10

1 Answers1

1

It May be issue with placement of BouncyCastle jars :

make sure the correct Bouncy Castle libraries are copied into the $JAVA_HOME/jre/lib/ext directory

http://www.itcsolutions.eu/2011/08/22/how-to-use-bouncy-castle-cryptographic-api-in-netbeans-or-eclipse-for-java-jse-projects/

go to section How to install the Bouncy Castle API