diff options
-rw-r--r-- | lib/libcrypto/bn/bn_ctx.c | 5 | ||||
-rw-r--r-- | lib/libcrypto/man/BN_CTX_start.3 | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/libcrypto/bn/bn_ctx.c b/lib/libcrypto/bn/bn_ctx.c index 1237ac1365c..0d64ccab932 100644 --- a/lib/libcrypto/bn/bn_ctx.c +++ b/lib/libcrypto/bn/bn_ctx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_ctx.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */ +/* $OpenBSD: bn_ctx.c,v 1.16 2019/08/20 10:59:09 schwarze Exp $ */ /* Written by Ulf Moeller for the OpenSSL project. */ /* ==================================================================== * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. @@ -283,6 +283,9 @@ BN_CTX_start(BN_CTX *ctx) void BN_CTX_end(BN_CTX *ctx) { + if (ctx == NULL) + return; + CTXDBG_ENTRY("BN_CTX_end", ctx); if (ctx->err_stack) diff --git a/lib/libcrypto/man/BN_CTX_start.3 b/lib/libcrypto/man/BN_CTX_start.3 index f4f10b8b0cf..a2b62eff5cf 100644 --- a/lib/libcrypto/man/BN_CTX_start.3 +++ b/lib/libcrypto/man/BN_CTX_start.3 @@ -1,5 +1,5 @@ -.\" $OpenBSD: BN_CTX_start.3,v 1.7 2018/03/22 16:06:33 schwarze Exp $ -.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 +.\" $OpenBSD: BN_CTX_start.3,v 1.8 2019/08/20 10:59:09 schwarze Exp $ +.\" full merge up to: OpenSSL 35fd9953 May 28 14:49:38 2019 +0200 .\" .\" This file was written by Ulf Moeller <ulf@openssl.org>. .\" Copyright (c) 2000 The OpenSSL Project. All rights reserved. @@ -48,7 +48,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 22 2018 $ +.Dd $Mdocdate: August 20 2019 $ .Dt BN_CTX_START 3 .Os .Sh NAME @@ -104,6 +104,11 @@ is called, the pointers obtained from .Fn BN_CTX_get become invalid. +If +.Fa ctx +is +.Dv NULL , +no action occurs. .Sh RETURN VALUES .Fn BN_CTX_get returns a pointer to the |