Massa Alfonso
2016-07-26 11:06:04 UTC
Hi,
I have a pdf file signed with Elliptic curve Digital Signature Algorithm (DSA) coupled with the Secure Hashing Algorithm (SHA256) algorithm (oid: 1.2.840.10045.4.3.2) .
When I try and verify the signature with this code (iText 5.5.9):
PdfPKCS7 pk = af.verifySignature(name, "BC");
I get the following:
no such algorithm: SHA256with1.2.840.10045.4.3.2 for provider BC
Is it a wanted feature that itext does not support SHA256withECDSA?
When I modify com.itextpdf.text.pdf.security.EncryptionAlgorithms class with:
algorithmNames.put("1.2.840.10045.4.1", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.2", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.3", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.4", "ECDSA");
it seems to work.
I wonder whether this solution is correct.
Will iText support SHA256withECDSA in future?
Best regards
Alfonso
AVVISO DI RISERVATEZZA Informazioni riservate possono essere contenute nel messaggio o nei suoi allegati. Se non siete i destinatari indicati nel messaggio, o responsabili per la sua consegna alla persona, o se avete ricevuto il messaggio per errore, siete pregati di non trascriverlo, copiarlo o inviarlo ad alcuno. In tal caso vi invitiamo a cancellare il messaggio ed i suoi allegati. Grazie.
CONFIDENTIALITY NOTICE Confidential information may be contained in this message or in its attachments. If you are not the addressee indicated in this message, or responsible for message delivering to that person, or if you have received this message in error, you may not transcribe, copy or deliver this message to anyone. In that case, you should delete this message and its attachments. Thank you.
I have a pdf file signed with Elliptic curve Digital Signature Algorithm (DSA) coupled with the Secure Hashing Algorithm (SHA256) algorithm (oid: 1.2.840.10045.4.3.2) .
When I try and verify the signature with this code (iText 5.5.9):
PdfPKCS7 pk = af.verifySignature(name, "BC");
I get the following:
no such algorithm: SHA256with1.2.840.10045.4.3.2 for provider BC
Is it a wanted feature that itext does not support SHA256withECDSA?
When I modify com.itextpdf.text.pdf.security.EncryptionAlgorithms class with:
algorithmNames.put("1.2.840.10045.4.1", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.2", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.3", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.4", "ECDSA");
it seems to work.
I wonder whether this solution is correct.
Will iText support SHA256withECDSA in future?
Best regards
Alfonso
AVVISO DI RISERVATEZZA Informazioni riservate possono essere contenute nel messaggio o nei suoi allegati. Se non siete i destinatari indicati nel messaggio, o responsabili per la sua consegna alla persona, o se avete ricevuto il messaggio per errore, siete pregati di non trascriverlo, copiarlo o inviarlo ad alcuno. In tal caso vi invitiamo a cancellare il messaggio ed i suoi allegati. Grazie.
CONFIDENTIALITY NOTICE Confidential information may be contained in this message or in its attachments. If you are not the addressee indicated in this message, or responsible for message delivering to that person, or if you have received this message in error, you may not transcribe, copy or deliver this message to anyone. In that case, you should delete this message and its attachments. Thank you.