How to check if the X509 trustee is trusted

I have an X509Certificate instance in java and need to check if the issuer is trusted?

thanks gal

+4
source share
1 answer

If you only have a certificate (out of context), you must create a certification path using Java PKI Cert. API paths . If this is in the context of SSL, you should use TrustManager and verify it when using SSLContext .

This will check if you issued a CA certificate that you trust (or perhaps through one of its intermediate CAs).

You may also be interested in “ What data should I verify when verifying X.509 certificates using Java? ” (Under Security.SE).

+2
source

Source: https://habr.com/ru/post/1399180/


All Articles