KeyStore: Log expiration of self-signed certs

This commit is contained in:
zzz
2018-03-04 12:14:05 +00:00
parent 5a639260cd
commit 3bc9053a86
6 changed files with 119 additions and 1 deletions

View File

@@ -142,6 +142,7 @@ class SSLClientListenerRunner extends ClientListenerRunner {
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
fis = new FileInputStream(ks);
keyStore.load(fis, ksPass.toCharArray());
KeyStoreUtil.logCertExpiration(keyStore, ks.getAbsolutePath(), 180*24*60*60*1000L);
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
kmf.init(keyStore, keyPass.toCharArray());
sslc.init(kmf.getKeyManagers(), null, _context.random());