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.