[PATCH] gpgsm: Allow ECDSA P-384 and P-521 certificates with SHA-256
Szymon Dowkontt
szdowk at vsa.com.pl
Fri Nov 13 14:20:35 CET 2026
Hello
I would like to propose extending the ECDSA digest-length exceptions in sm/certcheck.c,
following commit 35549cea95638d87e1c6f2b25fe1ce6395d52d58, which addressed
T8306 for P-521 with SHA-384.
The attached patch adds two combinations:
- P-384 with SHA-256
- P-521 with SHA-256
It also explicitly limits these exceptions to GCRY_PK_ECC, preserving the existing DSA
checks.
For these combinations, do_encode_md() currently calls log_error() but continues to
signature verification. This can produce an error even when the cryptographic verification
succeeds, as described in T8306.
This work originated while enabling S/MIME signing with the Polish national e-ID card ("e-
dowód"), using the PWPW PKCS#11 module and patched gnupg-pkcs11-scd and pkcs11-
helper. The complete setup successfully signs S/MIME messages with our earlier, broader
certcheck.c fix.
That successful integration test should not be taken as separate confirmation of both
combinations added by this narrower patch.
For reference, I initially submitted the change to the GitHub mirror:
https://github.com/gpg/gnupg/pull/29
Best regards,
Szymon Dowkontt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20261113/a8909dd4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sd-202611-29.patch
Type: text/x-patch
Size: 1354 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20261113/a8909dd4/attachment.bin>
More information about the Gnupg-devel
mailing list