You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having to add self-signed certificates to the cacerts file in your Java installation is a pain and currently I believe the IcatManager fails silently and you have to look in the log file to find out why your connection failed. It would be convenient if you could set an option (tickbox?) in the IcatManager to accept self signed certificates. Accepting certificates can be done by calling the method below:
public static void installTrustManager() {
// Create a trust manager that does not validate certificate chains
// Equivalent to --no-certificate-check in wget
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
};
// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
LOGGER.severe("Exception setting trust manager. " + e);
}
// log message
LOGGER.info("Trust manager set up successfully");
}
The text was updated successfully, but these errors were encountered:
Having to add self-signed certificates to the cacerts file in your Java installation is a pain and currently I believe the IcatManager fails silently and you have to look in the log file to find out why your connection failed. It would be convenient if you could set an option (tickbox?) in the IcatManager to accept self signed certificates. Accepting certificates can be done by calling the method below:
The text was updated successfully, but these errors were encountered: