diff options
author | jsing <> | 2020-09-11 17:23:44 +0000 |
---|---|---|
committer | jsing <> | 2020-09-11 17:23:44 +0000 |
commit | 044cfc226bee4d04817ab4f4d3a6b1d0ab4db4ed (patch) | |
tree | 0e29f1642b3c089b21147eb8ce2c3abccedd55d1 /src/lib | |
parent | aaafcc65a8b1deda1feab495b687eeec194f78bb (diff) | |
download | openbsd-044cfc226bee4d04817ab4f4d3a6b1d0ab4db4ed.tar.gz openbsd-044cfc226bee4d04817ab4f4d3a6b1d0ab4db4ed.tar.bz2 openbsd-044cfc226bee4d04817ab4f4d3a6b1d0ab4db4ed.zip |
Simplify SSL_get_ciphers().
ok beck@, tb@
Diffstat (limited to 'src/lib')
-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) * |