maulin-vasavada commented on a change in pull request #1316:
URL: https://github.com/apache/cassandra/pull/1316#discussion_r798942971



##########
File path: 
src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java
##########
@@ -178,10 +173,29 @@ protected TrustManagerFactory buildTrustManagerFactory() 
throws SSLException
         }
     }
 
+    protected boolean checkExpiredCerts(KeyStore ks) throws KeyStoreException
+    {
+        boolean hasExpiredCerts = false;
+        for (Enumeration<String> aliases = ks.aliases(); 
aliases.hasMoreElements(); )
+        {
+            String alias = aliases.nextElement();
+            if (ks.getCertificate(alias).getType().equals("X.509"))
+            {
+                Date expires = ((X509Certificate) 
ks.getCertificate(alias)).getNotAfter();
+                if (expires.before(new Date()))

Review comment:
       Great point Stefan. Again thanks for making the change on the separate 
branch.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to