A null error occurred when executing the pdfsign function with the pkcs#12 certificate. However, it succeeds when run with a different pkcs#12 certificate.
I have a certificate that works and one that doesn’t. What’s the difference?
Would you kindly also share your sample PFX files with us (both working and non-working) along with sample PDF document so that we can test the scenario in our environment and address it accordingly. Also, please try to share the code snippet in text format here in the post editor because we were not able to check and view it in the DOCX file (may be the file is corrupted or encoding is different).
It seems difficult to share PFX files. To explain the situation in more detail, there is a site that converts the certificate format. If you convert PFX to DER format and then change DER back to PFX, it will be successful.
So, an error occurs with the PFX certificate, and success occurs when the PFX is converted to a converted PFX through the conversion process, so I suspect that the new format according to the conversion site is not implemented in the aspose.pdf code.
The PFX files are needed to investigate the issue accordingly. You can please share them in .zip format OR please let us know the steps on how to create some so that we can further proceed to assist you accordingly. Also, have you tried with 25.1 version of the API?
I am attaching a PFX certificate for other tests. Two certificates are attached. This is a pfx certificate that fails and a pfx certificate that succeeds. The sample source was also rewritten. certificate.zip (13.0 KB)
We tested using the latest version of the API and could not notice any issues. Please try using the latest version and if you still notice any issues, please let us know.
I attached two certificates, and did they both succeed? (cert.pfx, tradesign.pfx) I proceeded to the latest version 25.1, and the error occurs as shown below. Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not vailableerror:java.
Yes, both were success and we also shared an output with you generated with tradesign.pfx certificate. Can you please try creating a sample console application and test only sign functionality in it with the minimal code to see if issue is happening?
@asad.ali
Please can you provide sample code that you have tested? What additional java versions have you tested?
I tested with oracle open jdk 11 version.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.