I changed httpclient to use javax.net.ssl instead of com.sun.net.ssl
--------------------------------------------------------------------

         Key: NUTCH-239
         URL: http://issues.apache.org/jira/browse/NUTCH-239
     Project: Nutch
        Type: Improvement
  Components: fetcher  
    Versions: 0.7.2-dev    
 Environment: RedHat Enterprise Linux
    Reporter: Jake Vanderdray
    Priority: Trivial


I made the following changes in order to get the dependency on com.sun.ssl out 
of the 0.7 branch.  The same changes have already been applied to the 0.8 
branch (Revision 379215) thanks to ab.  There is still a dependency on using 
the Sun JRE.  In order to get it to work with the IBM JRE I had to change 
SunX509 to IbmX509, but I didn't include that change in this patch.  


Thanks,
Jake.


Index: DummySSLProtocolSocketFactory.java
===================================================================
--- DummySSLProtocolSocketFactory.java  (revision 388638)
+++ DummySSLProtocolSocketFactory.java  (working copy)
@@ -22,8 +22,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import com.sun.net.ssl.SSLContext;
-import com.sun.net.ssl.TrustManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
 
 public class DummySSLProtocolSocketFactory implements ProtocolSocketFactory {
 
Index: DummyX509TrustManager.java
===================================================================
--- DummyX509TrustManager.java  (revision 388638)
+++ DummyX509TrustManager.java  (working copy)
@@ -10,9 +10,9 @@
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 
-import com.sun.net.ssl.TrustManagerFactory;
-import com.sun.net.ssl.TrustManager;
-import com.sun.net.ssl.X509TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
 import org.apache.commons.logging.Log; 
 import org.apache.commons.logging.LogFactory;
 
@@ -57,4 +57,12 @@
     public X509Certificate[] getAcceptedIssuers() {
         return this.standardTrustManager.getAcceptedIssuers();
     }
+   
+    public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws 
CertificateException {
+       // do nothing
+    }
+
+    public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws 
CertificateException {
+       // do nothing
+    }
 }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to