Skip to content

Commit

Permalink
Improve SSL context initialization error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ldrozdz committed Jun 15, 2017
1 parent 3a5bc03 commit 4219535
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/symphonyoss/symphony/jcurl/JCurl.java
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ private void initSSLContext() {
kmf.init(ks, instance.storePass.toCharArray());
keyManagers = kmf.getKeyManagers();
} catch (IOException | CertificateException | KeyStoreException | UnrecoverableKeyException e) {
System.err.println("Failed to disable certificate check: " + e.getMessage());
System.err.println("Failed to initialize keystore: " + e.getMessage());
}
}

Expand All @@ -524,7 +524,7 @@ private void initSSLContext() {
tmf.init(ts);
trustManagers = tmf.getTrustManagers();
} catch (IOException | CertificateException | KeyStoreException e) {
System.err.println("Failed to disable certificate check: " + e.getMessage());
System.err.println("Failed to initialize truststore: " + e.getMessage());
}
}

Expand All @@ -533,7 +533,7 @@ private void initSSLContext() {
SSLContext.setDefault(context);
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());
} catch (NoSuchAlgorithmException | KeyManagementException e) {
System.err.println("Failed to disable certificate check: " + e.getMessage());
System.err.println("Failed to initialize SSL context: " + e.getMessage());
}
}

Expand Down

0 comments on commit 4219535

Please sign in to comment.