< prev index next >

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

Print this page

        

*** 52,62 **** import java.security.cert.CertificateFactory; import java.security.spec.*; import java.security.interfaces.*; import java.util.Base64; ! public class SSLSocketSNISensitive { /* * ============================================================= * Set the various variables needed for the tests, then --- 52,63 ---- 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,423 **** // create SSL context TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmAlgorithm); tmf.init(ks); ! SSLContext ctx = SSLContext.getInstance("TLS"); KeyManagerFactory kmf = KeyManagerFactory.getInstance("NewSunX509"); kmf.init(ks, passphrase); ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); ks = null; --- 414,424 ---- // create SSL context TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmAlgorithm); tmf.init(ks); ! 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 >