Apache Nutch is an extensible and scalable web crawler
NUTCH-636 Httpclient plugin https doesn't work on IBM JRE.
Andrzej Bialecki7400e1761de6
diff --git a/CHANGES.txt b/CHANGES.txtindex 0013b8ceb..4e86ec5ac 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -335,6 +335,9 @@ Unreleased changes (1.0-dev)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-02diff --git a/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java b/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.javaindex b6ca79050..6017a2efa 100644--- a/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java+++ b/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/DummyX509TrustManager.java@@ -44,11 +44,12 @@ public class DummyX509TrustManager implements X509TrustManager*/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];}