From 9a2973ba6722d7f6f483e43824f46bc0d6e3aa6a Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 19 Nov 2023 10:09:27 +0000 Subject: [PATCH] EVP_PKEY_encrypt() simplify example In particular, do not use an uninitialized engine, simply pass NULL. --- lib/libcrypto/man/EVP_PKEY_encrypt.3 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/libcrypto/man/EVP_PKEY_encrypt.3 b/lib/libcrypto/man/EVP_PKEY_encrypt.3 index a13594b5e3d..6b9f8fa68d5 100644 --- a/lib/libcrypto/man/EVP_PKEY_encrypt.3 +++ b/lib/libcrypto/man/EVP_PKEY_encrypt.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: EVP_PKEY_encrypt.3,v 1.8 2023/05/14 09:29:37 tb Exp $ +.\" $OpenBSD: EVP_PKEY_encrypt.3,v 1.9 2023/11/19 10:09:27 tb Exp $ .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 .\" .\" This file was written by Dr. Stephen Henson . @@ -49,7 +49,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 14 2023 $ +.Dd $Mdocdate: November 19 2023 $ .Dt EVP_PKEY_ENCRYPT 3 .Os .Sh NAME @@ -138,17 +138,15 @@ to start with the default OpenSSL RSA implementation: .Bd -literal -offset indent #include #include -#include EVP_PKEY_CTX *ctx; -ENGINE *eng; unsigned char *out, *in; size_t outlen, inlen; EVP_PKEY *key; -/* NB: assumes eng, key in, inlen are already set up +/* NB: assumes that key, in, inlen are already set up * and that key is an RSA public key */ -ctx = EVP_PKEY_CTX_new(key, eng); +ctx = EVP_PKEY_CTX_new(key, NULL); if (!ctx) /* Error occurred */ if (EVP_PKEY_encrypt_init(ctx) <= 0) -- 2.20.1