From 4f899849ceec7cd8e45da9aa1802df782cf80202 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?utf8?q?=D0=B0?= Date: Thu, 12 Sep 2024 16:01:21 +0200 Subject: [PATCH] Fix examples in EVP_PKEY_encapsulate/decapsulate documentation Fixes #25448 Reviewed-by: Matt Caswell Reviewed-by: Dmitry Belyavskiy Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25450) --- doc/man3/EVP_PKEY_decapsulate.pod | 2 +- doc/man3/EVP_PKEY_encapsulate.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man3/EVP_PKEY_decapsulate.pod b/doc/man3/EVP_PKEY_decapsulate.pod index b59aab8bbf9..c18427e4115 100644 --- a/doc/man3/EVP_PKEY_decapsulate.pod +++ b/doc/man3/EVP_PKEY_decapsulate.pod @@ -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 */ diff --git a/doc/man3/EVP_PKEY_encapsulate.pod b/doc/man3/EVP_PKEY_encapsulate.pod index 6874f31cf5b..042b169a175 100644 --- a/doc/man3/EVP_PKEY_encapsulate.pod +++ b/doc/man3/EVP_PKEY_encapsulate.pod @@ -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 */ -- 2.47.2