summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_ciph.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_ciph.c')
-rw-r--r--src/lib/libssl/ssl_ciph.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index 37417efc08..4afbcf9896 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_ciph.c,v 1.117 2020/04/19 14:54:14 jsing Exp $ */ 1/* $OpenBSD: ssl_ciph.c,v 1.118 2020/09/11 17:36:27 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1184,12 +1184,11 @@ ssl_aes_is_accelerated(void)
1184STACK_OF(SSL_CIPHER) * 1184STACK_OF(SSL_CIPHER) *
1185ssl_create_cipher_list(const SSL_METHOD *ssl_method, 1185ssl_create_cipher_list(const SSL_METHOD *ssl_method,
1186 STACK_OF(SSL_CIPHER) **cipher_list, 1186 STACK_OF(SSL_CIPHER) **cipher_list,
1187 STACK_OF(SSL_CIPHER) **cipher_list_by_id,
1188 const char *rule_str) 1187 const char *rule_str)
1189{ 1188{
1190 int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases; 1189 int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases;
1191 unsigned long disabled_mkey, disabled_auth, disabled_enc, disabled_mac, disabled_ssl; 1190 unsigned long disabled_mkey, disabled_auth, disabled_enc, disabled_mac, disabled_ssl;
1192 STACK_OF(SSL_CIPHER) *cipherstack, *tmp_cipher_list; 1191 STACK_OF(SSL_CIPHER) *cipherstack;
1193 const char *rule_p; 1192 const char *rule_p;
1194 CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr; 1193 CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
1195 const SSL_CIPHER **ca_list = NULL; 1194 const SSL_CIPHER **ca_list = NULL;
@@ -1199,7 +1198,7 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method,
1199 /* 1198 /*
1200 * Return with error if nothing to do. 1199 * Return with error if nothing to do.
1201 */ 1200 */
1202 if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL) 1201 if (rule_str == NULL || cipher_list == NULL)
1203 return NULL; 1202 return NULL;
1204 1203
1205 /* 1204 /*
@@ -1358,19 +1357,9 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method,
1358 1357
1359 free(co_list); /* Not needed any longer */ 1358 free(co_list); /* Not needed any longer */
1360 1359
1361 tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
1362 if (tmp_cipher_list == NULL) {
1363 sk_SSL_CIPHER_free(cipherstack);
1364 return NULL;
1365 }
1366 sk_SSL_CIPHER_free(*cipher_list); 1360 sk_SSL_CIPHER_free(*cipher_list);
1367 *cipher_list = cipherstack; 1361 *cipher_list = cipherstack;
1368 sk_SSL_CIPHER_free(*cipher_list_by_id);
1369 *cipher_list_by_id = tmp_cipher_list;
1370 (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,
1371 ssl_cipher_ptr_id_cmp);
1372 1362
1373 sk_SSL_CIPHER_sort(*cipher_list_by_id);
1374 return (cipherstack); 1363 return (cipherstack);
1375} 1364}
1376 1365