diff options
author | tb <> | 2025-06-15 09:44:57 +0000 |
---|---|---|
committer | tb <> | 2025-06-15 09:44:57 +0000 |
commit | dd1a51a33e48c730852eeb05629bc51aff2889c9 (patch) | |
tree | 4b20eed5af54842f765d6d70c523729e4cd6d223 /src | |
parent | 8a2e8ae318a9c09e1927c3ee1feed2bc1c8e3daa (diff) | |
download | openbsd-dd1a51a33e48c730852eeb05629bc51aff2889c9.tar.gz openbsd-dd1a51a33e48c730852eeb05629bc51aff2889c9.tar.bz2 openbsd-dd1a51a33e48c730852eeb05629bc51aff2889c9.zip |
tlsfuzzer: adjust test filenames to upstream churn.
Requires py3-tlsfuzzer-20250516 to work
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py | 308 |
1 files changed, 154 insertions, 154 deletions
diff --git a/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py b/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py index 91aedad165..ff678ec9a8 100644 --- a/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py +++ b/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: tlsfuzzer.py,v 1.56 2024/09/18 19:12:37 tb Exp $ | 1 | # $OpenBSD: tlsfuzzer.py,v 1.57 2025/06/15 09:44:57 tb Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 2020 Theo Buehler <tb@openbsd.org> | 3 | # Copyright (c) 2020 Theo Buehler <tb@openbsd.org> |
4 | # | 4 | # |
@@ -72,7 +72,7 @@ def substitute_alert(want, got): | |||
72 | return f"Expected alert description \"{want}\" " \ | 72 | return f"Expected alert description \"{want}\" " \ |
73 | + f"does not match received \"{got}\"" | 73 | + f"does not match received \"{got}\"" |
74 | 74 | ||
75 | # test-tls13-finished.py has 70 failing tests that expect a "decode_error" | 75 | # test_tls13_finished.py has 70 failing tests that expect a "decode_error" |
76 | # instead of the "decrypt_error" sent by tls13_server_finished_recv(). | 76 | # instead of the "decrypt_error" sent by tls13_server_finished_recv(). |
77 | # Both alerts appear to be reasonable in this context, so work around this | 77 | # Both alerts appear to be reasonable in this context, so work around this |
78 | # in the test instead of the library. | 78 | # in the test instead of the library. |
@@ -164,46 +164,46 @@ def generate_test_tls13_finished_args(): | |||
164 | return args | 164 | return args |
165 | 165 | ||
166 | tls13_tests = TestGroup("TLSv1.3 tests", [ | 166 | tls13_tests = TestGroup("TLSv1.3 tests", [ |
167 | Test("test-tls13-ccs.py"), | 167 | Test("test_tls13_ccs.py"), |
168 | Test("test-tls13-conversation.py"), | 168 | Test("test_tls13_conversation.py"), |
169 | Test("test-tls13-count-tickets.py"), | 169 | Test("test_tls13_count_tickets.py"), |
170 | Test("test-tls13-empty-alert.py"), | 170 | Test("test_tls13_empty_alert.py"), |
171 | Test("test-tls13-finished.py", generate_test_tls13_finished_args()), | 171 | Test("test_tls13_finished.py", generate_test_tls13_finished_args()), |
172 | Test("test-tls13-finished-plaintext.py"), | 172 | Test("test_tls13_finished_plaintext.py"), |
173 | Test("test-tls13-hrr.py"), | 173 | Test("test_tls13_hrr.py"), |
174 | Test("test-tls13-keyshare-omitted.py"), | 174 | Test("test_tls13_keyshare_omitted.py"), |
175 | Test("test-tls13-legacy-version.py"), | 175 | Test("test_tls13_legacy_version.py"), |
176 | Test("test-tls13-nociphers.py"), | 176 | Test("test_tls13_nociphers.py"), |
177 | Test("test-tls13-record-padding.py"), | 177 | Test("test_tls13_record_padding.py"), |
178 | # Exclude QUIC transport parameters | 178 | # Exclude QUIC transport parameters |
179 | Test("test-tls13-shuffled-extentions.py", [ "--exc", "57" ]), | 179 | Test("test_tls13_shuffled_extentions.py", [ "--exc", "57" ]), |
180 | Test("test-tls13-zero-content-type.py"), | 180 | Test("test_tls13_zero_content_type.py"), |
181 | 181 | ||
182 | # The skipped tests fail due to a bug in BIO_gets() which masks the retry | 182 | # The skipped tests fail due to a bug in BIO_gets() which masks the retry |
183 | # signalled from an SSL_read() failure. Testing with httpd(8) shows we're | 183 | # signalled from an SSL_read() failure. Testing with httpd(8) shows we're |
184 | # handling these corner cases correctly since tls13_record_layer.c -r1.47. | 184 | # handling these corner cases correctly since tls13_record_layer.c -r1.47. |
185 | Test("test-tls13-zero-length-data.py", [ | 185 | Test("test_tls13_zero_length_data.py", [ |
186 | "-e", "zero-length app data", | 186 | "-e", "zero-length app data", |
187 | "-e", "zero-length app data with large padding", | 187 | "-e", "zero-length app data with large padding", |
188 | "-e", "zero-length app data with padding", | 188 | "-e", "zero-length app data with padding", |
189 | ]), | 189 | ]), |
190 | 190 | ||
191 | # We don't currently handle NSTs | 191 | # We don't currently handle NSTs |
192 | Test("test-tls13-connection-abort.py", ["-e", "After NewSessionTicket"]), | 192 | Test("test_tls13_connection_abort.py", ["-e", "After NewSessionTicket"]), |
193 | ]) | 193 | ]) |
194 | 194 | ||
195 | # Tests that take a lot of time (> ~30s on an x280) | 195 | # Tests that take a lot of time (> ~30s on an x280) |
196 | tls13_slow_tests = TestGroup("slow TLSv1.3 tests", [ | 196 | tls13_slow_tests = TestGroup("slow TLSv1.3 tests", [ |
197 | # XXX: Investigate the occasional message | 197 | # XXX: Investigate the occasional message |
198 | # "Got shared secret with 1 most significant bytes equal to zero." | 198 | # "Got shared secret with 1 most significant bytes equal to zero." |
199 | Test("test-tls13-dhe-shared-secret-padding.py", tls13_unsupported_ciphers), | 199 | Test("test_tls13_dhe_shared_secret_padding.py", tls13_unsupported_ciphers), |
200 | 200 | ||
201 | Test("test-tls13-invalid-ciphers.py"), | 201 | Test("test_tls13_invalid_ciphers.py"), |
202 | Test("test-tls13-serverhello-random.py", tls13_unsupported_ciphers), | 202 | Test("test_tls13_serverhello_random.py", tls13_unsupported_ciphers), |
203 | 203 | ||
204 | # Mark two tests cases as xfail for now. The tests expect an arguably | 204 | # Mark two tests cases as xfail for now. The tests expect an arguably |
205 | # correct decode_error while we send a decrypt_error (like fizz/boring). | 205 | # correct decode_error while we send a decrypt_error (like fizz/boring). |
206 | Test("test-tls13-record-layer-limits.py", [ | 206 | Test("test_tls13_record_layer_limits.py", [ |
207 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_AES_128_GCM_SHA256", | 207 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_AES_128_GCM_SHA256", |
208 | "-X", substitute_alert("decode_error", "decrypt_error"), | 208 | "-X", substitute_alert("decode_error", "decrypt_error"), |
209 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_CHACHA20_POLY1305_SHA256", | 209 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_CHACHA20_POLY1305_SHA256", |
@@ -212,22 +212,22 @@ tls13_slow_tests = TestGroup("slow TLSv1.3 tests", [ | |||
212 | # We don't accept an empty ECPF extension since it must advertise the | 212 | # We don't accept an empty ECPF extension since it must advertise the |
213 | # uncompressed point format. Exclude this extension type from the test. | 213 | # uncompressed point format. Exclude this extension type from the test. |
214 | Test( | 214 | Test( |
215 | "test-tls13-large-number-of-extensions.py", | 215 | "test_tls13_large_number_of_extensions.py", |
216 | tls13_args = ["--exc", "11"], | 216 | tls13_args = ["--exc", "11"], |
217 | ), | 217 | ), |
218 | ]) | 218 | ]) |
219 | 219 | ||
220 | tls13_extra_cert_tests = TestGroup("TLSv1.3 certificate tests", [ | 220 | tls13_extra_cert_tests = TestGroup("TLSv1.3 certificate tests", [ |
221 | # need to set up client certs to run these | 221 | # need to set up client certs to run these |
222 | Test("test-tls13-certificate-request.py"), | 222 | Test("test_tls13_certificate_request.py"), |
223 | Test("test-tls13-certificate-verify.py"), | 223 | Test("test_tls13_certificate_verify.py"), |
224 | Test("test-tls13-ecdsa-in-certificate-verify.py"), | 224 | Test("test_tls13_ecdsa_in_certificate_verify.py"), |
225 | Test("test-tls13-eddsa-in-certificate-verify.py"), | 225 | Test("test_tls13_eddsa_in_certificate_verify.py"), |
226 | 226 | ||
227 | # Test expects the server to have installed three certificates: | 227 | # Test expects the server to have installed three certificates: |
228 | # with P-256, P-384 and P-521 curve. Also SHA1+ECDSA is verified | 228 | # with P-256, P-384 and P-521 curve. Also SHA1+ECDSA is verified |
229 | # to not work. | 229 | # to not work. |
230 | Test("test-tls13-ecdsa-support.py"), | 230 | Test("test_tls13_ecdsa_support.py"), |
231 | ]) | 231 | ]) |
232 | 232 | ||
233 | tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | 233 | tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ |
@@ -235,7 +235,7 @@ tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | |||
235 | # With X25519, we accept weak peer public keys and fail when we actually | 235 | # With X25519, we accept weak peer public keys and fail when we actually |
236 | # compute the keyshare. Other tests seem to indicate that we could be | 236 | # compute the keyshare. Other tests seem to indicate that we could be |
237 | # stricter about what keyshares we accept. | 237 | # stricter about what keyshares we accept. |
238 | Test("test-tls13-crfg-curves.py", [ | 238 | Test("test_tls13_crfg_curves.py", [ |
239 | '-e', 'all zero x448 key share', | 239 | '-e', 'all zero x448 key share', |
240 | '-e', 'empty x448 key share', | 240 | '-e', 'empty x448 key share', |
241 | '-e', 'sanity x448 with compression ansiX962_compressed_char2', | 241 | '-e', 'sanity x448 with compression ansiX962_compressed_char2', |
@@ -245,7 +245,7 @@ tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | |||
245 | '-e', 'too small x448 key share', | 245 | '-e', 'too small x448 key share', |
246 | '-e', 'x448 key share of "1"', | 246 | '-e', 'x448 key share of "1"', |
247 | ]), | 247 | ]), |
248 | Test("test-tls13-ecdhe-curves.py", [ | 248 | Test("test_tls13_ecdhe_curves.py", [ |
249 | '-e', 'sanity - x448', | 249 | '-e', 'sanity - x448', |
250 | '-e', 'x448 - key share from other curve', | 250 | '-e', 'x448 - key share from other curve', |
251 | '-e', 'x448 - point at infinity', | 251 | '-e', 'x448 - point at infinity', |
@@ -258,21 +258,21 @@ tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | |||
258 | # We have the logic corresponding to NSS's fix for CVE-2020-25648 | 258 | # We have the logic corresponding to NSS's fix for CVE-2020-25648 |
259 | # https://hg.mozilla.org/projects/nss/rev/57bbefa793232586d27cee83e74411171e128361 | 259 | # https://hg.mozilla.org/projects/nss/rev/57bbefa793232586d27cee83e74411171e128361 |
260 | # so should not be affected by this issue. | 260 | # so should not be affected by this issue. |
261 | Test("test-tls13-multiple-ccs-messages.py"), | 261 | Test("test_tls13_multiple_ccs_messages.py"), |
262 | 262 | ||
263 | # https://github.com/openssl/openssl/issues/8369 | 263 | # https://github.com/openssl/openssl/issues/8369 |
264 | Test("test-tls13-obsolete-curves.py"), | 264 | Test("test_tls13_obsolete_curves.py"), |
265 | 265 | ||
266 | # 3 failing rsa_pss_pss tests | 266 | # 3 failing rsa_pss_pss tests |
267 | Test("test-tls13-rsa-signatures.py"), | 267 | Test("test_tls13_rsa_signatures.py"), |
268 | 268 | ||
269 | # The failing tests all expect an ri extension. What's up with that? | 269 | # The failing tests all expect an ri extension. What's up with that? |
270 | Test("test-tls13-version-negotiation.py"), | 270 | Test("test_tls13_version_negotiation.py"), |
271 | ]) | 271 | ]) |
272 | 272 | ||
273 | tls13_slow_failing_tests = TestGroup("slow, failing TLSv1.3 tests", [ | 273 | tls13_slow_failing_tests = TestGroup("slow, failing TLSv1.3 tests", [ |
274 | # Other test failures bugs in keyshare/tlsext negotiation? | 274 | # Other test failures bugs in keyshare/tlsext negotiation? |
275 | Test("test-tls13-unrecognised-groups.py"), # unexpected closure | 275 | Test("test_tls13_unrecognised_groups.py"), # unexpected closure |
276 | 276 | ||
277 | # 5 occasional failures: | 277 | # 5 occasional failures: |
278 | # 'app data split, conversation with KeyUpdate msg' | 278 | # 'app data split, conversation with KeyUpdate msg' |
@@ -280,43 +280,43 @@ tls13_slow_failing_tests = TestGroup("slow, failing TLSv1.3 tests", [ | |||
280 | # 'multiple KeyUpdate messages' | 280 | # 'multiple KeyUpdate messages' |
281 | # 'post-handshake KeyUpdate msg with update_not_request' | 281 | # 'post-handshake KeyUpdate msg with update_not_request' |
282 | # 'post-handshake KeyUpdate msg with update_request' | 282 | # 'post-handshake KeyUpdate msg with update_request' |
283 | Test("test-tls13-keyupdate.py"), | 283 | Test("test_tls13_keyupdate.py"), |
284 | 284 | ||
285 | Test("test-tls13-symetric-ciphers.py"), # unexpected message from peer | 285 | Test("test_tls13_symetric_ciphers.py"), # unexpected message from peer |
286 | 286 | ||
287 | # 6 tests fail: 'rsa_pkcs1_{md5,sha{1,224,256,384,512}} signature' | 287 | # 6 tests fail: 'rsa_pkcs1_{md5,sha{1,224,256,384,512}} signature' |
288 | # We send server hello, but the test expects handshake_failure | 288 | # We send server hello, but the test expects handshake_failure |
289 | Test("test-tls13-pkcs-signature.py"), | 289 | Test("test_tls13_pkcs_signature.py"), |
290 | # 8 tests fail: 'tls13 signature rsa_pss_{pss,rsae}_sha{256,384,512} | 290 | # 8 tests fail: 'tls13 signature rsa_pss_{pss,rsae}_sha{256,384,512} |
291 | Test("test-tls13-rsapss-signatures.py"), | 291 | Test("test_tls13_rsapss_signatures.py"), |
292 | ]) | 292 | ]) |
293 | 293 | ||
294 | tls13_unsupported_tests = TestGroup("TLSv1.3 tests for unsupported features", [ | 294 | tls13_unsupported_tests = TestGroup("TLSv1.3 tests for unsupported features", [ |
295 | # Tests for features we don't support | 295 | # Tests for features we don't support |
296 | Test("test-tls13-0rtt-garbage.py"), | 296 | Test("test_tls13_0rtt_garbage.py"), |
297 | Test("test-tls13-ffdhe-groups.py"), | 297 | Test("test_tls13_ffdhe_groups.py"), |
298 | Test("test-tls13-ffdhe-sanity.py"), | 298 | Test("test_tls13_ffdhe_sanity.py"), |
299 | Test("test-tls13-psk_dhe_ke.py"), | 299 | Test("test_tls13_psk_dhe_ke.py"), |
300 | Test("test-tls13-psk_ke.py"), | 300 | Test("test_tls13_psk_ke.py"), |
301 | 301 | ||
302 | # need server to react to HTTP GET for /keyupdate | 302 | # need server to react to HTTP GET for /keyupdate |
303 | Test("test-tls13-keyupdate-from-server.py"), | 303 | Test("test_tls13_keyupdate_from_server.py"), |
304 | 304 | ||
305 | # needs an echo server | 305 | # needs an echo server |
306 | Test("test-tls13-lengths.py"), | 306 | Test("test_tls13_lengths.py"), |
307 | 307 | ||
308 | # Weird test: tests servers that don't support 1.3 | 308 | # Weird test: tests servers that don't support 1.3 |
309 | Test("test-tls13-non-support.py"), | 309 | Test("test_tls13_non_support.py"), |
310 | 310 | ||
311 | # broken test script | 311 | # broken test script |
312 | # UnboundLocalError: local variable 'cert' referenced before assignment | 312 | # UnboundLocalError: local variable 'cert' referenced before assignment |
313 | Test("test-tls13-post-handshake-auth.py"), | 313 | Test("test_tls13_post_handshake_auth.py"), |
314 | 314 | ||
315 | # ExpectNewSessionTicket | 315 | # ExpectNewSessionTicket |
316 | Test("test-tls13-session-resumption.py"), | 316 | Test("test_tls13_session_resumption.py"), |
317 | 317 | ||
318 | # Server must be configured to support only rsa_pss_rsae_sha512 | 318 | # Server must be configured to support only rsa_pss_rsae_sha512 |
319 | Test("test-tls13-signature-algorithms.py"), | 319 | Test("test_tls13_signature_algorithms.py"), |
320 | ]) | 320 | ]) |
321 | 321 | ||
322 | tls12_exclude_legacy_protocols = [ | 322 | tls12_exclude_legacy_protocols = [ |
@@ -345,52 +345,52 @@ tls12_exclude_legacy_protocols = [ | |||
345 | 345 | ||
346 | tls12_tests = TestGroup("TLSv1.2 tests", [ | 346 | tls12_tests = TestGroup("TLSv1.2 tests", [ |
347 | # Tests that pass as they are. | 347 | # Tests that pass as they are. |
348 | Test("test-aes-gcm-nonces.py"), | 348 | Test("test_aes_gcm_nonces.py"), |
349 | Test("test-connection-abort.py"), | 349 | Test("test_connection_abort.py"), |
350 | Test("test-conversation.py"), | 350 | Test("test_conversation.py"), |
351 | Test("test-cve-2016-2107.py"), | 351 | Test("test_cve_2016_2107.py"), |
352 | Test("test-cve-2016-6309.py"), | 352 | Test("test_cve_2016_6309.py"), |
353 | Test("test-dhe-rsa-key-exchange.py"), | 353 | Test("test_dhe_rsa_key_exchange.py"), |
354 | Test("test-early-application-data.py"), | 354 | Test("test_early_application_data.py"), |
355 | Test("test-empty-extensions.py"), | 355 | Test("test_empty_extensions.py"), |
356 | Test("test-extensions.py"), | 356 | Test("test_extensions.py"), |
357 | Test("test-fuzzed-MAC.py"), | 357 | Test("test_fuzzed_MAC.py"), |
358 | Test("test-fuzzed-ciphertext.py"), | 358 | Test("test_fuzzed_ciphertext.py"), |
359 | Test("test-fuzzed-finished.py"), | 359 | Test("test_fuzzed_finished.py"), |
360 | Test("test-fuzzed-padding.py"), | 360 | Test("test_fuzzed_padding.py"), |
361 | Test("test-fuzzed-plaintext.py"), # fails once in a while | 361 | Test("test_fuzzed_plaintext.py"), # fails once in a while |
362 | Test("test-hello-request-by-client.py"), | 362 | Test("test_hello_request_by_client.py"), |
363 | Test("test-invalid-cipher-suites.py"), | 363 | Test("test_invalid_cipher_suites.py"), |
364 | Test("test-invalid-content-type.py"), | 364 | Test("test_invalid_content_type.py"), |
365 | Test("test-invalid-session-id.py"), | 365 | Test("test_invalid_session_id.py"), |
366 | Test("test-invalid-version.py"), | 366 | Test("test_invalid_version.py"), |
367 | Test("test-large-number-of-extensions.py"), | 367 | Test("test_large_number_of_extensions.py"), |
368 | Test("test-lucky13.py"), | 368 | Test("test_lucky13.py"), |
369 | Test("test-message-skipping.py"), | 369 | Test("test_message_skipping.py"), |
370 | Test("test-no-heartbeat.py"), | 370 | Test("test_no_heartbeat.py"), |
371 | Test("test-record-layer-fragmentation.py"), | 371 | Test("test_record_layer_fragmentation.py"), |
372 | Test("test-sslv2-connection.py"), | 372 | Test("test_sslv2_connection.py"), |
373 | Test("test-truncating-of-finished.py"), | 373 | Test("test_truncating_of_finished.py"), |
374 | Test("test-truncating-of-kRSA-client-key-exchange.py"), | 374 | Test("test_truncating_of_kRSA_client_key_exchange.py"), |
375 | Test("test-unsupported-curve-fallback.py"), | 375 | Test("test_unsupported_curve_fallback.py"), |
376 | Test("test-version-numbers.py"), | 376 | Test("test_version_numbers.py"), |
377 | Test("test-zero-length-data.py"), | 377 | Test("test_zero_length_data.py"), |
378 | 378 | ||
379 | # Tests that need tweaking for unsupported features and ciphers. | 379 | # Tests that need tweaking for unsupported features and ciphers. |
380 | Test( | 380 | Test( |
381 | "test-atypical-padding.py", [ | 381 | "test_atypical_padding.py", [ |
382 | "-e", "sanity - encrypt then MAC", | 382 | "-e", "sanity - encrypt then MAC", |
383 | "-e", "2^14 bytes of AppData with 256 bytes of padding (SHA1 + Encrypt then MAC)", | 383 | "-e", "2^14 bytes of AppData with 256 bytes of padding (SHA1 + Encrypt then MAC)", |
384 | ] | 384 | ] |
385 | ), | 385 | ), |
386 | Test( | 386 | Test( |
387 | "test-ccs.py", [ | 387 | "test_ccs.py", [ |
388 | "-x", "two bytes long CCS", | 388 | "-x", "two bytes long CCS", |
389 | "-X", substitute_alert("unexpected_message", "decode_error"), | 389 | "-X", substitute_alert("unexpected_message", "decode_error"), |
390 | ] | 390 | ] |
391 | ), | 391 | ), |
392 | Test( | 392 | Test( |
393 | "test-dhe-rsa-key-exchange-signatures.py", [ | 393 | "test_dhe_rsa_key_exchange_signatures.py", [ |
394 | "-e", "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA sha224 signature", | 394 | "-e", "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA sha224 signature", |
395 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 sha224 signature", | 395 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 sha224 signature", |
396 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA sha224 signature", | 396 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA sha224 signature", |
@@ -398,14 +398,14 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
398 | "-e", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA sha224 signature", | 398 | "-e", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA sha224 signature", |
399 | ] | 399 | ] |
400 | ), | 400 | ), |
401 | Test("test-dhe-rsa-key-exchange-with-bad-messages.py", [ | 401 | Test("test_dhe_rsa_key_exchange_with_bad_messages.py", [ |
402 | "-x", "invalid dh_Yc value - missing", | 402 | "-x", "invalid dh_Yc value - missing", |
403 | "-X", substitute_alert("decode_error", "illegal_parameter"), | 403 | "-X", substitute_alert("decode_error", "illegal_parameter"), |
404 | ]), | 404 | ]), |
405 | Test("test-dhe-key-share-random.py", tls12_exclude_legacy_protocols), | 405 | Test("test_dhe_key_share_random.py", tls12_exclude_legacy_protocols), |
406 | Test("test-export-ciphers-rejected.py", ["--min-ver", "TLSv1.2"]), | 406 | Test("test_export_ciphers_rejected.py", ["--min-ver", "TLSv1.2"]), |
407 | Test( | 407 | Test( |
408 | "test-downgrade-protection.py", | 408 | "test_downgrade_protection.py", |
409 | tls12_args = ["--server-max-protocol", "TLSv1.2"], | 409 | tls12_args = ["--server-max-protocol", "TLSv1.2"], |
410 | tls13_args = [ | 410 | tls13_args = [ |
411 | "--server-max-protocol", "TLSv1.3", | 411 | "--server-max-protocol", "TLSv1.3", |
@@ -414,7 +414,7 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
414 | ] | 414 | ] |
415 | ), | 415 | ), |
416 | Test( | 416 | Test( |
417 | "test-fallback-scsv.py", | 417 | "test_fallback_scsv.py", |
418 | tls13_args = [ | 418 | tls13_args = [ |
419 | "--tls-1.3", | 419 | "--tls-1.3", |
420 | "-e", "FALLBACK - hello TLSv1.1 - pos 0", | 420 | "-e", "FALLBACK - hello TLSv1.1 - pos 0", |
@@ -428,7 +428,7 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
428 | ] | 428 | ] |
429 | ), | 429 | ), |
430 | 430 | ||
431 | Test("test-invalid-compression-methods.py", [ | 431 | Test("test_invalid_compression_methods.py", [ |
432 | "-x", "invalid compression methods", | 432 | "-x", "invalid compression methods", |
433 | "-X", substitute_alert("illegal_parameter", "decode_error"), | 433 | "-X", substitute_alert("illegal_parameter", "decode_error"), |
434 | "-x", "only deflate compression method", | 434 | "-x", "only deflate compression method", |
@@ -437,134 +437,134 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
437 | 437 | ||
438 | # Skip extended_master_secret test. Since we don't support this | 438 | # Skip extended_master_secret test. Since we don't support this |
439 | # extension, we don't notice that it was dropped. | 439 | # extension, we don't notice that it was dropped. |
440 | Test("test-renegotiation-changed-clienthello.py", [ | 440 | Test("test_renegotiation_changed_clienthello.py", [ |
441 | "-e", "drop extended_master_secret in renegotiation", | 441 | "-e", "drop extended_master_secret in renegotiation", |
442 | ]), | 442 | ]), |
443 | 443 | ||
444 | Test("test-sessionID-resumption.py", [ | 444 | Test("test_sessionID_resumption.py", [ |
445 | "-x", "Client Hello too long session ID", | 445 | "-x", "Client Hello too long session ID", |
446 | "-X", substitute_alert("decode_error", "illegal_parameter"), | 446 | "-X", substitute_alert("decode_error", "illegal_parameter"), |
447 | ]), | 447 | ]), |
448 | 448 | ||
449 | # Without --sig-algs-drop-ok, two tests fail since we do not currently | 449 | # Without --sig-algs-drop-ok, two tests fail since we do not currently |
450 | # implement the signature_algorithms_cert extension (although we MUST). | 450 | # implement the signature_algorithms_cert extension (although we MUST). |
451 | Test("test-sig-algs-renegotiation-resumption.py", ["--sig-algs-drop-ok"]), | 451 | Test("test_sig_algs_renegotiation_resumption.py", ["--sig-algs-drop-ok"]), |
452 | 452 | ||
453 | Test("test-serverhello-random.py", args = tls12_exclude_legacy_protocols), | 453 | Test("test_serverhello_random.py", args = tls12_exclude_legacy_protocols), |
454 | 454 | ||
455 | Test("test-chacha20.py", [ "-e", "Chacha20 in TLS1.1" ]), | 455 | Test("test_chacha20.py", [ "-e", "Chacha20 in TLS1.1" ]), |
456 | ]) | 456 | ]) |
457 | 457 | ||
458 | tls12_slow_tests = TestGroup("slow TLSv1.2 tests", [ | 458 | tls12_slow_tests = TestGroup("slow TLSv1.2 tests", [ |
459 | Test("test-cve-2016-7054.py"), | 459 | Test("test_cve_2016_7054.py"), |
460 | Test("test-dhe-no-shared-secret-padding.py", tls12_exclude_legacy_protocols), | 460 | Test("test_dhe_no_shared_secret_padding.py", tls12_exclude_legacy_protocols), |
461 | Test("test-ecdhe-padded-shared-secret.py", tls12_exclude_legacy_protocols), | 461 | Test("test_ecdhe_padded_shared_secret.py", tls12_exclude_legacy_protocols), |
462 | Test("test-ecdhe-rsa-key-share-random.py", tls12_exclude_legacy_protocols), | 462 | Test("test_ecdhe_rsa_key_share_random.py", tls12_exclude_legacy_protocols), |
463 | # Start at extension number 58 to avoid QUIC transport parameters (57) | 463 | # Start at extension number 58 to avoid QUIC transport parameters (57) |
464 | Test("test-large-hello.py", [ "-m", "58" ]), | 464 | Test("test_large_hello.py", [ "-m", "58" ]), |
465 | ]) | 465 | ]) |
466 | 466 | ||
467 | tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ | 467 | tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ |
468 | # no shared cipher | 468 | # no shared cipher |
469 | Test("test-aesccm.py"), | 469 | Test("test_aesccm.py"), |
470 | # need server to set up alpn | 470 | # need server to set up alpn |
471 | Test("test-alpn-negotiation.py"), | 471 | Test("test_alpn_negotiation.py"), |
472 | # Failing on TLS_RSA_WITH_AES_128_CBC_SHA because server does not support it. | 472 | # Failing on TLS_RSA_WITH_AES_128_CBC_SHA because server does not support it. |
473 | Test("test-bleichenbacher-timing-pregenerate.py"), | 473 | Test("test_bleichenbacher_timing_pregenerate.py"), |
474 | # many tests fail due to unexpected server_name extension | 474 | # many tests fail due to unexpected server_name extension |
475 | Test("test-bleichenbacher-workaround.py"), | 475 | Test("test_bleichenbacher_workaround.py"), |
476 | 476 | ||
477 | # need client key and cert plus extra server setup | 477 | # need client key and cert plus extra server setup |
478 | Test("test-certificate-malformed.py"), | 478 | Test("test_certificate_malformed.py"), |
479 | Test("test-certificate-request.py"), | 479 | Test("test_certificate_request.py"), |
480 | Test("test-certificate-verify-malformed-sig.py"), | 480 | Test("test_certificate_verify_malformed_sig.py"), |
481 | Test("test-certificate-verify-malformed.py"), | 481 | Test("test_certificate_verify_malformed.py"), |
482 | Test("test-certificate-verify.py"), | 482 | Test("test_certificate_verify.py"), |
483 | Test("test-ecdsa-in-certificate-verify.py"), | 483 | Test("test_ecdsa_in_certificate_verify.py"), |
484 | Test("test-eddsa-in-certificate-verify.py"), | 484 | Test("test_eddsa_in_certificate_verify.py"), |
485 | Test("test-renegotiation-disabled-client-cert.py"), | 485 | Test("test_renegotiation_disabled_client_cert.py"), |
486 | Test("test-rsa-pss-sigs-on-certificate-verify.py"), | 486 | Test("test_rsa_pss_sigs_on_certificate_verify.py"), |
487 | Test("test-rsa-sigs-on-certificate-verify.py"), | 487 | Test("test_rsa_sigs_on_certificate_verify.py"), |
488 | 488 | ||
489 | # test doesn't expect session ticket | 489 | # test doesn't expect session ticket |
490 | Test("test-client-compatibility.py"), | 490 | Test("test_client_compatibility.py"), |
491 | # abrupt closure | 491 | # abrupt closure |
492 | Test("test-client-hello-max-size.py"), | 492 | Test("test_client_hello_max_size.py"), |
493 | # unknown signature algorithms | 493 | # unknown signature algorithms |
494 | Test("test-clienthello-md5.py"), | 494 | Test("test_clienthello_md5.py"), |
495 | 495 | ||
496 | # Tests expect an illegal_parameter or a decode_error alert. Should be | 496 | # Tests expect an illegal_parameter or a decode_error alert. Should be |
497 | # added to ssl3_get_client_key_exchange on kex function failure. | 497 | # added to ssl3_get_client_key_exchange on kex function failure. |
498 | Test("test-ecdhe-rsa-key-exchange-with-bad-messages.py"), | 498 | Test("test_ecdhe_rsa_key_exchange_with_bad_messages.py"), |
499 | 499 | ||
500 | # We send a handshake_failure due to no shared ciphers while the | 500 | # We send a handshake_failure due to no shared ciphers while the |
501 | # test expects to succeed. | 501 | # test expects to succeed. |
502 | Test("test-ecdhe-rsa-key-exchange.py"), | 502 | Test("test_ecdhe_rsa_key_exchange.py"), |
503 | 503 | ||
504 | # no shared cipher | 504 | # no shared cipher |
505 | Test("test-ecdsa-sig-flexibility.py"), | 505 | Test("test_ecdsa_sig_flexibility.py"), |
506 | 506 | ||
507 | # Tests expect SH but we send unexpected_message or handshake_failure | 507 | # Tests expect SH but we send unexpected_message or handshake_failure |
508 | # 'Application data inside Client Hello' | 508 | # 'Application data inside Client Hello' |
509 | # 'Application data inside Client Key Exchange' | 509 | # 'Application data inside Client Key Exchange' |
510 | # 'Application data inside Finished' | 510 | # 'Application data inside Finished' |
511 | Test("test-interleaved-application-data-and-fragmented-handshakes-in-renegotiation.py"), | 511 | Test("test_interleaved_application_data_and_fragmented_handshakes_in_renegotiation.py"), |
512 | # Tests expect SH but we send handshake_failure | 512 | # Tests expect SH but we send handshake_failure |
513 | # 'Application data before Change Cipher Spec' | 513 | # 'Application data before Change Cipher Spec' |
514 | # 'Application data before Client Key Exchange' | 514 | # 'Application data before Client Key Exchange' |
515 | # 'Application data before Finished' | 515 | # 'Application data before Finished' |
516 | Test("test-interleaved-application-data-in-renegotiation.py"), | 516 | Test("test_interleaved_application_data_in_renegotiation.py"), |
517 | 517 | ||
518 | # broken test script | 518 | # broken test script |
519 | # TypeError: '<' not supported between instances of 'int' and 'NoneType' | 519 | # TypeError: '<' not supported between instances of 'int' and 'NoneType' |
520 | Test("test-invalid-client-hello-w-record-overflow.py"), | 520 | Test("test_invalid_client_hello_w_record_overflow.py"), |
521 | 521 | ||
522 | # Lots of failures. abrupt closure | 522 | # Lots of failures. abrupt closure |
523 | Test("test-invalid-client-hello.py"), | 523 | Test("test_invalid_client_hello.py"), |
524 | 524 | ||
525 | # abrupt closure | 525 | # abrupt closure |
526 | # 'encrypted premaster set to all zero (n)' n in 256 384 512 | 526 | # 'encrypted premaster set to all zero (n)' n in 256 384 512 |
527 | Test("test-invalid-rsa-key-exchange-messages.py"), | 527 | Test("test_invalid_rsa_key_exchange_messages.py"), |
528 | 528 | ||
529 | # test expects illegal_parameter, we send unrecognized_name (which seems | 529 | # test expects illegal_parameter, we send unrecognized_name (which seems |
530 | # correct according to rfc 6066?) | 530 | # correct according to rfc 6066?) |
531 | Test("test-invalid-server-name-extension-resumption.py"), | 531 | Test("test_invalid_server_name_extension_resumption.py"), |
532 | # let through some server names without sending an alert | 532 | # let through some server names without sending an alert |
533 | # again illegal_parameter vs unrecognized_name | 533 | # again illegal_parameter vs unrecognized_name |
534 | Test("test-invalid-server-name-extension.py"), | 534 | Test("test_invalid_server_name_extension.py"), |
535 | 535 | ||
536 | # 4 failures: | 536 | # 4 failures: |
537 | # 'insecure (legacy) renegotiation with GET after 2nd handshake' | 537 | # 'insecure (legacy) renegotiation with GET after 2nd handshake' |
538 | # 'insecure (legacy) renegotiation with incomplete GET' | 538 | # 'insecure (legacy) renegotiation with incomplete GET' |
539 | # 'secure renegotiation with GET after 2nd handshake' | 539 | # 'secure renegotiation with GET after 2nd handshake' |
540 | # 'secure renegotiation with incomplete GET' | 540 | # 'secure renegotiation with incomplete GET' |
541 | Test("test-legacy-renegotiation.py"), | 541 | Test("test_legacy_renegotiation.py"), |
542 | 542 | ||
543 | # 1 failure (timeout): we don't send the unexpected_message alert | 543 | # 1 failure (timeout): we don't send the unexpected_message alert |
544 | # 'duplicate change cipher spec after Finished' | 544 | # 'duplicate change cipher spec after Finished' |
545 | Test("test-message-duplication.py"), | 545 | Test("test_message_duplication.py"), |
546 | 546 | ||
547 | # server should send status_request | 547 | # server should send status_request |
548 | Test("test-ocsp-stapling.py"), | 548 | Test("test_ocsp_stapling.py"), |
549 | 549 | ||
550 | # unexpected closure | 550 | # unexpected closure |
551 | Test("test-openssl-3712.py"), | 551 | Test("test_openssl_3712.py"), |
552 | 552 | ||
553 | # failed: 3 (expect an alert, we send AD) | 553 | # failed: 3 (expect an alert, we send AD) |
554 | # 'try insecure (legacy) renegotiation with incomplete GET' | 554 | # 'try insecure (legacy) renegotiation with incomplete GET' |
555 | # 'try secure renegotiation with GET after 2nd CH' | 555 | # 'try secure renegotiation with GET after 2nd CH' |
556 | # 'try secure renegotiation with incomplete GET' | 556 | # 'try secure renegotiation with incomplete GET' |
557 | Test("test-renegotiation-disabled.py"), | 557 | Test("test_renegotiation_disabled.py"), |
558 | 558 | ||
559 | # 'resumption of safe session with NULL cipher' | 559 | # 'resumption of safe session with NULL cipher' |
560 | # 'resumption with cipher from old CH but not selected by server' | 560 | # 'resumption with cipher from old CH but not selected by server' |
561 | Test("test-resumption-with-wrong-ciphers.py"), | 561 | Test("test_resumption_with_wrong_ciphers.py"), |
562 | 562 | ||
563 | # 'session resumption with empty session_id' | 563 | # 'session resumption with empty session_id' |
564 | # 'session resumption with random session_id' | 564 | # 'session resumption with random session_id' |
565 | # 'session resumption with renegotiation' | 565 | # 'session resumption with renegotiation' |
566 | # AssertionError: Server did not send extension(s): session_ticket | 566 | # AssertionError: Server did not send extension(s): session_ticket |
567 | Test("test-session-ticket-resumption.py"), | 567 | Test("test_session_ticket_resumption.py"), |
568 | 568 | ||
569 | # 5 failures: | 569 | # 5 failures: |
570 | # 'empty sigalgs' | 570 | # 'empty sigalgs' |
@@ -572,7 +572,7 @@ tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ | |||
572 | # 'rsa_pss_pss_sha256 only' | 572 | # 'rsa_pss_pss_sha256 only' |
573 | # 'rsa_pss_pss_sha384 only' | 573 | # 'rsa_pss_pss_sha384 only' |
574 | # 'rsa_pss_pss_sha512 only' | 574 | # 'rsa_pss_pss_sha512 only' |
575 | Test("test-sig-algs.py"), | 575 | Test("test_sig_algs.py"), |
576 | 576 | ||
577 | # 13 failures: | 577 | # 13 failures: |
578 | # 'duplicated n non-rsa schemes' for n in 202 2342 8119 23741 32744 | 578 | # 'duplicated n non-rsa schemes' for n in 202 2342 8119 23741 32744 |
@@ -581,51 +581,51 @@ tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ | |||
581 | # 'tolerance 32758 methods with sig_alg_cert' | 581 | # 'tolerance 32758 methods with sig_alg_cert' |
582 | # 'tolerance max 32744 number of methods with sig_alg_cert' | 582 | # 'tolerance max 32744 number of methods with sig_alg_cert' |
583 | # 'tolerance max (32760) number of methods' | 583 | # 'tolerance max (32760) number of methods' |
584 | Test("test-signature-algorithms.py"), | 584 | Test("test_signature_algorithms.py"), |
585 | 585 | ||
586 | # times out | 586 | # times out |
587 | Test("test-ssl-death-alert.py"), | 587 | Test("test_ssl_death_alert.py"), |
588 | 588 | ||
589 | # 17 pass, 13 fail. padding and truncation | 589 | # 17 pass, 13 fail. padding and truncation |
590 | Test("test-truncating-of-client-hello.py"), | 590 | Test("test_truncating_of_client_hello.py"), |
591 | 591 | ||
592 | # x448 tests need disabling plus x25519 corner cases need sorting out | 592 | # x448 tests need disabling plus x25519 corner cases need sorting out |
593 | Test("test-x25519.py"), | 593 | Test("test_x25519.py"), |
594 | 594 | ||
595 | # Needs TLS 1.0 or 1.1 | 595 | # Needs TLS 1.0 or 1.1 |
596 | Test("test-TLSv1_2-rejected-without-TLSv1_2.py"), | 596 | Test("test_TLSv1_2_rejected_without_TLSv1_2.py"), |
597 | ]) | 597 | ]) |
598 | 598 | ||
599 | tls12_unsupported_tests = TestGroup("TLSv1.2 for unsupported features", [ | 599 | tls12_unsupported_tests = TestGroup("TLSv1.2 for unsupported features", [ |
600 | # protocol_version | 600 | # protocol_version |
601 | Test("test-SSLv3-padding.py"), | 601 | Test("test_SSLv3_padding.py"), |
602 | # we don't do RSA key exchanges | 602 | # we don't do RSA key exchanges |
603 | Test("test-bleichenbacher-timing.py"), | 603 | Test("test_bleichenbacher_timing.py"), |
604 | # no encrypt-then-mac | 604 | # no encrypt-then-mac |
605 | Test("test-encrypt-then-mac-renegotiation.py"), | 605 | Test("test_encrypt_then_mac_renegotiation.py"), |
606 | Test("test-encrypt-then-mac.py"), | 606 | Test("test_encrypt_then_mac.py"), |
607 | # no EME support | 607 | # no EME support |
608 | Test("test-extended-master-secret-extension-with-client-cert.py"), | 608 | Test("test_extended_master_secret_extension_with_client_cert.py"), |
609 | Test("test-extended-master-secret-extension.py"), | 609 | Test("test_extended_master_secret_extension.py"), |
610 | # no ffdhe | 610 | # no ffdhe |
611 | Test("test-ffdhe-expected-params.py"), | 611 | Test("test_ffdhe_expected_params.py"), |
612 | Test("test-ffdhe-negotiation.py"), | 612 | Test("test_ffdhe_negotiation.py"), |
613 | # record_size_limit/max_fragment_length extension (RFC 8449) | 613 | # record_size_limit/max_fragment_length extension (RFC 8449) |
614 | Test("test-record-size-limit.py"), | 614 | Test("test_record_size_limit.py"), |
615 | # expects the server to send the heartbeat extension | 615 | # expects the server to send the heartbeat extension |
616 | Test("test-heartbeat.py"), | 616 | Test("test_heartbeat.py"), |
617 | # needs an echo server | 617 | # needs an echo server |
618 | Test("test-lengths.py"), | 618 | Test("test_lengths.py"), |
619 | ]) | 619 | ]) |
620 | 620 | ||
621 | # These tests take a ton of time to fail against an 1.3 server, | 621 | # These tests take a ton of time to fail against an 1.3 server, |
622 | # so don't run them against 1.3 pending further investigation. | 622 | # so don't run them against 1.3 pending further investigation. |
623 | legacy_tests = TestGroup("Legacy protocol tests", [ | 623 | legacy_tests = TestGroup("Legacy protocol tests", [ |
624 | Test("test-sslv2-force-cipher-3des.py"), | 624 | Test("test_sslv2_force_cipher_3des.py"), |
625 | Test("test-sslv2-force-cipher-non3des.py"), | 625 | Test("test_sslv2_force_cipher_non3des.py"), |
626 | Test("test-sslv2-force-cipher.py"), | 626 | Test("test_sslv2_force_cipher.py"), |
627 | Test("test-sslv2-force-export-cipher.py"), | 627 | Test("test_sslv2_force_export_cipher.py"), |
628 | Test("test-sslv2hello-protocol.py"), | 628 | Test("test_sslv2hello_protocol.py"), |
629 | ]) | 629 | ]) |
630 | 630 | ||
631 | all_groups = [ | 631 | all_groups = [ |