You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ab...@apache.org on 2009/02/06 14:17:09 UTC

svn commit: r741559 - in /lucene/nutch/trunk: CHANGES.txt src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java

Author: ab
Date: Fri Feb  6 13:17:08 2009
New Revision: 741559

URL: http://svn.apache.org/viewvc?rev=741559&view=rev
Log:
NUTCH-636 Httpclient plugin https doesn't work on IBM JRE.

Modified:
    lucene/nutch/trunk/CHANGES.txt
    lucene/nutch/trunk/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java

Modified: lucene/nutch/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/CHANGES.txt?rev=741559&r1=741558&r2=741559&view=diff
==============================================================================
--- lucene/nutch/trunk/CHANGES.txt (original)
+++ lucene/nutch/trunk/CHANGES.txt Fri Feb  6 13:17:08 2009
@@ -335,6 +335,9 @@
 
 125. NUTCH-643 - ClassCastException in PDF parser (Guillaume Smet, ab)
 
+126. NUTCH-636 - Httpclient plugin https doesn't work on IBM JRE
+     (Curtis d'Entremont, ab)
+
      
 Release 0.9 - 2007-04-02
 

Modified: lucene/nutch/trunk/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java
URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java?rev=741559&r1=741558&r2=741559&view=diff
==============================================================================
--- lucene/nutch/trunk/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java (original)
+++ lucene/nutch/trunk/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java Fri Feb  6 13:17:08 2009
@@ -44,11 +44,12 @@
      */
     public DummyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmException, KeyStoreException {
         super();
-        TrustManagerFactory factory = TrustManagerFactory.getInstance("SunX509");
+        String algo = TrustManagerFactory.getDefaultAlgorithm();
+        TrustManagerFactory factory = TrustManagerFactory.getInstance(algo);
         factory.init(keystore);
         TrustManager[] trustmanagers = factory.getTrustManagers();
         if (trustmanagers.length == 0) {
-            throw new NoSuchAlgorithmException("SunX509 trust manager not supported");
+            throw new NoSuchAlgorithmException(algo + " trust manager not supported");
         }
         this.standardTrustManager = (X509TrustManager)trustmanagers[0];
     }