Skip to content

Commit 8d85112

Browse files
Fix cipher suite syntax in requires call
Signed-off-by: Gilles Peskine <[email protected]>
1 parent 8a534d9 commit 8d85112

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/generate_tls_handshake_tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,17 @@ def write_tls_handshake_defragmentation_test(
120120
]
121121

122122
if cipher is not None:
123+
mbedtls_cipher = translate_ciphers.translate_mbedtls(cipher)
123124
if side == Side.CLIENT:
124-
our_args += ' force_ciphersuite=' + translate_ciphers.translate_mbedtls(cipher)
125+
our_args += ' force_ciphersuite=' + mbedtls_cipher
125126
if 'NULL' in cipher:
126127
their_args += ' -cipher ALL@SECLEVEL=0:COMPLEMENTOFALL@SECLEVEL=0'
127128
else:
128129
# For TLS 1.2, when Mbed TLS is the server, we must force the
129130
# cipher suite on the client side, because passing
130131
# force_ciphersuite to ssl_server2 would force a TLS-1.2-only
131132
# server, which does not support a fragmented ClientHello.
132-
tc.requirements.append('requires_ciphersuite_enabled ' + cipher)
133+
tc.requirements.append('requires_ciphersuite_enabled ' + mbedtls_cipher)
133134
their_args += ' -cipher ' + translate_ciphers.translate_ossl(cipher)
134135
if 'NULL' in cipher:
135136
their_args += '@SECLEVEL=0'

0 commit comments

Comments
 (0)