0

I have tried a number of things and searched a quite few posts but cannot found a proper answer to the below problem.

While making a ssl context i.e

ctx = SSLContext.getInstance("TLSv1.2");

i am getting an exception as

java.security.NoSuchAlgorithmException: Unknown protocol: TLSv1.2

I tried to use another protocol that is

ctx = SSLContext.getInstance("TLSv1");

but then i get an error as

javax.net.ssl.SSLHandshakeException: algorithm not supported for certificate

please help me as to where i am getting thing wrong.

2
  • Which JRE version do you use? Only JDK 7+ supports TLS 1.2 initially. JDK 6 supports it from Update 121. And I don't think that JDK 5 supports it at all. I'm talking about Oracle JDKs, not sure about other implementations Commented Nov 14, 2016 at 8:59
  • yeah you are right .. i am using java 1.4 .. is there any way i can still use TLS in java 4? Commented Nov 14, 2016 at 9:02

1 Answer 1

1

You must be using some ancient version of Java that doesn't support TLS 1.2.

Upgrade.

Sign up to request clarification or add additional context in comments.

2 Comments

yes i am using java 1.4 but when i do ctx = SSLContext.getInstance("TLSv1"); it creates a context ..though SSLHandshake exception is there which says algorithm not supported for certificate
Then you either have to switch to a newer Java version or you have to create/get new certificates which support TLSv1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.