summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-07-21 08:10:17 +0000
committertb <>2024-07-21 08:10:17 +0000
commit86aaa1a75b1ec5c71ec61555983060ddada87eb6 (patch)
tree436594108963eccaeb3a60401739c36992016a7b /src
parent2f583c1925ad8787ab976313ff0624118e33b08b (diff)
downloadopenbsd-86aaa1a75b1ec5c71ec61555983060ddada87eb6.tar.gz
openbsd-86aaa1a75b1ec5c71ec61555983060ddada87eb6.tar.bz2
openbsd-86aaa1a75b1ec5c71ec61555983060ddada87eb6.zip
Garbage collect ENGINE "use" from EVP_PKEY_decrypt() example
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_decrypt.39
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_decrypt.3 b/src/lib/libcrypto/man/EVP_PKEY_decrypt.3
index af5ed93fba..2166003af8 100644
--- a/src/lib/libcrypto/man/EVP_PKEY_decrypt.3
+++ b/src/lib/libcrypto/man/EVP_PKEY_decrypt.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: EVP_PKEY_decrypt.3,v 1.8 2022/03/31 17:27:17 naddy Exp $ 1.\" $OpenBSD: EVP_PKEY_decrypt.3,v 1.9 2024/07/21 08:10:17 tb Exp $
2.\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100 2.\" full merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: March 31 2022 $ 52.Dd $Mdocdate: July 21 2024 $
53.Dt EVP_PKEY_DECRYPT 3 53.Dt EVP_PKEY_DECRYPT 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -130,16 +130,15 @@ Decrypt data using OAEP (for RSA keys):
130#include <openssl/rsa.h> 130#include <openssl/rsa.h>
131 131
132EVP_PKEY_CTX *ctx; 132EVP_PKEY_CTX *ctx;
133ENGINE *eng;
134unsigned char *out, *in; 133unsigned char *out, *in;
135size_t outlen, inlen; 134size_t outlen, inlen;
136EVP_PKEY *key; 135EVP_PKEY *key;
137 136
138/* 137/*
139 * Assumes that key, eng, in, and inlen are already set up 138 * Assumes that key, in, and inlen are already set up
140 * and that key is an RSA private key. 139 * and that key is an RSA private key.
141 */ 140 */
142ctx = EVP_PKEY_CTX_new(key, eng); 141ctx = EVP_PKEY_CTX_new(key, NULL);
143if (!ctx) 142if (!ctx)
144 /* Error occurred */ 143 /* Error occurred */
145if (EVP_PKEY_decrypt_init(ctx) <= 0) 144if (EVP_PKEY_decrypt_init(ctx) <= 0)