You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Hi,
I have a PDF file signed with ecdsa-with-SHA1 object id: 1.2.840.10045.4.1.
When I try to verify the digital signature with openpdf version "1.3.26"
Exception is thrown:
ExceptionConverter: java.security.NoSuchAlgorithmException: SHA1with1.2.840.10045.4.1 Signature not available
at java.security.Signature.getInstance(Signature.java:228)
at com.lowagie.text.pdf.PdfPKCS7.(PdfPKCS7.java:544)
at com.lowagie.text.pdf.AcroFields.verifySignature(AcroFields.java:2344)
at com.lowagie.text.pdf.AcroFields.verifySignature(AcroFields.java:2299)
By researching the openpdf source code and online resources, I came to conclusion that latest version of
open pdf does not have a support for ecdsa-with-SHA1 object id: 1.2.840.10045.4.1 http://oid-info.com/get/1.2.840.10045.4.1
As said on StackOverflow, when oid is added through reflection to field "algorithmNames" on
com.lowagie.text.pdf.PdfPKCS7 class everything works.
I only added this one particular oid.
My question is, is this fix valid and will this feature be added in future releases (alongside with other ECDSA oids)?
Thank you in advance!
To Reproduce
Code to reproduce the issue (signed PDF is company legacy and currently cannot be shared)
Is comment only for future reference that problem is in
"com.lowagie.text.pdf.PdfPKCS7" class
or in it is provided solution?
I looked upon provided class and concluded that problem is still there.
Description
Hi,
I have a PDF file signed with ecdsa-with-SHA1 object id: 1.2.840.10045.4.1.
When I try to verify the digital signature with openpdf version "1.3.26"
Exception is thrown:
ExceptionConverter: java.security.NoSuchAlgorithmException: SHA1with1.2.840.10045.4.1 Signature not available
at java.security.Signature.getInstance(Signature.java:228)
at com.lowagie.text.pdf.PdfPKCS7.(PdfPKCS7.java:544)
at com.lowagie.text.pdf.AcroFields.verifySignature(AcroFields.java:2344)
at com.lowagie.text.pdf.AcroFields.verifySignature(AcroFields.java:2299)
By researching the openpdf source code and online resources, I came to conclusion that latest version of
open pdf does not have a support for ecdsa-with-SHA1 object id: 1.2.840.10045.4.1
http://oid-info.com/get/1.2.840.10045.4.1
Problem is also mentioned on StackOverflow (for iText free version):
https://stackoverflow.com/questions/46346144/digital-signature-verification-with-itext-not-working
As said on StackOverflow, when oid is added through reflection to field "algorithmNames" on
com.lowagie.text.pdf.PdfPKCS7 class everything works.
I only added this one particular oid.
My question is, is this fix valid and will this feature be added in future releases (alongside with other ECDSA oids)?
Thank you in advance!
To Reproduce
Code to reproduce the issue (signed PDF is company legacy and currently cannot be shared)
package openpdf.sample;
import java.lang.reflect.Field;
import java.security.Security;
import java.util.HashMap;
import java.util.List;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import com.lowagie.text.pdf.AcroFields;
import com.lowagie.text.pdf.PdfPKCS7;
import com.lowagie.text.pdf.PdfReader;
public class DigitalSignatureHelper {
}
Expected behavior
To validate PDF file signed with ecdsa-with-SHA1 object id: 1.2.840.10045.4.1
successfully
The text was updated successfully, but these errors were encountered: