summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@unified-streaming.com>2022-05-05 16:23:16 +0200
committerPauli <pauli@openssl.org>2022-05-09 10:53:25 +1000
commitecb1ed1b0e5aea5b71e8a98e95b6f9f022d61c89 (patch)
tree68ef2b5d6450d02ed7bc668c5ed3e161ffb7c9a4
parentbe92036b347e381fd606e100b6c91f1bab4b7718 (diff)
downloadopenssl-new-ecb1ed1b0e5aea5b71e8a98e95b6f9f022d61c89.tar.gz
Correct padding mode flag name for EVP_PKEY_decrypt/encrypt() examples
The example code in EVP_PKEY_decrypt(3) and EVP_PKEY_encrypt(3) and uses a nonexistent padding mode `RSA_OAEP_PADDING`, which should be `RSA_PKCS1_OAEP_PADDING` instead. CLA: trivial Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18255)
-rw-r--r--doc/man3/EVP_PKEY_decrypt.pod2
-rw-r--r--doc/man3/EVP_PKEY_encrypt.pod2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/man3/EVP_PKEY_decrypt.pod b/doc/man3/EVP_PKEY_decrypt.pod
index e85541ba81..b624600cd2 100644
--- a/doc/man3/EVP_PKEY_decrypt.pod
+++ b/doc/man3/EVP_PKEY_decrypt.pod
@@ -71,7 +71,7 @@ Decrypt data using OAEP (for RSA keys):
/* Error occurred */
if (EVP_PKEY_decrypt_init(ctx) <= 0)
/* Error */
- if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_OAEP_PADDING) <= 0)
+ if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_OAEP_PADDING) <= 0)
/* Error */
/* Determine buffer length */
diff --git a/doc/man3/EVP_PKEY_encrypt.pod b/doc/man3/EVP_PKEY_encrypt.pod
index 9ff6ed6cae..c5d91e1c18 100644
--- a/doc/man3/EVP_PKEY_encrypt.pod
+++ b/doc/man3/EVP_PKEY_encrypt.pod
@@ -74,7 +74,7 @@ set 'eng = NULL;' to start with the default OpenSSL RSA implementation:
/* Error occurred */
if (EVP_PKEY_encrypt_init(ctx) <= 0)
/* Error */
- if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_OAEP_PADDING) <= 0)
+ if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_OAEP_PADDING) <= 0)
/* Error */
/* Determine buffer length */