Batch cipher translations to go faster

Python has a high startup cost, so go back to invoking it only once per
server start, rather than once per client start. This is a measurable
performance improvement (running time ~*0.5 with PSK, less dramatic with
asymmetric crypto).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-01-26 21:16:34 +01:00
parent 292cd6f4e5
commit 47aab850da
2 changed files with 27 additions and 24 deletions

View file

@ -179,7 +179,7 @@ def format_ciphersuite_names(mode, names):
"o": translate_ossl,
"m": translate_mbedtls
}[mode]
return " ".join(t(c) for c in names)
return " ".join(c + '=' + t(c) for c in names)
def main(target, names):
print(format_ciphersuite_names(target, names))