mirror of https://github.com/openssl/openssl.git
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)
This commit is contained in:
parent
be92036b34
commit
ecb1ed1b0e
|
@ -71,7 +71,7 @@ Decrypt data using OAEP (for RSA keys):
|
||||||
/* Error occurred */
|
/* Error occurred */
|
||||||
if (EVP_PKEY_decrypt_init(ctx) <= 0)
|
if (EVP_PKEY_decrypt_init(ctx) <= 0)
|
||||||
/* Error */
|
/* 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 */
|
/* Error */
|
||||||
|
|
||||||
/* Determine buffer length */
|
/* Determine buffer length */
|
||||||
|
|
|
@ -74,7 +74,7 @@ set 'eng = NULL;' to start with the default OpenSSL RSA implementation:
|
||||||
/* Error occurred */
|
/* Error occurred */
|
||||||
if (EVP_PKEY_encrypt_init(ctx) <= 0)
|
if (EVP_PKEY_encrypt_init(ctx) <= 0)
|
||||||
/* Error */
|
/* 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 */
|
/* Error */
|
||||||
|
|
||||||
/* Determine buffer length */
|
/* Determine buffer length */
|
||||||
|
|
Loading…
Reference in New Issue