本文介绍了验证叶子证书已由子CA证书签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有Apple Root CA-G3根证书,我需要验证信任链。我需要验证叶子证书是否由子CA证书签名。
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.
如何用Java做到这一点?
How can I do this with Java?
推荐答案
使用此片段
X509Certificate certificate =...
X509Certificate intermediate = ...
try{
certificate.verify(intermediate.getPublicKey());
//Verification ok. intermediate is the issuer
} catch (Exception e){}
}
这篇关于验证叶子证书已由子CA证书签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!