diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_decrypt.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_decrypt.3 | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_decrypt.3 b/src/lib/libcrypto/man/EVP_PKEY_decrypt.3 index 485fafb538..afba8976f1 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_decrypt.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_decrypt.3 | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | .\" $OpenBSD: EVP_PKEY_decrypt.3,v 1.4 2016/11/27 15:27:19 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_decrypt.3,v 1.5 2018/02/15 12:52:37 schwarze Exp $ |
| 2 | .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 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>. |
| 5 | .\" Copyright (c) 2006, 2009, 2013 The OpenSSL Project. All rights reserved. | 5 | .\" Copyright (c) 2006, 2009, 2013, 2018 The OpenSSL Project. |
| 6 | .\" All rights reserved. | ||
| 6 | .\" | 7 | .\" |
| 7 | .\" Redistribution and use in source and binary forms, with or without | 8 | .\" Redistribution and use in source and binary forms, with or without |
| 8 | .\" modification, are permitted provided that the following conditions | 9 | .\" modification, are permitted provided that the following conditions |
| @@ -48,7 +49,7 @@ | |||
| 48 | .\" 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 |
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 50 | .\" | 51 | .\" |
| 51 | .Dd $Mdocdate: November 27 2016 $ | 52 | .Dd $Mdocdate: February 15 2018 $ |
| 52 | .Dt EVP_PKEY_DECRYPT 3 | 53 | .Dt EVP_PKEY_DECRYPT 3 |
| 53 | .Os | 54 | .Os |
| 54 | .Sh NAME | 55 | .Sh NAME |
| @@ -129,13 +130,16 @@ Decrypt data using OAEP (for RSA keys): | |||
| 129 | #include <openssl/rsa.h> | 130 | #include <openssl/rsa.h> |
| 130 | 131 | ||
| 131 | EVP_PKEY_CTX *ctx; | 132 | EVP_PKEY_CTX *ctx; |
| 133 | ENGINE *eng; | ||
| 132 | unsigned char *out, *in; | 134 | unsigned char *out, *in; |
| 133 | size_t outlen, inlen; | 135 | size_t outlen, inlen; |
| 134 | EVP_PKEY *key; | 136 | EVP_PKEY *key; |
| 135 | /* NB: assumes key in, inlen are already set up | 137 | |
| 136 | * and that key is an RSA private key | 138 | /* |
| 139 | * Assumes that key, eng, in, and inlen are already set up | ||
| 140 | * and that key is an RSA private key. | ||
| 137 | */ | 141 | */ |
| 138 | ctx = EVP_PKEY_CTX_new(key); | 142 | ctx = EVP_PKEY_CTX_new(key, eng); |
| 139 | if (!ctx) | 143 | if (!ctx) |
| 140 | /* Error occurred */ | 144 | /* Error occurred */ |
| 141 | if (EVP_PKEY_decrypt_init(ctx) <= 0) | 145 | if (EVP_PKEY_decrypt_init(ctx) <= 0) |
