diff options
author | Jamie Cui <jamie.cui@outlook.com> | 2024-08-22 05:41:50 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-08-29 15:28:27 +0200 |
commit | 25bd0c77bfa7e8127faafda2b082432ea58f9570 (patch) | |
tree | cd323b8c8647a3e01008f8a26af4341ed30b4b88 /test/endecode_test.c | |
parent | EVP_MD_size() updates (diff) | |
download | openssl-25bd0c77bfa7e8127faafda2b082432ea58f9570.tar.xz openssl-25bd0c77bfa7e8127faafda2b082432ea58f9570.zip |
Fix decoder error on SM2 private key
Added sm2 testcases to endecode_test.c.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25266)
Diffstat (limited to 'test/endecode_test.c')
-rw-r--r-- | test/endecode_test.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c index e28fd41b75..97576cedc7 100644 --- a/test/endecode_test.c +++ b/test/endecode_test.c @@ -1032,6 +1032,10 @@ DOMAIN_KEYS(ECExplicitTri2G); IMPLEMENT_TEST_SUITE(ECExplicitTri2G, "EC", 0) IMPLEMENT_TEST_SUITE_LEGACY(ECExplicitTri2G, "EC") # endif +# ifndef OPENSSL_NO_SM2 +KEYS(SM2); +IMPLEMENT_TEST_SUITE(SM2, "SM2", 0) +# endif KEYS(ED25519); IMPLEMENT_TEST_SUITE(ED25519, "ED25519", 1) KEYS(ED448); @@ -1397,6 +1401,9 @@ int setup_tests(void) MAKE_DOMAIN_KEYS(ECExplicitTriNamedCurve, "EC", ec_explicit_tri_params_nc); MAKE_DOMAIN_KEYS(ECExplicitTri2G, "EC", ec_explicit_tri_params_explicit); # endif +# ifndef OPENSSL_NO_SM2 + MAKE_KEYS(SM2, "SM2", NULL); +# endif MAKE_KEYS(ED25519, "ED25519", NULL); MAKE_KEYS(ED448, "ED448", NULL); MAKE_KEYS(X25519, "X25519", NULL); @@ -1443,6 +1450,9 @@ int setup_tests(void) ADD_TEST_SUITE(ECExplicitTri2G); ADD_TEST_SUITE_LEGACY(ECExplicitTri2G); # endif +# ifndef OPENSSL_NO_SM2 + ADD_TEST_SUITE(SM2); +# endif ADD_TEST_SUITE(ED25519); ADD_TEST_SUITE(ED448); ADD_TEST_SUITE(X25519); @@ -1500,6 +1510,9 @@ void cleanup_tests(void) FREE_DOMAIN_KEYS(ECExplicitTriNamedCurve); FREE_DOMAIN_KEYS(ECExplicitTri2G); # endif +# ifndef OPENSSL_NO_SM2 + FREE_KEYS(SM2); +# endif FREE_KEYS(ED25519); FREE_KEYS(ED448); FREE_KEYS(X25519); |