Fix examples in EVP_PKEY_encapsulate/decapsulate documentation
Fixes #25448 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25450)
This commit is contained in:
parent
ffc5a29608
commit
4f899849ce
@ -64,7 +64,7 @@ Decapsulate data using RSA:
|
||||
unsigned char *secret = NULL;;
|
||||
|
||||
ctx = EVP_PKEY_CTX_new_from_pkey(libctx, rsa_priv_key, NULL);
|
||||
if (ctx = NULL)
|
||||
if (ctx == NULL)
|
||||
/* Error */
|
||||
if (EVP_PKEY_decapsulate_init(ctx, NULL) <= 0)
|
||||
/* Error */
|
||||
|
@ -70,7 +70,7 @@ Encapsulate an RSASVE key (for RSA keys).
|
||||
unsigned char *out = NULL, *secret = NULL;
|
||||
|
||||
ctx = EVP_PKEY_CTX_new_from_pkey(libctx, rsa_pub_key, NULL);
|
||||
if (ctx = NULL)
|
||||
if (ctx == NULL)
|
||||
/* Error */
|
||||
if (EVP_PKEY_encapsulate_init(ctx, NULL) <= 0)
|
||||
/* Error */
|
||||
|
Loading…
x
Reference in New Issue
Block a user