PdfPKCS7 .verify() return false while signature verification

不想你离开。 提交于 2019-12-24 23:24:01

问题


I have been working with itextSharp-5.5.5, (5.5.10 / 5.5.13) Having issue with all version.

            TypeInfo typeInfo = typeof(PdfPKCS7).GetTypeInfo();
            FieldInfo rsaDataField = typeInfo.GetDeclaredField("RSAdata");
            Object rsadatafieldcontent = rsaDataField.GetValue(pkcs7);
            if (rsadatafieldcontent != null && ((byte[])rsadatafieldcontent).Length == 0)
            {
                _log.Info("Found zero-length encapsulated content: ignoring");
                rsaDataField.SetValue(pkcs7, null);
            } 
            if (pkcs7.Verifyc())    <------ **HERE return false**
            { 

But Adobe Acrobat Reader say: Signed and all signatures are valid.

Any help much appreciated.

来源:https://stackoverflow.com/questions/51078455/pdfpkcs7-verify-return-false-while-signature-verification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!