Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Aug 18, 2020 1:45 am

Hi Daniel,

Yes, I'm testing with a USB Certificate Token (SafeNet eToken 5110).

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Aug 18, 2020 6:11 pm

Hi Rachel,

I tried your code and I get the same error.

I tried it on any pdf and it fails (I created a word doc with "TEST PDF" and saved as PDF). Because my certificate is on a USB Key, I am unable to export the full certificate (with private key) and so signing is not possible without the usb key itself.

Is there another way we can test?

the OCSP url is "http://ocsp.entrust.net". Also, I have the certificate chain.

Is there another way to enable LTV?

danielscoggins
 
Posts: 15
Joined: Fri Jul 03, 2020 11:48 am

Tue Aug 18, 2020 6:13 pm

FYI, I tried both of these lines with but received the same error each time.

Code: Select all
signature.ConfigureHttpOCSP("http://ocsp.entrust.net",certificateChain);
//Or
signature.ConfigureHttpOCSP("http://ocsp.entrust.net",null);

danielscoggins
 
Posts: 15
Joined: Fri Jul 03, 2020 11:48 am

Wed Aug 19, 2020 3:44 am

Hi Daniel,

Thanks for your feedback.
Does this issue occur only on your windows server 2016 system? Please provide a screenshot of your system information to help us investigate further, like the attached picture.
Also, I have posted this issue to our Dev team to see if then can locate the specific cause. If there is any update, we will let you know.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Aug 19, 2020 1:44 pm

OSCPConfigure worked on Windows 10 Home and Windows 8.1. I am getting the error on Windows 2016 standard.

danielscoggins
 
Posts: 15
Joined: Fri Jul 03, 2020 11:48 am

Thu Aug 20, 2020 1:45 am

Hello,

Thanks for your more information.
Is your application a .NET Framework app? If so, please try to test your case with our .NET Core library. Looking forward to your further test results.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Aug 20, 2020 10:48 am

The error was in .net framework, below is the error I get in .net core.

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

danielscoggins
 
Posts: 15
Joined: Fri Jul 03, 2020 11:48 am

Fri Aug 21, 2020 3:31 am

Hi Daniel,

Thanks for your feedback.
After discussion with our developers, we suspect that this issue is related to the system environment. To help us simulate your test environment to reproduce your issue, please provide the download link of the installation package of your server. Then we will configure the environment for further verification. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Aug 27, 2020 9:17 am

Hi Daniel,

Hope you are doing well.
Could you please provide the download link of the installation package of your server to help us investigate further?
Looking forward to your response.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Aug 27, 2020 2:42 pm

I don't have access to the download link but it was a Supermicro motherboard, windows server 2016 x64 using the rainbow usb token drivers.

I tried windows 10 x64, which used the aladin usb token drivers. LTE enalbed Signing is working now.

Thanks,
Daniel

danielscoggins
 
Posts: 15
Joined: Fri Jul 03, 2020 11:48 am

Fri Aug 28, 2020 9:26 am

Hi Daniel,

Thanks for your response.
Considering that it may be the difference between the test environments, I cannot reproduce your issue on my side. The following are the details of my test machine, please compare it with your system to see if there is any difference. And if possible, I suggest you can test your case on another Windows Server 2016 system.
system_information.png

At the same time, did you make any changes when you tested the project I provided on 2020/08/17? Which of the following lines did you use to find the certificate?
Code: Select all
            //No1
            X509Certificate2Collection certs = store.Certificates.Find(X509FindType.FindBySubjectName, "My USB Token Cert", true);
            //No2
            X509Certificate2Collection certs = store.Certificates.Find(X509FindType.FindByThumbprint, "xxxx", false);

Moreover, have you tried to digitally sign PDF with your USB Certificate token directly in Adobe on your server? What is the result?

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Aug 28, 2020 11:17 am

My issue is resolved, thanks to using windows 10 x64 and the aladin usb token drivers.

Thanks,
Daniel

danielscoggins
 
Posts: 15
Joined: Fri Jul 03, 2020 11:48 am

Mon Aug 31, 2020 1:12 am

Hi Daniel,

Ok, glad to hear that your issue has been resolved!
If you encounter any issues related to our product in the future, just feel free to let us know.
Wish you all the best!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF

cron