< prev index next >

test/jdk/javax/net/ssl/ServerName/SSLSocketSNISensitive.java

Print this page

        

@@ -52,11 +52,12 @@
 import java.security.cert.CertificateFactory;
 import java.security.spec.*;
 import java.security.interfaces.*;
 import java.util.Base64;
 
-
+// Note: this test case works only on TLS 1.2 and prior versions because of
+// the use of MD5withRSA signed certificate.
 public class SSLSocketSNISensitive {
 
     /*
      * =============================================================
      * Set the various variables needed for the tests, then

@@ -413,11 +414,11 @@
 
         // create SSL context
         TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmAlgorithm);
         tmf.init(ks);
 
-        SSLContext ctx = SSLContext.getInstance("TLS");
+        SSLContext ctx = SSLContext.getInstance("TLSv1.2");
         KeyManagerFactory kmf = KeyManagerFactory.getInstance("NewSunX509");
         kmf.init(ks, passphrase);
 
         ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
         ks = null;
< prev index next >