[
https://issues.apache.org/jira/browse/NUTCH-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439465#comment-15439465
]
ASF GitHub Bot commented on NUTCH-2308:
---------------------------------------
Github user kamaci commented on a diff in the pull request:
https://github.com/apache/nutch/pull/147#discussion_r76460324
--- 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 --
Do you want me to use sth. like
this.getClass().getClassLoader().getResource("nutch.cer").getFile() ?
> Implement SSL Connection Test at TestNutchAPI
> ---------------------------------------------
>
> Key: NUTCH-2308
> URL: https://issues.apache.org/jira/browse/NUTCH-2308
> Project: Nutch
> Issue Type: Improvement
> Components: REST_api, web gui
> Reporter: Furkan KAMACI
> Assignee: Furkan KAMACI
> Fix For: 2.4
>
>
> Currently, testing of SSL is ignored at TestNutchAPI. We should complete the
> implementation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)