扩展AdobeLtvEnabling
异常的原因是,对于一个证书,关联的 CRL 是AdobeLtvEnabling
类不期望的 base64 编码(这里的期望是检索二进制版本,不需要解码)。
您可以扩展AdobeLtvEnabling
如下,也能够处理 base64 编码的 CRL:搜索AdobeLtvEnabling
方法addLtvForChain
并替换 CRL 处理循环
Console.WriteLine(" with {0} CRLs\n", crl.Count);
foreach (byte[] crlBytes in crl)
{
validationData.crls.Add(crlBytes);
addLtvForChain(null, ocspClient, crlClient, getCrlHashKey(crlBytes));
}
有了这个:
Console.WriteLine(" with {0} CRLs\n", crl.Count);
foreach (byte[] crlBytes in crl)
{
PdfName hashKey = null;
byte[] bytes = null;
try
{
hashKey = getCrlHashKey(crlBytes);
bytes = crlBytes;
}
catch (Exception e)
{
Console.WriteLine(" CRL decoding exception, assuming Base64 encoding, trying to decode - {0}\n", e.Message);
bytes = Convert.FromBase64String(new String(Encoding.Default.GetChars(crlBytes)));
hashKey = getCrlHashKey(bytes);
}
validationData.crls.Add(bytes);
addLtvForChain(null, ocspClient, crlClient, hashKey);
}
不过你的签名
虽然撤销其他有问题的非根证书现在指的是嵌入式 CRL,但对于一个证书仍然存在问题,Adobe Reader 中“RCAI Class 2 2014 的 SafeScrypt 子 CA (SAFESCRYPTONLINE_15)”的撤销选项卡显示
CRL processing error
Issuer: cn=SafeScrypt CA 2014, houseIdentifier=II Floor, Tidel Park, street=No.4, Rajiv Gandhi Salai, Taramani, Chennai, st=Tamil Nadu, postalCode=600 113, ou=Certifying Authority, o=Sify Technologies Limited, c=IN
This update: 20180303183000Z
Next update: 20190303182959Z
CRL has expired or is not yet valid
实际上,下一个更新值为 20190303182959Z 的 CRL 已过期,因此,如果没有适当的 POE,现在不能用于验证。因此,事实上,Adobe Reader 完全正确地指出,基于该 CRL(目前由 PKI 提供服务)它无法确定非撤销。
但它可以来自其他信息吗?好吧,OCSP 响应者的证书中有一个 AIA 属性,可以替代地使用。但是尝试使用它失败了, http: //ocsp.safescrypt.com目前不接受任何请求。所以这不是实际的选择。
总而言之,这使得这个 CA 的服务质量显得值得怀疑。如果此状态继续存在,您可能希望切换到不同的 CA。