From: jsing Date: Sun, 27 Jun 2021 16:36:53 +0000 (+0000) Subject: More appropriately set cipher_list_len when AES acceleration is available. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=159b0cbc60d60728766d7acf616ff288cc65ae10;p=openbsd More appropriately set cipher_list_len when AES acceleration is available. --- diff --git a/regress/lib/libssl/client/clienttest.c b/regress/lib/libssl/client/clienttest.c index 17c678b1cce..86f6e2d6ca1 100644 --- a/regress/lib/libssl/client/clienttest.c +++ b/regress/lib/libssl/client/clienttest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clienttest.c,v 1.29 2021/06/27 16:33:30 jsing Exp $ */ +/* $OpenBSD: clienttest.c,v 1.30 2021/06/27 16:36:53 jsing Exp $ */ /* * Copyright (c) 2015 Joel Sing * @@ -347,11 +347,12 @@ make_client_hello(int protocol, char **out, size_t *outlen) case TLS1_2_VERSION: client_hello = client_hello_tls12; client_hello_len = sizeof(client_hello_tls12); - if (ssl_aes_is_accelerated()) - cipher_list = cipher_list_tls12_aes; - else - cipher_list = cipher_list_tls12_chacha; + cipher_list = cipher_list_tls12_chacha; cipher_list_len = sizeof(cipher_list_tls12_chacha); + if (ssl_aes_is_accelerated()) { + cipher_list = cipher_list_tls12_aes; + cipher_list_len = sizeof(cipher_list_tls12_aes); + } cipher_list_offset = SSL3_CIPHER_OFFSET; break;