]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
doc: fix OSSL_PARAM_BLD pointers in the example
authorPetr Gotthard <petr.gotthard@centrum.cz>
Tue, 8 Jun 2021 17:57:48 +0000 (19:57 +0200)
committerPauli <pauli@openssl.org>
Thu, 10 Jun 2021 12:10:26 +0000 (22:10 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15663)

doc/man3/OSSL_PARAM_BLD.pod

index 9190e81c0162c871a97a2a8e52225349d38c068f..fdc9ec30813980eabcb7c8e74c7608888b79bcc5 100644 (file)
@@ -138,15 +138,15 @@ This example shows how to create an OSSL_PARAM array that contains an RSA
 private key.
 
     OSSL_PARAM_BLD *bld = OSSL_PARAM_BLD_new();
-    OSSL_PARAM *params;
+    OSSL_PARAM *params = NULL;
 
     if (bld == NULL
-        || !OSSL_PARAM_BLD_push_BN(&bld, "p", p)
-        || !OSSL_PARAM_BLD_push_BN(&bld, "q", q)
-        || !OSSL_PARAM_BLD_push_uint(&bld, "e", e)
-        || !OSSL_PARAM_BLD_push_BN(&bld, "n", n)
-        || !OSSL_PARAM_BLD_push_BN(&bld, "d", d)
-        || (params = OSSL_PARAM_BLD_to_param(&bld)) == NULL)
+        || !OSSL_PARAM_BLD_push_BN(bld, "p", p)
+        || !OSSL_PARAM_BLD_push_BN(bld, "q", q)
+        || !OSSL_PARAM_BLD_push_uint(bld, "e", e)
+        || !OSSL_PARAM_BLD_push_BN(bld, "n", n)
+        || !OSSL_PARAM_BLD_push_BN(bld, "d", d)
+        || (params = OSSL_PARAM_BLD_to_param(bld)) == NULL)
         goto err;
     OSSL_PARAM_BLD_free(bld);
     /* Use params */
@@ -159,7 +159,7 @@ This example shows how to create an OSSL_PARAM array that contains an RSA
 public key.
 
     OSSL_PARAM_BLD *bld = OSSL_PARAM_BLD_new();
-    OSSL_PARAM *params;
+    OSSL_PARAM *params = NULL;
 
     if (nld == NULL
         || !OSSL_PARAM_BLD_push_BN(bld, "n", n)