W3C home > Mailing lists > Public > www-validator-cvs@w3.org > May 2011

2002/css-validator/org/w3c/css/css DocumentParser.java,1.5,1.6

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 14 May 2011 18:13:27 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1QLJLD-0003KR-Ij@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/css
In directory hutz:/tmp/cvs-serv12763/org/w3c/css/css

Modified Files:
	DocumentParser.java 
Log Message:
moved SSL verifier to the right class, make it per-instance instead of static, add support for temporary redirect

Index: DocumentParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/DocumentParser.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- DocumentParser.java	18 Jun 2010 16:18:10 -0000	1.5
+++ DocumentParser.java	14 May 2011 18:13:25 -0000	1.6
@@ -84,40 +84,6 @@
 	} else {
 	    URLConnection connection = null;
 
-	    if ("https".equals(urlProtocol)) {
-		    // Step 1: trust manager
-		    // Create a trust manager that does not validate certificate chains
-		    TrustManager[] trustAllCerts = new TrustManager[] {
-			    new X509TrustManager() {
-				    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
-					    return null;
-				    }
-				    public void checkClientTrusted(
-					    java.security.cert.X509Certificate[] certs, String authType) {
-				    }
-				    public void checkServerTrusted(
-						    java.security.cert.X509Certificate[] certs, String authType) {
-					    }
-			    }
-		    };
-
-		    // Install the all-trusting trust manager
-		    try {
-			    SSLContext sc = SSLContext.getInstance("SSL");
-			    sc.init(null, trustAllCerts, new java.security.SecureRandom());
-			    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
-		    } catch (Exception e) {
-		    }
-
-		    // Step 2: hostname verifier
-		    HostnameVerifier hv = new HostnameVerifier() {
-			    public boolean verify(String urlHostName, SSLSession session) {
-				    return true;
-			    }
-		    };
-		    HttpsURLConnection.setDefaultHostnameVerifier(hv);
-	    }
-
 	    try {
 		boolean isXML = false;
 		String cType;
Received on Saturday, 14 May 2011 18:13:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:45 UTC