验证叶证书是否由子 CA 证书签名

Verify that the leaf certificate was signed by the sub-CA certificate

我有 Apple 根 CA - G3 根证书,我需要验证信任链。我需要验证叶证书是否由子 CA 证书签名。

如何使用 Java 执行此操作?

使用这个片段

X509Certificate certificate =...
X509Certificate intermediate = ...
try{
    certificate.verify(intermediate.getPublicKey());
        //Verification ok.    intermediate  is the issuer
    } catch (Exception e){}
}