Getting Error - javax.net.ssl.SSLHandshakeException: Server chose TLSv1, but that protocol version is not enabled or not supported by the client when making a call to a secured webservice.

Appended the following option to the JAVA_OPTIONS variable in the mydomain\bin\ setDomainEnv.cmd as advised in the oracle site but same issue.

-Dweblogic.security.SSL.protocolVersion=TLS1

        Java client code :
        File pKeyFile = new File("C:\\myJKS.jks");   
        if (pKeyFile.exists() && !pKeyFile.isDirectory()) {
            logger.debug("JKS file exists, and it is a file");
        }
        KeyStore keyStore = KeyStore.getInstance("JKS");
        keyStore.load(new FileInputStream(pKeyFile.toString()),
                pKeyPassword.toCharArray());
        KeyManagerFactory keyManagerFactory = KeyManagerFactory
                .getInstance("SunX509");
        keyManagerFactory.init(keyStore, pKeyPassword.toCharArray());
        **SSLContext context = SSLContext.getInstance("TLSv1.1");**
        context.init(keyManagerFactory.getKeyManagers(), null,
                new SecureRandom());
        sockFact = context.getSocketFactory();
        if(sockFact == null){
            logger.debug("SocketFactory is null");
            throw new NullPointerException("socketFactory == null");
        }

Client Env - JDK version: 7, Application server:Weblogic.

Trying to make it work from couple of days, but no luck.

0

There are 0 best solutions below