I am able to check for the validity of the X509Certificate certificate using the checkValidility() method, But my project requirement is also to extract validity to and from dates also from the X509Certificate date and store in the database.
But there are no methods in the API which returns these dates.
So, please help me in extracting these values. Thanks in Advance.
There are API methods. The X509Certificate getNotBefore() and getNotAfter() methods should return those dates.
I found the answer for my Question , API does provide methods to return these dates:
x509Certificate.getNotAfter()
- Validate To Date.
x509Certificate.getNotBefore()
- Validate Before Date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With