From ac7750bb5ec4238c4f6514eb174c1bd584728f05 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Wed, 25 Nov 2020 15:21:52 +1000 Subject: Fix Segfault in EVP_PKEY_CTX_dup when the ctx has an undefined operation. Fixes #12438 Note: This worked in 1.1.1 so just returning an error is not valid. Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/13505) --- doc/man3/EVP_PKEY_CTX_new.pod | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/man3/EVP_PKEY_CTX_new.pod b/doc/man3/EVP_PKEY_CTX_new.pod index 1b23c2a403..3342386d94 100644 --- a/doc/man3/EVP_PKEY_CTX_new.pod +++ b/doc/man3/EVP_PKEY_CTX_new.pod @@ -47,7 +47,8 @@ used when no B structure is associated with the operations, for example during parameter generation or key generation for some algorithms. -EVP_PKEY_CTX_dup() duplicates the context I. +EVP_PKEY_CTX_dup() duplicates the context I. It is not supported for a +keygen operation. EVP_PKEY_CTX_free() frees up the context I. If I is NULL, nothing is done. @@ -96,7 +97,7 @@ documentation for more information. =head1 RETURN VALUES -EVP_PKEY_CTX_new(), EVP_PKEY_CTX_new_id(), EVP_PKEY_CTX_dup() returns either +EVP_PKEY_CTX_new(), EVP_PKEY_CTX_new_id() and EVP_PKEY_CTX_dup() return either the newly allocated B structure or B if an error occurred. EVP_PKEY_CTX_free() does not return a value. -- cgit v1.2.3