]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add check for public key presence on sm2 signing
authorNeil Horman <nhorman@openssl.org>
Mon, 18 Mar 2024 18:59:32 +0000 (14:59 -0400)
committerTomas Mraz <tomas@openssl.org>
Tue, 9 Apr 2024 18:38:58 +0000 (20:38 +0200)
commitd6a8adeccdb8188517c5a84d35b79ef826176472
treedca68d3d5df758414252b154f53e4becdd03af89
parentbeb82177ddcd4b536544ceec92bb53f4d85d8e91
Add check for public key presence on sm2 signing

SM2 requires that the public EC_POINT be present in a key when signing.
If its not there we crash on a NULL pointer.  Add a check to ensure that
its present, and raise an error if its not

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23887)
crypto/sm2/sm2_sign.c
test/sm2_internal_test.c