From e5d6106071654c505b07c76e5be6469e4092ef00 Mon Sep 17 00:00:00 2001 From: Joe Subbiani Date: Fri, 3 Sep 2021 13:30:44 +0100 Subject: [PATCH] Extend test in translate_ciphers.py The list was trimmed previously according to code coverage, however this did not really evalute all test cases, e.g in the case of re.sub or m_cipher.replace. These lines are executed no matter what, so code coverage is not suitable. I have gone through each step in the translate functions and made sure there is at least one ciphersuite per step Signed-off-by: Joe Subbiani --- tests/scripts/translate_ciphers.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/scripts/translate_ciphers.py b/tests/scripts/translate_ciphers.py index 207c884cf..d5f847fd5 100755 --- a/tests/scripts/translate_ciphers.py +++ b/tests/scripts/translate_ciphers.py @@ -50,12 +50,21 @@ class TestTranslateCiphers(unittest.TestCase): ("TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA", "+DHE-RSA:+3DES-CBC:+SHA1", "EDH-RSA-DES-CBC3-SHA"), + ("TLS-RSA-WITH-AES-256-CBC-SHA", + "+RSA:+AES-256-CBC:+SHA1", + "AES256-SHA"), + ("TLS-PSK-WITH-3DES-EDE-CBC-SHA", + "+PSK:+3DES-CBC:+SHA1", + "PSK-3DES-EDE-CBC-SHA"), ("TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256", None, "ECDHE-ECDSA-CHACHA20-POLY1305"), ("TLS-ECDHE-ECDSA-WITH-AES-128-CCM", "+ECDHE-ECDSA:+AES-128-CCM:+AEAD", None), + ("TLS-ECDHE-RSA-WITH-ARIA-256-GCM-SHA384", + None, + "ECDHE-ARIA256-GCM-SHA384"), ] for m, g_exp, o_exp in ciphers: