|
127 | 127 | hello_retry_request/1, |
128 | 128 | custom_groups/0, |
129 | 129 | custom_groups/1, |
| 130 | + mlkem_groups/0, |
| 131 | + mlkem_groups/1, |
130 | 132 | hello_retry_client_auth/0, |
131 | 133 | hello_retry_client_auth/1, |
132 | 134 | hello_retry_client_auth_empty_cert_accepted/0, |
@@ -180,7 +182,7 @@ groups() -> |
180 | 182 | {rsa_pss_rsae_1_3, [parallel], all_version_tests() ++ rsa_tests() ++ tls_1_3_tests() ++ tls_1_3_rsa_tests()}, |
181 | 183 | {rsa_pss_pss, [parallel], all_version_tests()}, |
182 | 184 | {rsa_pss_pss_1_3, [parallel], all_version_tests() ++ rsa_tests() ++ tls_1_3_tests() ++ tls_1_3_rsa_tests()}, |
183 | | - {ecdsa_1_3, [parallel], all_version_tests() ++ tls_1_3_tests() ++ partial_chain_with_ecdsa() |
| 185 | + {ecdsa_1_3, [parallel], all_version_tests() ++ tls_1_3_tests() ++ partial_chain_with_ecdsa() ++ |
184 | 186 | [signature_algorithms_bad_curve_secp256r1, |
185 | 187 | signature_algorithms_bad_curve_secp384r1, |
186 | 188 | signature_algorithms_bad_curve_secp521r1]}, |
@@ -213,6 +215,7 @@ tls_1_3_tests() -> |
213 | 215 | [ |
214 | 216 | hello_retry_request, |
215 | 217 | custom_groups, |
| 218 | + mlkem_groups, |
216 | 219 | client_auth_no_suitable_chain, |
217 | 220 | cert_auth_in_first_ca, |
218 | 221 | hello_retry_client_auth, |
@@ -488,7 +491,7 @@ end_per_group(GroupName, Config) -> |
488 | 491 | ssl_test_lib:end_per_group(GroupName, Config). |
489 | 492 |
|
490 | 493 |
|
491 | | -init_per_group(mlkem_groups, Config) -> |
| 494 | +init_per_testcase(mlkem_groups, Config) -> |
492 | 495 | case [] =/= crypto:supports(kems) of |
493 | 496 | true -> |
494 | 497 | Config; |
@@ -1364,6 +1367,26 @@ custom_groups(Config) -> |
1364 | 1367 | ClientOpts = [{supported_groups,[secp384r1, secp256r1, x25519]}|ClientOpts1], |
1365 | 1368 | ssl_test_lib:basic_test(ClientOpts, ServerOpts, Config). |
1366 | 1369 |
|
| 1370 | +%%-------------------------------------------------------------------- |
| 1371 | +mlkem_groups() -> |
| 1372 | + [{doc,"Test that ssl server can select a common group for key-exchange"}]. |
| 1373 | + |
| 1374 | +mlkem_groups(Config) -> |
| 1375 | + ClientOpts0 = ssl_test_lib:ssl_options(client_cert_opts, Config), |
| 1376 | + ServerOpts0 = ssl_test_lib:ssl_options(server_cert_opts, Config), |
| 1377 | + |
| 1378 | + mlkem_kex(mlkem512, ClientOpts0, ServerOpts0, Config), |
| 1379 | + mlkem_kex(mlkem768, ClientOpts0, ServerOpts0, Config), |
| 1380 | + mlkem_kex(mlkem1024, ClientOpts0, ServerOpts0, Config). |
| 1381 | + |
| 1382 | +mlkem_kex(MLKem, ClientOpts0, ServerOpts0, Config) -> |
| 1383 | + %% Set versions |
| 1384 | + ServerOpts = [{versions, ['tlsv1.3']}, |
| 1385 | + {supported_groups, [MLKem]}|ServerOpts0], |
| 1386 | + ClientOpts1 = [{versions, ['tlsv1.2','tlsv1.3']}|ClientOpts0], |
| 1387 | + ClientOpts = [{supported_groups,[ MLKem, secp384r1, secp256r1, x25519]}|ClientOpts1], |
| 1388 | + ssl_test_lib:basic_test(ClientOpts, ServerOpts, Config). |
| 1389 | + |
1367 | 1390 | %%-------------------------------------------------------------------- |
1368 | 1391 | %% Triggers a Server Alert as ssl client does not have a certificate with a |
1369 | 1392 | %% signature algorithm supported by the server (signature_algorithms_cert extension |
|
0 commit comments