您好我无法使用C#itextsharp 5.4.0库
对PDF进行签名以下是在Java Code中生成的日志,工作正常:
c.i.t.p.s.CrlClientOnline INFO Checking certificate: CN=N C JAIN, SERIALNUMBER=2d9883a6f13cd6fb4416035766825e4b5ec823a871f883d3f3ee8eeb6e433c8d, ST=Delhi, OID.2.5.4.17=110020, OU="NEWGEN SOFTWARE TECHNOLOGIES LIMITED,ECID - 5810785", OID.2.5.4.20=f9cd01a6fbef84f253bf3830cab5caef7fc536e303639ff7e5c195f7488b032b, O=NEWGEN SOFTWARE TECHNOLOGIES LIMITED, C=IN
c.i.t.p.s.CrlClientOnline INFO Added CRL url: _https://www.ncodesolutions.com/repository/ncodeca14.crl
c.i.t.p.s.CrlClientOnline INFO Checking certificate: CN=(n)Code Solutions CA 2014, OID.2.5.4.51="301, GNFC Infotower", STREET="Bodakdev, S G Road, Ahmedabad", ST=Gujarat, OID.2.5.4.17=380054, OU=Certifying Authority, O=Gujarat Narmada Valley Fertilizers and Chemicals Limited, C=IN
c.i.t.p.s.CrlClientOnline INFO Added CRL url: _http://cca.gov.in/rw/resources/CCAIndia2014Latest.crl
c.i.t.p.s.CrlClientOnline INFO Checking certificate: CN=CCA India 2014, O=India PKI, C=IN
c.i.t.p.s.CrlClientOnline INFO Skipped CRL url (malformed): null
c.i.t.p.s.MakeSignature INFO Processing com.itextpdf.text.pdf.security.CrlClientOnline
c.i.t.p.s.CrlClientOnline INFO Checking CRL: _https://www.ncodesolutions.com/repository/ncodeca14.crl
c.i.t.p.s.CrlClientOnline INFO Skipped CRL: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target for _https://www.ncodesolutions.com/repository/ncodeca14.crl
c.i.t.p.s.CrlClientOnline INFO Checking CRL: _http://cca.gov.in/rw/resources/CCAIndia2014Latest.crl
c.i.t.p.s.CrlClientOnline INFO Added CRL found at: _http://cca.gov.in/rw/resources/CCAIndia2014Latest.crl
注意:java代码工作正常。
但是C#itextSharp代码不起作用。它击中了不存在的错误URL。
UrlList:
"_https://www.ncodesolutions.com/repository/ncodeca14.crl"
"_http://cca.gov.in/rw/resources/CCAIndia2014Latest.crl"
从给定证书中检索OCSP URL为。
" https://www.ncodesolutions.com/repository/ncodeca.cer"
与上面的urlist和java中的url不同。
Exception:The remote server returned an error: (404) Not Found.
请提供帮助或解决方案。
注意:在每个链接之前添加_,以便我可以发布我的问题。
由于