tls13groupselection_test.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. /*
  2. * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #include "testutil.h"
  10. #include "helpers/ssltestlib.h"
  11. #include <openssl/objects.h>
  12. #define TEST_true_or_end(a) if (!TEST_true(a)) \
  13. goto end;
  14. #define TEST_false_or_end(a) if (!TEST_false(a)) \
  15. goto end;
  16. #define SERVER_PREFERENCE 1
  17. #define CLIENT_PREFERENCE 0
  18. #define WORK_ON_SSL_OBJECT 1
  19. #define WORK_ON_CONTEXT 0
  20. #define SYNTAX_FAILURE "SYNTAX_FAILURE"
  21. #define NEGOTIATION_FAILURE "NEGOTIATION_FAILURE"
  22. typedef enum TEST_TYPE {
  23. TEST_NEGOTIATION_FAILURE = 0,
  24. TEST_NEGOTIATION_SUCCESS = 1,
  25. TEST_SYNTAX_FAILURE = 2
  26. } TEST_TYPE;
  27. typedef enum SERVER_RESPONSE {
  28. HRR = 0,
  29. INIT = 1,
  30. SH = 2
  31. } SERVER_RESPONSE;
  32. static char *cert = NULL;
  33. static char *privkey = NULL;
  34. struct tls13groupselection_test_st {
  35. const char *client_groups;
  36. const char *server_groups;
  37. const int preference;
  38. const char *expected_group;
  39. const enum SERVER_RESPONSE expected_server_response;
  40. };
  41. static const struct tls13groupselection_test_st tls13groupselection_tests[] =
  42. {
  43. /*
  44. * (A) Test with no explicit key share (backward compatibility)
  45. * Key share is implicitly sent for first client group
  46. * Test (implicitly) that the key share group is used
  47. */
  48. { "secp384r1:secp521r1:X25519:prime256v1:X448", /* test 0 */
  49. "X25519:secp521r1:secp384r1:prime256v1:X448",
  50. CLIENT_PREFERENCE,
  51. "secp384r1", SH
  52. },
  53. { "secp521r1:secp384r1:X25519:prime256v1:X448", /* test 1 */
  54. "X25519:secp521r1:secp384r1:prime256v1:X448",
  55. SERVER_PREFERENCE,
  56. "secp521r1", SH
  57. },
  58. /*
  59. * (B) No explicit key share test (backward compatibility)
  60. * Key share is implicitly sent for first client group
  61. * Check HRR if server does not support key share group
  62. */
  63. { "secp521r1:secp384r1:X25519:prime256v1:X448", /* test 2 */
  64. "X25519:secp384r1:prime256v1",
  65. CLIENT_PREFERENCE,
  66. "secp384r1", HRR
  67. },
  68. { "secp521r1:secp384r1:X25519:prime256v1:X448", /* test 3 */
  69. "X25519:secp384r1:prime256v1",
  70. SERVER_PREFERENCE,
  71. "x25519", HRR
  72. },
  73. /*
  74. * (C) Explicit key shares, SH tests
  75. * Test key share selection as function of client-/server-preference
  76. * Test (implicitly) that multiple key shares are generated
  77. * Test (implicitly) that multiple tuples don't influence the client
  78. * Test (implicitly) that key share prefix doesn't influence the server
  79. */
  80. { "secp521r1:secp384r1:*X25519/*prime256v1:X448", /* test 4 */
  81. "secp521r1:*prime256v1:X25519:X448",
  82. CLIENT_PREFERENCE,
  83. "x25519", SH
  84. },
  85. { "secp521r1:secp384r1:*X25519/*prime256v1:X448", /* test 5 */
  86. "secp521r1:*prime256v1:X25519:X448",
  87. SERVER_PREFERENCE,
  88. "secp256r1", SH
  89. },
  90. /*
  91. * (D) Explicit key shares, HRR tests
  92. * Check that HRR is issued if group in first tuple
  93. * is supported but no key share is available for the tuple
  94. */
  95. { "secp521r1:secp384r1:*X25519:prime256v1:*X448", /* test 6 */
  96. "secp384r1:secp521r1:prime256v1/X25519:X448",
  97. CLIENT_PREFERENCE,
  98. "secp521r1", HRR
  99. },
  100. { "secp521r1:secp384r1:*X25519:prime256v1:*X448", /* test 7 */
  101. "secp384r1:secp521r1:prime256v1/X25519:X448",
  102. SERVER_PREFERENCE,
  103. "secp384r1", HRR
  104. },
  105. /*
  106. * (E) Multiple tuples tests, client without tuple delimiters
  107. * Check that second tuple is evaluated if there isn't any match
  108. * first tuple
  109. */
  110. { "*X25519:prime256v1:*X448", /* test 8 */
  111. "secp521r1:secp384r1/X448:X25519",
  112. CLIENT_PREFERENCE,
  113. "x25519", SH
  114. },
  115. { "*X25519:prime256v1:*X448", /* test 9 */
  116. "secp521r1:secp384r1/X448:X25519",
  117. SERVER_PREFERENCE,
  118. "x448", SH
  119. },
  120. /* (F) Check that '?' will ignore unknown group but use known group */
  121. { "*X25519:?unknown_group_123:prime256v1:*X448", /* test 10 */
  122. "secp521r1:secp384r1/X448:?unknown_group_456:?X25519",
  123. CLIENT_PREFERENCE,
  124. "x25519", SH
  125. },
  126. { "*X25519:prime256v1:*X448:?*unknown_group_789", /* test 11 */
  127. "secp521r1:secp384r1/?X448:?unknown_group_456:X25519",
  128. SERVER_PREFERENCE,
  129. "x448", SH
  130. },
  131. /*
  132. * (G) Check full backward compatibility (= don't explicitly set any groups)
  133. */
  134. { NULL, /* test 12 */
  135. NULL,
  136. CLIENT_PREFERENCE,
  137. #ifndef OPENSSL_NO_ML_KEM
  138. "X25519MLKEM768", SH
  139. #else
  140. "x25519", SH
  141. #endif
  142. },
  143. { NULL, /* test 13 */
  144. NULL,
  145. SERVER_PREFERENCE,
  146. #ifndef OPENSSL_NO_ML_KEM
  147. "X25519MLKEM768", SH
  148. #else
  149. "x25519", SH
  150. #endif
  151. },
  152. /*
  153. * (H) Check that removal of group is 'active'
  154. */
  155. { "*X25519:*X448", /* test 14 */
  156. "secp521r1:X25519:prime256v1:-X25519:secp384r1/X448",
  157. CLIENT_PREFERENCE,
  158. "x448", SH
  159. },
  160. { "*X25519:*X448", /* test 15 */
  161. "secp521r1:X25519:prime256v1:-X25519:secp384r1/X448",
  162. SERVER_PREFERENCE,
  163. "x448", SH
  164. },
  165. { "*X25519:prime256v1:*X448", /* test 16 */
  166. "X25519:prime256v1/X448:-X25519",
  167. CLIENT_PREFERENCE,
  168. "secp256r1", HRR
  169. },
  170. { "*X25519:prime256v1:*X448", /* test 17 */
  171. "X25519:prime256v1/X448:-X25519",
  172. SERVER_PREFERENCE,
  173. "secp256r1", HRR
  174. },
  175. /*
  176. * (I) Check handling of the "DEFAULT" 'pseudo group name'
  177. */
  178. { "*X25519:DEFAULT:-prime256v1:-X448", /* test 18 */
  179. "DEFAULT:-X25519:-?X25519MLKEM768",
  180. CLIENT_PREFERENCE,
  181. "secp384r1", HRR
  182. },
  183. { "*X25519:DEFAULT:-prime256v1:-X448", /* test 19 */
  184. "DEFAULT:-X25519:-?X25519MLKEM768",
  185. SERVER_PREFERENCE,
  186. "secp384r1", HRR
  187. },
  188. /*
  189. * (J) Deduplication check
  190. */
  191. { "secp521r1:X25519:prime256v1/X25519:prime256v1/X448", /* test 20 */
  192. "secp521r1:X25519:prime256v1/X25519:prime256v1/X448",
  193. CLIENT_PREFERENCE,
  194. "secp521r1", SH
  195. },
  196. { "secp521r1:X25519:prime256v1/X25519:prime256v1/X448", /* test 21 */
  197. "secp521r1:X25519:prime256v1/X25519:prime256v1/X448",
  198. SERVER_PREFERENCE,
  199. "secp521r1", SH
  200. },
  201. /*
  202. * (K) Check group removal when first entry requested a keyshare
  203. */
  204. { "*X25519:*prime256v1:-X25519", /* test 22 */
  205. "X25519:prime256v1",
  206. CLIENT_PREFERENCE,
  207. "secp256r1", SH
  208. },
  209. /*
  210. * (L) Syntax errors
  211. */
  212. { "*X25519:*prime256v1:NOTVALID", /* test 23 */
  213. "",
  214. CLIENT_PREFERENCE,
  215. SYNTAX_FAILURE
  216. },
  217. { "X25519//prime256v1", /* test 24 */
  218. "",
  219. CLIENT_PREFERENCE,
  220. SYNTAX_FAILURE
  221. },
  222. { "**X25519:*prime256v1", /* test 25 */
  223. "",
  224. CLIENT_PREFERENCE,
  225. SYNTAX_FAILURE
  226. },
  227. { "*X25519:*secp256r1:*X448:*secp521r1:*secp384r1", /* test 26 */
  228. "",
  229. CLIENT_PREFERENCE,
  230. SYNTAX_FAILURE
  231. },
  232. { "*X25519:*secp256r1:?:*secp521r1", /* test 27 */
  233. "",
  234. CLIENT_PREFERENCE,
  235. SYNTAX_FAILURE
  236. },
  237. { "*X25519:*secp256r1::secp521r1", /* test 28 */
  238. "",
  239. CLIENT_PREFERENCE,
  240. SYNTAX_FAILURE
  241. },
  242. { ":*secp256r1:secp521r1", /* test 29 */
  243. "",
  244. CLIENT_PREFERENCE,
  245. SYNTAX_FAILURE
  246. },
  247. { "*secp256r1:secp521r1:", /* test 30 */
  248. "",
  249. CLIENT_PREFERENCE,
  250. SYNTAX_FAILURE
  251. },
  252. { "/secp256r1/secp521r1", /* test 31 */
  253. "",
  254. CLIENT_PREFERENCE,
  255. SYNTAX_FAILURE
  256. },
  257. { "secp256r1/secp521r1/", /* test 32 */
  258. "",
  259. CLIENT_PREFERENCE,
  260. SYNTAX_FAILURE
  261. },
  262. { "X25519:??secp256r1:X448", /* test 33 */
  263. "",
  264. CLIENT_PREFERENCE,
  265. SYNTAX_FAILURE
  266. },
  267. { "X25519:secp256r1:**X448", /* test 34 */
  268. "",
  269. CLIENT_PREFERENCE,
  270. SYNTAX_FAILURE
  271. },
  272. { "--X25519:secp256r1:X448", /* test 35 */
  273. "",
  274. CLIENT_PREFERENCE,
  275. SYNTAX_FAILURE
  276. },
  277. { "-DEFAULT", /* test 36 */
  278. "",
  279. CLIENT_PREFERENCE,
  280. SYNTAX_FAILURE
  281. },
  282. { "?DEFAULT", /* test 37 */
  283. "",
  284. CLIENT_PREFERENCE,
  285. SYNTAX_FAILURE
  286. },
  287. /*
  288. * Negotiation Failures
  289. * No overlapping groups between client and server
  290. */
  291. /* test 38 remove all groups */
  292. { "X25519:secp256r1:X448:secp521r1:-X448:-secp256r1:-X25519:-secp521r1",
  293. "",
  294. CLIENT_PREFERENCE,
  295. NEGOTIATION_FAILURE, INIT
  296. },
  297. { "secp384r1:secp521r1:X25519", /* test 39 */
  298. "prime256v1:X448",
  299. CLIENT_PREFERENCE,
  300. NEGOTIATION_FAILURE, INIT
  301. },
  302. { "secp521r1:secp384r1:X25519", /* test 40 */
  303. "prime256v1:X448",
  304. SERVER_PREFERENCE,
  305. NEGOTIATION_FAILURE, INIT
  306. },
  307. /*
  308. * These are allowed
  309. * "X25519/prime256v1:-X448", "X25519:-*X25519:*prime256v1, "*DEFAULT"
  310. */
  311. /*
  312. * Tests to show that spaces between tuples are allowed
  313. */
  314. { "secp521r1:X25519 / prime256v1/X25519 / prime256v1/X448", /* test 41 */
  315. "secp521r1:X25519 / prime256v1/X25519 / prime256v1/X448",
  316. CLIENT_PREFERENCE,
  317. "secp521r1", SH
  318. },
  319. { "secp521r1 / prime256v1:X25519 / prime256v1/X448", /* test 42 */
  320. "secp521r1 / prime256v1:X25519 / prime256v1/X448",
  321. SERVER_PREFERENCE,
  322. "secp521r1", SH
  323. },
  324. /*
  325. * Not a syntax error, but invalid because brainpoolP256r1 is the only
  326. * key share and is not valid in TLSv1.3
  327. */
  328. { "*brainpoolP256r1:X25519", /* test 43 */
  329. "X25519",
  330. SERVER_PREFERENCE,
  331. NEGOTIATION_FAILURE, INIT
  332. }
  333. };
  334. static void server_response_check_cb(int write_p, int version,
  335. int content_type, const void *buf,
  336. size_t len, SSL *ssl, void *arg)
  337. {
  338. /* Cast arg to SERVER_RESPONSE */
  339. enum SERVER_RESPONSE *server_response = (enum SERVER_RESPONSE *)arg;
  340. /* Prepare check for HRR */
  341. const uint8_t *incoming_random = (uint8_t *)buf + 6;
  342. const uint8_t magic_HRR_random[32] = { 0xCF, 0x21, 0xAD, 0x74, 0xE5, 0x9A, 0x61, 0x11,
  343. 0xBE, 0x1D, 0x8C, 0x02, 0x1E, 0x65, 0xB8, 0x91,
  344. 0xC2, 0xA2, 0x11, 0x16, 0x7A, 0xBB, 0x8C, 0x5E,
  345. 0x07, 0x9E, 0x09, 0xE2, 0xC8, 0xA8, 0x33, 0x9C };
  346. /* Did a server hello arrive? */
  347. if (write_p == 0 && /* Incoming data... */
  348. content_type == SSL3_RT_HANDSHAKE && /* carrying a handshake record type ... */
  349. version == TLS1_3_VERSION && /* for TLSv1.3 ... */
  350. ((uint8_t *)buf)[0] == SSL3_MT_SERVER_HELLO) { /* with message type "ServerHello" */
  351. /* Check what it is: SH or HRR (compare the 'random' data field with HRR magic number) */
  352. if (memcmp((void *)incoming_random, (void *)magic_HRR_random, 32) == 0)
  353. *server_response *= HRR;
  354. else
  355. *server_response *= SH;
  356. }
  357. }
  358. static int test_invalidsyntax(const struct tls13groupselection_test_st *current_test_vector,
  359. int ssl_or_ctx)
  360. {
  361. int ok = 0;
  362. SSL_CTX *client_ctx = NULL, *server_ctx = NULL;
  363. SSL *clientssl = NULL, *serverssl = NULL;
  364. if (!TEST_ptr(current_test_vector->client_groups)
  365. || !TEST_size_t_ne(strlen(current_test_vector->client_groups), 0))
  366. goto end;
  367. /* Creation of the contexts */
  368. TEST_true_or_end(create_ssl_ctx_pair(NULL, TLS_server_method(),
  369. TLS_client_method(),
  370. TLS1_VERSION, 0,
  371. &server_ctx, &client_ctx,
  372. cert, privkey));
  373. /* Customization of the contexts */
  374. if (ssl_or_ctx == WORK_ON_CONTEXT)
  375. TEST_false_or_end(SSL_CTX_set1_groups_list(client_ctx,
  376. current_test_vector->client_groups));
  377. /* Creation of the SSL objects */
  378. TEST_true_or_end(create_ssl_objects(server_ctx, client_ctx,
  379. &serverssl, &clientssl,
  380. NULL, NULL));
  381. /* Customization of the SSL objects */
  382. if (ssl_or_ctx == WORK_ON_SSL_OBJECT)
  383. TEST_false_or_end(SSL_set1_groups_list(clientssl, current_test_vector->client_groups));
  384. ok = 1;
  385. end:
  386. SSL_free(serverssl);
  387. SSL_free(clientssl);
  388. SSL_CTX_free(server_ctx);
  389. SSL_CTX_free(client_ctx);
  390. return ok;
  391. }
  392. static int test_groupnegotiation(const struct tls13groupselection_test_st *current_test_vector,
  393. int ssl_or_ctx, TEST_TYPE test_type)
  394. {
  395. int ok = 0;
  396. int negotiated_group_client = 0;
  397. int negotiated_group_server = 0;
  398. const char *group_name_client;
  399. SSL_CTX *client_ctx = NULL, *server_ctx = NULL;
  400. SSL *clientssl = NULL, *serverssl = NULL;
  401. enum SERVER_RESPONSE server_response;
  402. /* Creation of the contexts */
  403. TEST_true_or_end(create_ssl_ctx_pair(NULL, TLS_server_method(),
  404. TLS_client_method(),
  405. TLS1_VERSION, 0,
  406. &server_ctx, &client_ctx,
  407. cert, privkey));
  408. /* Customization of the contexts */
  409. if (ssl_or_ctx == WORK_ON_CONTEXT) {
  410. if (current_test_vector->client_groups != NULL) {
  411. TEST_true_or_end(SSL_CTX_set1_groups_list(client_ctx,
  412. current_test_vector->client_groups));
  413. }
  414. if (current_test_vector->server_groups != NULL) {
  415. TEST_true_or_end(SSL_CTX_set1_groups_list(server_ctx,
  416. current_test_vector->server_groups));
  417. }
  418. TEST_true_or_end(SSL_CTX_set_min_proto_version(client_ctx, TLS1_3_VERSION));
  419. TEST_true_or_end(SSL_CTX_set_min_proto_version(server_ctx, TLS1_3_VERSION));
  420. if (current_test_vector->preference == SERVER_PREFERENCE)
  421. SSL_CTX_set_options(server_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
  422. }
  423. /* Creation of the SSL objects */
  424. if (!TEST_true(create_ssl_objects(server_ctx, client_ctx,
  425. &serverssl, &clientssl,
  426. NULL, NULL)))
  427. goto end;
  428. /* Customization of the SSL objects */
  429. if (ssl_or_ctx == WORK_ON_SSL_OBJECT) {
  430. if (current_test_vector->client_groups != NULL)
  431. TEST_true_or_end(SSL_set1_groups_list(clientssl, current_test_vector->client_groups));
  432. if (current_test_vector->server_groups != NULL)
  433. TEST_true_or_end(SSL_set1_groups_list(serverssl, current_test_vector->server_groups));
  434. TEST_true_or_end(SSL_set_min_proto_version(clientssl, TLS1_3_VERSION));
  435. TEST_true_or_end(SSL_set_min_proto_version(serverssl, TLS1_3_VERSION));
  436. if (current_test_vector->preference == SERVER_PREFERENCE)
  437. SSL_set_options(serverssl, SSL_OP_CIPHER_SERVER_PREFERENCE);
  438. }
  439. /* We set the message callback on the client side (which checks SH/HRR) */
  440. server_response = INIT; /* Variable to hold server response info */
  441. SSL_set_msg_callback_arg(clientssl, &server_response); /* add it to the callback */
  442. SSL_set_msg_callback(clientssl, server_response_check_cb); /* and activate callback */
  443. /* Creating a test connection */
  444. if (test_type == TEST_NEGOTIATION_SUCCESS) {
  445. TEST_true_or_end(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE));
  446. /*
  447. * Checking that the negotiated group matches our expectation
  448. * and must be identical on server and client
  449. * and must be expected SH or HRR
  450. */
  451. negotiated_group_client = SSL_get_negotiated_group(clientssl);
  452. negotiated_group_server = SSL_get_negotiated_group(serverssl);
  453. group_name_client = SSL_group_to_name(clientssl, negotiated_group_client);
  454. if (!TEST_int_eq(negotiated_group_client, negotiated_group_server))
  455. goto end;
  456. if (!TEST_int_eq((int)current_test_vector->expected_server_response, (int)server_response))
  457. goto end;
  458. if (TEST_str_eq(group_name_client, current_test_vector->expected_group))
  459. ok = 1;
  460. } else {
  461. TEST_false_or_end(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE));
  462. if (test_type == TEST_NEGOTIATION_FAILURE &&
  463. !TEST_int_eq((int)current_test_vector->expected_server_response,
  464. (int)server_response))
  465. goto end;
  466. ok = 1;
  467. }
  468. end:
  469. SSL_free(serverssl);
  470. SSL_free(clientssl);
  471. SSL_CTX_free(server_ctx);
  472. SSL_CTX_free(client_ctx);
  473. return ok;
  474. }
  475. static int tls13groupselection_test(int i)
  476. {
  477. int testresult = 1; /* Assume the test will succeed */
  478. int res = 0;
  479. TEST_TYPE test_type = TEST_NEGOTIATION_SUCCESS;
  480. /*
  481. * Call the code under test, once such that the ssl object is used and
  482. * once such that the ctx is used. If any of the tests fail (= return 0),
  483. * the end result will be 0 thanks to multiplication
  484. */
  485. TEST_info("==> Running TLSv1.3 test %d", i);
  486. if (strncmp(tls13groupselection_tests[i].expected_group,
  487. SYNTAX_FAILURE, sizeof(SYNTAX_FAILURE)) == 0)
  488. test_type = TEST_SYNTAX_FAILURE;
  489. else if (strncmp(tls13groupselection_tests[i].expected_group,
  490. NEGOTIATION_FAILURE, sizeof(NEGOTIATION_FAILURE)) == 0)
  491. test_type = TEST_NEGOTIATION_FAILURE;
  492. if (test_type == TEST_SYNTAX_FAILURE)
  493. res = test_invalidsyntax(&tls13groupselection_tests[i],
  494. WORK_ON_SSL_OBJECT);
  495. else
  496. res = test_groupnegotiation(&tls13groupselection_tests[i],
  497. WORK_ON_SSL_OBJECT, test_type);
  498. if (!res)
  499. TEST_error("====> [ERROR] TLSv1.3 test %d with WORK_ON_SSL_OBJECT failed", i);
  500. testresult *= res;
  501. if (test_type == TEST_SYNTAX_FAILURE)
  502. res = test_invalidsyntax(&tls13groupselection_tests[i],
  503. WORK_ON_CONTEXT);
  504. else
  505. res = test_groupnegotiation(&tls13groupselection_tests[i],
  506. WORK_ON_CONTEXT, test_type);
  507. if (!res)
  508. TEST_error("====> [ERROR] TLSv1.3 test %d with WORK_ON_CONTEXT failed", i);
  509. testresult *= res;
  510. return testresult;
  511. }
  512. int setup_tests(void)
  513. {
  514. if (!TEST_ptr(cert = test_get_argument(0))
  515. || !TEST_ptr(privkey = test_get_argument(1)))
  516. return 0;
  517. ADD_ALL_TESTS(tls13groupselection_test, OSSL_NELEM(tls13groupselection_tests));
  518. return 1;
  519. }