Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/147#discussion_r76456244
  
    --- Diff: src/test/org/apache/nutch/api/AbstractNutchAPITestBase.java ---
    @@ -160,6 +177,37 @@ private void initializeSSLProperties() {
         conf.set("restapi.auth.ssl.keypass", "password");
       }
     
    +  private void loadCertificate() throws CertificateException, 
NoSuchAlgorithmException, KeyStoreException, IOException {
    +    KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
    +    char[] password = "testpassword".toCharArray();
    +    String testTrustKeyStorePath = "src/test/testTrustKeyStore";
    +    System.setProperty("javax.net.ssl.trustStore" , testTrustKeyStorePath);
    +
    +    File file = new File(testTrustKeyStorePath);
    +    InputStream localCertIn = new FileInputStream(file);
    +
    +    ks.load(localCertIn, password);
    +    localCertIn.close();
    +
    +    if (ks.containsAlias("nutch")) {
    +      return;
    +    }
    +
    +    InputStream certIn = new FileInputStream("src/test/nutch.cer");
    --- End diff --
    
    Please use the classloader.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to