You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2013/10/03 17:29:01 UTC
svn commit: r1528910 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Author: sebb
Date: Thu Oct 3 15:29:01 2013
New Revision: 1528910
URL: http://svn.apache.org/r1528910
Log:
Check validity of root CA certificate.
Improve logging
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1528910&r1=1528909&r2=1528910&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java Thu Oct 3 15:29:01 2013
@@ -565,6 +565,7 @@ public class ProxyControl extends Generi
if (caCert == null) {
return new String[]{"Could not find certificate"};
}
+ caCert.checkValidity();
return new String[]
{
caCert.getSubjectX500Principal().toString(),
@@ -573,7 +574,7 @@ public class ProxyControl extends Generi
};
} catch (GeneralSecurityException e) {
log.error("Problem reading root CA from keystore", e);
- return new String[]{"Could not read certificate"};
+ return new String[]{"Problem with root certificate", e.getMessage()};
}
}
return null; // should not happen
@@ -1251,12 +1252,13 @@ public class ProxyControl extends Generi
break; // cannot continue
} else {
caCert.checkValidity(new Date(System.currentTimeMillis()+DateUtils.MILLIS_PER_DAY));
+ log.info("Valid alias found for " + alias);
}
}
} catch (IOException e) { // store is faulty, we need to recreate it
keyStore = null; // if cert is not valid, flag up to recreate it
if (e.getCause() instanceof UnrecoverableKeyException) {
- log.warn("Could not read key store " + e.getMessage() + " cause " + e.getCause().getMessage());
+ log.warn("Could not read key store " + e.getMessage() + "; cause: " + e.getCause().getMessage());
} else {
log.warn("Could not open/read key store " + e.getMessage()); // message includes the file name
}