java实现证书链和签名验证

public static boolean verify(X509Certificate X509certificateRoot,
Collection collectionX509CertificateChain,X509CRL X509crl,String stringTarget) {
//获取证书链长度
int nSize=collectionX509CertificateChain.size();
//将证书链转化为数组
X509Certificate[] arX509certificate=new X509Certificate[nSize];
collectionX509CertificateChain.toArray(arX509certificate);
//声明list,存储证书链中证书主体信息
ArrayList list=new ArrayList();
//沿证书链自上而下,验证证书的所有者是下一个证书的颁布者
Principal principalLast=null;
for(int i=0;i 
 

你可能感兴趣的:(java实现证书链和签名验证)