Java has class X509Certificate and method checkValidity(). https://docs.oracle.com/javase/7/docs/api/java/security/cert/X509Certificate.html#checkValidity()
I connect to some server via HTTPS in my Java program. I need to check authenticity server's sertificate including issuers. I want to be sure that root issuer is trusted (in local trust storage). But method checkValidity() checks validity period only ("the current date and time are within the validity period given in the certificate"). How can I check that I want to?
Excuse me, if my question is simple. I am beginner. All that I found is Get certificate and add it to a Java truststore, when only having https URL?
But it is using checkValidity(). I need a little more than check validity period.