Hi Daniel,
Yes, I'm testing with a USB Certificate Token (SafeNet eToken 5110).
Sincerely,
Rachel
E-iceblue support team
signature.ConfigureHttpOCSP("http://ocsp.entrust.net",certificateChain);
//Or
signature.ConfigureHttpOCSP("http://ocsp.entrust.net",null);
Message:
Internal.Cryptography.CryptoThrowHelper.WindowsCryptographicException: 'Object was not found.'
Stack Trace:
at Internal.Cryptography.CngCommon.SignHash(SafeNCryptKeyHandle keyHandle, ReadOnlySpan`1 hash, AsymmetricPaddingMode paddingMode, Void* pPaddingInfo, Int32 estimatedSize)
at System.Security.Cryptography.RSACng.SignHash(Byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
at System.Security.Cryptography.RSA.SignData(Byte[] data, Int32 offset, Int32 count, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
at System.Security.Cryptography.RSA.SignData(Byte[] data, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
at spr⤝.ᜃ()
at sprⰑ.ᜀ()
at spr⳰.ᜀ.ᜀ(spr A_0, spr⳩ A_1, spr⨈ A_2)
at spr⳰.ᜀ(String A_0, spr⳩ A_1, Boolean A_2)
at spr⤛.ᜀ(Byte[][] A_0)
at spr⤰.ᜀ()
at spr⤰.ᜂ(spr A_0)
at spr⤰.ᜀ(Object A_0, sprយ A_1)
at sprភ.ᜀ(sprយ A_0)
at sprភ.ᜀ(spr A_0, Boolean A_1)
at sprភ.ᜅ(spr A_0)
at spr᠕.ᜀ(sprᝯ A_0, sprឞ A_1, spr A_2)
at spr᠕.ᜀ(sprᝯ A_0, spr A_1)
at spr᠕.ᜄ(spr A_0)
at spr᠕.ᜅ(spr A_0)
at sprᢶ.ᜁ(spr A_0)
at sprᢶ.ᜁ(Stream A_0)
at Spire.Pdf.PdfDocument.SaveToStream(Stream stream)
at CorePdfTest.Program.Main(String[] args) in C:\Source\Test Folder\CorePdfTest\Program.cs:line 47
//No1
X509Certificate2Collection certs = store.Certificates.Find(X509FindType.FindBySubjectName, "My USB Token Cert", true);
//No2
X509Certificate2Collection certs = store.Certificates.Find(X509FindType.FindByThumbprint, "xxxx", false);