Skip to content

Commit a500776

Browse files
committed
Use server_sm2_cert_der and refresh certs_test_sm.h for record-size SM test
test_record_size_matches_build_message loaded the embedded server_sm2_der buffer, which is generated from the stale certs/sm2/server-sm2.der (still the Feb 2023 / Nov 2025 cert). On a minimal SM build the SM TLS handshake aborts with -151 ASN_AFTER_DATE_E and the test fails. Switch the test to load server_sm2_cert_der, which tracks the current 2026-2028 SM2 server cert, and regenerate wolfssl/certs_test_sm.h via gencertbuf.pl so ca_sm2_der is also refreshed against the in-tree CA cert.
1 parent 6fc100b commit a500776

2 files changed

Lines changed: 1791 additions & 1810 deletions

File tree

tests/api/test_tls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,8 @@ int test_record_size_matches_build_message(void)
11971197
ExpectIntEQ(test_memio_setup_ex(&test_ctx, &ctx_c, &ctx_s,
11981198
&ssl_c, &ssl_s, versions[v].client, versions[v].server,
11991199
(byte*)ca_sm2_der, (int)sizeof_ca_sm2_der,
1200-
(byte*)server_sm2_der, (int)sizeof_server_sm2_der,
1200+
(byte*)server_sm2_cert_der,
1201+
(int)sizeof_server_sm2_cert_der,
12011202
(byte*)server_sm2_priv_der,
12021203
(int)sizeof_server_sm2_priv_der), 0);
12031204
if (versions[v].is_tls13) {

0 commit comments

Comments
 (0)