I'm trying to use BouncyCastleProvider in order to connect with a page with the TLS1.2 certificate as follows:
public static void main(String[] args) throws Exception {
Security.addProvider(new BouncyCastleProvider());
final URL url = new URL("https://tls1test.salesforce.com/s/");
final HttpsURLConnection httpsURLConnection = (HttpsURLConnection)url.openConnection();
final InputStream inputStream = httpsURLConnection.getInputStream();
}
But I'm receiving the error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
I'm using Java version 1.6_30.
What can I do?