diff options
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 2879b198d5..34ea6154a4 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.223 2020/09/11 15:28:08 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.224 2020/09/11 17:23:44 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 | * |
@@ -1253,21 +1253,15 @@ ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, | |||
1253 | return ((l > 0) ? 1:-1); | 1253 | return ((l > 0) ? 1:-1); |
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | /* | ||
1257 | * Return a STACK of the ciphers available for the SSL and in order of | ||
1258 | * preference. | ||
1259 | */ | ||
1260 | STACK_OF(SSL_CIPHER) * | 1256 | STACK_OF(SSL_CIPHER) * |
1261 | SSL_get_ciphers(const SSL *s) | 1257 | SSL_get_ciphers(const SSL *s) |
1262 | { | 1258 | { |
1263 | if (s != NULL) { | 1259 | if (s == NULL) |
1264 | if (s->cipher_list != NULL) { | 1260 | return (NULL); |
1265 | return (s->cipher_list); | 1261 | if (s->cipher_list != NULL) |
1266 | } else if ((s->ctx != NULL) && (s->ctx->cipher_list != NULL)) { | 1262 | return (s->cipher_list); |
1267 | return (s->ctx->cipher_list); | 1263 | |
1268 | } | 1264 | return (s->ctx->cipher_list); |
1269 | } | ||
1270 | return (NULL); | ||
1271 | } | 1265 | } |
1272 | 1266 | ||
1273 | STACK_OF(SSL_CIPHER) * | 1267 | STACK_OF(SSL_CIPHER) * |