diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/ssl_ciph.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c index ffb8b4367a..c42c3fd22d 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.130 2022/08/30 20:20:02 tb Exp $ */ | 1 | /* $OpenBSD: ssl_ciph.c,v 1.131 2022/09/01 15:19:16 tb 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 | * |
@@ -1362,7 +1362,10 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
1362 | if (cipher_list_tls13 != NULL) { | 1362 | if (cipher_list_tls13 != NULL) { |
1363 | for (i = 0; i < sk_SSL_CIPHER_num(cipher_list_tls13); i++) { | 1363 | for (i = 0; i < sk_SSL_CIPHER_num(cipher_list_tls13); i++) { |
1364 | cipher = sk_SSL_CIPHER_value(cipher_list_tls13, i); | 1364 | cipher = sk_SSL_CIPHER_value(cipher_list_tls13, i); |
1365 | sk_SSL_CIPHER_push(cipherstack, cipher); | 1365 | if (!sk_SSL_CIPHER_push(cipherstack, cipher)) { |
1366 | free(co_list); | ||
1367 | return (NULL); | ||
1368 | } | ||
1366 | } | 1369 | } |
1367 | tls13_seen = 1; | 1370 | tls13_seen = 1; |
1368 | } | 1371 | } |
@@ -1381,8 +1384,12 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method, | |||
1381 | any_active = 0; | 1384 | any_active = 0; |
1382 | for (curr = head; curr != NULL; curr = curr->next) { | 1385 | for (curr = head; curr != NULL; curr = curr->next) { |
1383 | if (curr->active || | 1386 | if (curr->active || |
1384 | (!tls13_seen && curr->cipher->algorithm_ssl == SSL_TLSV1_3)) | 1387 | (!tls13_seen && curr->cipher->algorithm_ssl == SSL_TLSV1_3)) { |
1385 | sk_SSL_CIPHER_push(cipherstack, curr->cipher); | 1388 | if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) { |
1389 | free(co_list); | ||
1390 | return (NULL); | ||
1391 | } | ||
1392 | } | ||
1386 | any_active |= curr->active; | 1393 | any_active |= curr->active; |
1387 | } | 1394 | } |
1388 | if (!any_active) | 1395 | if (!any_active) |