forked from I2P_Developers/i2p.i2p
reduce log level of expired certs on android
This commit is contained in:
@@ -229,7 +229,12 @@ public class KeyStoreUtil {
|
|||||||
try {
|
try {
|
||||||
cert.checkValidity();
|
cert.checkValidity();
|
||||||
} catch (CertificateExpiredException cee) {
|
} catch (CertificateExpiredException cee) {
|
||||||
error("Rejecting expired X509 Certificate: " + file.getAbsolutePath(), cee);
|
String s = "Rejecting expired X509 Certificate: " + file.getAbsolutePath();
|
||||||
|
// Android often has old system certs
|
||||||
|
if (SystemVersion.isAndroid())
|
||||||
|
warn(s, cee);
|
||||||
|
else
|
||||||
|
error(s, cee);
|
||||||
return false;
|
return false;
|
||||||
} catch (CertificateNotYetValidException cnyve) {
|
} catch (CertificateNotYetValidException cnyve) {
|
||||||
error("Rejecting X509 Certificate not yet valid: " + file.getAbsolutePath(), cnyve);
|
error("Rejecting X509 Certificate not yet valid: " + file.getAbsolutePath(), cnyve);
|
||||||
@@ -463,6 +468,11 @@ public class KeyStoreUtil {
|
|||||||
log(I2PAppContext.getGlobalContext(), Log.INFO, msg, null);
|
log(I2PAppContext.getGlobalContext(), Log.INFO, msg, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @since 0.9.17 */
|
||||||
|
private static void warn(String msg, Throwable t) {
|
||||||
|
log(I2PAppContext.getGlobalContext(), Log.WARN, msg, t);
|
||||||
|
}
|
||||||
|
|
||||||
private static void error(String msg, Throwable t) {
|
private static void error(String msg, Throwable t) {
|
||||||
log(I2PAppContext.getGlobalContext(), Log.ERROR, msg, t);
|
log(I2PAppContext.getGlobalContext(), Log.ERROR, msg, t);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user