diff options
author | schwarze <> | 2020-09-16 07:25:15 +0000 |
---|---|---|
committer | schwarze <> | 2020-09-16 07:25:15 +0000 |
commit | 4d4b6ca21abb045b3f6584cc35a22ad4ab7a719a (patch) | |
tree | 69c80e1d01b983672f00b41accbb03cdf34a436f /src/lib/libssl/ssl_lib.c | |
parent | 9118930a1739225789e932d31d639b1e1d796806 (diff) | |
download | openbsd-4d4b6ca21abb045b3f6584cc35a22ad4ab7a719a.tar.gz openbsd-4d4b6ca21abb045b3f6584cc35a22ad4ab7a719a.tar.bz2 openbsd-4d4b6ca21abb045b3f6584cc35a22ad4ab7a719a.zip |
Let SSL_CTX_get_ciphers(NULL) return NULL rather than crash
for compatibility with OpenSSL
and for consistency with neighbouring functions;
suggested by jsing@ after i documented the crash;
OK jsing@.
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 828aa3a08d..73bc05e967 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.228 2020/09/15 11:47:49 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.229 2020/09/16 07:25:15 schwarze 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 | * |
@@ -1336,6 +1336,8 @@ SSL_get_cipher_list(const SSL *s, int n) | |||
1336 | STACK_OF(SSL_CIPHER) * | 1336 | STACK_OF(SSL_CIPHER) * |
1337 | SSL_CTX_get_ciphers(const SSL_CTX *ctx) | 1337 | SSL_CTX_get_ciphers(const SSL_CTX *ctx) |
1338 | { | 1338 | { |
1339 | if (ctx == NULL) | ||
1340 | return NULL; | ||
1339 | return ctx->cipher_list; | 1341 | return ctx->cipher_list; |
1340 | } | 1342 | } |
1341 | 1343 | ||