I have the Apple Root CA - G3 root Certificate and I need to validate the chain of trust. I need to verify that the leaf certificate was signed by the sub-CA certificate.
How can I do this with Java?
I have the Apple Root CA - G3 root Certificate and I need to validate the chain of trust. I need to verify that the leaf certificate was signed by the sub-CA certificate.
How can I do this with Java?
Use this snippet
X509Certificate certificate =...
X509Certificate intermediate = ...
try{
certificate.verify(intermediate.getPublicKey());
//Verification ok. intermediate is the issuer
} catch (Exception e){}
}