From: Richard Levitte Date: Thu, 9 Jul 2020 05:47:12 +0000 (+0200) Subject: DOC: Fix check of EVP_PKEY_fromdata{,_init} in examples X-Git-Tag: openssl-3.0.0-alpha7~372 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6353507e9d4afe666ade7b8fdf0f0e673f57b36c;p=thirdparty%2Fopenssl.git DOC: Fix check of EVP_PKEY_fromdata{,_init} in examples Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/12389) --- diff --git a/doc/man3/EVP_PKEY_fromdata.pod b/doc/man3/EVP_PKEY_fromdata.pod index f488441b93c..aaf545d648d 100644 --- a/doc/man3/EVP_PKEY_fromdata.pod +++ b/doc/man3/EVP_PKEY_fromdata.pod @@ -110,8 +110,8 @@ TODO Write a set of cookbook documents and link to them. EVP_PKEY *pkey = NULL; if (ctx == NULL - || !EVP_PKEY_key_fromdata_init(ctx) - || !EVP_PKEY_fromdata(ctx, &pkey, params)) + || EVP_PKEY_key_fromdata_init(ctx) <= 0 + || EVP_PKEY_fromdata(ctx, &pkey, params) <= 0) exit(1); /* Do what you want with |pkey| */ @@ -173,8 +173,8 @@ TODO Write a set of cookbook documents and link to them. ctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL); if (ctx == NULL || params != NULL - || !EVP_PKEY_key_fromdata_init(ctx) - || !EVP_PKEY_fromdata(ctx, &pkey, params)) { + || EVP_PKEY_key_fromdata_init(ctx) <= 0 + || EVP_PKEY_fromdata(ctx, &pkey, params) <= 0) { exitcode = 1; } else { /* Do what you want with |pkey| */