]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix examples in EVP_PKEY_encapsulate/decapsulate documentation
authorЗишан Мирза <zmirza@tutanota.de>
Thu, 12 Sep 2024 14:01:21 +0000 (16:01 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 26 Sep 2024 08:30:57 +0000 (10:30 +0200)
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)

(cherry picked from commit 4f899849ceec7cd8e45da9aa1802df782cf80202)

doc/man3/EVP_PKEY_decapsulate.pod
doc/man3/EVP_PKEY_encapsulate.pod

index 819291627bb8b8b39e2ca37fce6bccc8ca0b3aa2..833c34152ac138a5e6ecfa641038ea1de351f38b 100644 (file)
@@ -57,7 +57,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 */
index 0ee7d627904d1350deb78f1c6058cbe0e74e7224..573088c3bf58face044f6e01eb30e803c15197e4 100644 (file)
@@ -63,7 +63,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 */