diff options
author | schwarze <> | 2019-08-20 10:59:09 +0000 |
---|---|---|
committer | schwarze <> | 2019-08-20 10:59:09 +0000 |
commit | ac910fc8efbc518a705326409d1b3ab0036d46af (patch) | |
tree | fed7433b1d8a85759b55f69550b7b7588fadd6e4 /src/lib/libcrypto/bn | |
parent | e4a3f1d7dd18a8a8e8975951aa9bcff4f9c51a92 (diff) | |
download | openbsd-ac910fc8efbc518a705326409d1b3ab0036d46af.tar.gz openbsd-ac910fc8efbc518a705326409d1b3ab0036d46af.tar.bz2 openbsd-ac910fc8efbc518a705326409d1b3ab0036d46af.zip |
make BN_CTX_end(NULL) a NOOP for compatibility with documented behaviour
in OpenSSL 1.1.1 even though in general, letting random functions
accept NULL is not advisable because it can hide programming errors;
"yes please" tb@
"unfortunately I suspect you're right" jsing@
"oh well" deraadt@
Diffstat (limited to 'src/lib/libcrypto/bn')
-rw-r--r-- | src/lib/libcrypto/bn/bn_ctx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_ctx.c b/src/lib/libcrypto/bn/bn_ctx.c index 1237ac1365..0d64ccab93 100644 --- a/src/lib/libcrypto/bn/bn_ctx.c +++ b/src/lib/libcrypto/bn/bn_ctx.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_ctx.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ | 1 | /* $OpenBSD: bn_ctx.c,v 1.16 2019/08/20 10:59:09 schwarze Exp $ */ |
2 | /* Written by Ulf Moeller for the OpenSSL project. */ | 2 | /* Written by Ulf Moeller for the OpenSSL project. */ |
3 | /* ==================================================================== | 3 | /* ==================================================================== |
4 | * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. | 4 | * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. |
@@ -283,6 +283,9 @@ BN_CTX_start(BN_CTX *ctx) | |||
283 | void | 283 | void |
284 | BN_CTX_end(BN_CTX *ctx) | 284 | BN_CTX_end(BN_CTX *ctx) |
285 | { | 285 | { |
286 | if (ctx == NULL) | ||
287 | return; | ||
288 | |||
286 | CTXDBG_ENTRY("BN_CTX_end", ctx); | 289 | CTXDBG_ENTRY("BN_CTX_end", ctx); |
287 | 290 | ||
288 | if (ctx->err_stack) | 291 | if (ctx->err_stack) |