NEWS: note OSSL_PARAM_BLD API as public.
[openssl.git] / doc / man3 / OSSL_PARAM_BLD_new.pod
similarity index 92%
rename from doc/man3/OSSL_PARAM_BLD_init.pod
rename to doc/man3/OSSL_PARAM_BLD_new.pod
index 0b61ece8bc1fed7329bcdc7759a433abd4bbbb25..8aeb0aadf0a696e37404718988848d433b7eefb3 100644 (file)
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-OSSL_PARAM_BLD_init, OSSL_PARAM_BLD_to_param,
+OSSL_PARAM_BLD_new, OSSL_PARAM_BLD_to_param, OSSL_PARAM_BLD_free_params,
 OSSL_PARAM_BLD_free, OSSL_PARAM_BLD_push_int, OSSL_PARAM_BLD_push_uint,
 OSSL_PARAM_BLD_push_long, OSSL_PARAM_BLD_push_ulong,
 OSSL_PARAM_BLD_push_int32, OSSL_PARAM_BLD_push_uint32,
@@ -24,7 +24,8 @@ OSSL_PARAM_BLD_push_octet_string, OSSL_PARAM_BLD_push_octet_ptr
 
  void OSSL_PARAM_BLD_init(OSSL_PARAM_BLD *bld);
  OSSL_PARAM *OSSL_PARAM_BLD_to_param(OSSL_PARAM_BLD *bld);
- void OSSL_PARAM_BLD_free(OSSL_PARAM *params);
+ void OSSL_PARAM_BLD_free_params(OSSL_PARAM *params);
+ void OSSL_PARAM_BLD_free(OSSL_PARAM_BLD *bld);
 
  int OSSL_PARAM_BLD_push_TYPE(OSSL_PARAM_BLD *bld, const char *key, TYPE val);
 
@@ -52,12 +53,15 @@ OSSL_PARAM_BLD_init() initialises the OSSL_PARAM_BLD structure so that values
 can be added.
 Any existing values are cleared.
 
+OSSL_PARAM_BLD_free() deallocates the memory allocates by OSSL_PARAM_BLD_new().
+
 OSSL_PARAM_BLD_to_param() converts a built up OSSL_PARAM_BLD structure
 I<bld> into an allocated OSSL_PARAM array.
 The OSSL_PARAM array and all associated storage must be freed by calling
-OSSL_PARAM_BLD_free() with the functions return value.
+OSSL_PARAM_BLD_free_params() with the functions return value.
+OSSL_PARAM_BLD_free() can safely be called any time after this function is.
 
-OSSL_PARAM_BLD_free() deallocates the memory allocated by
+OSSL_PARAM_BLD_free_params() deallocates the memory allocated by
 OSSL_PARAM_BLD_to_param().
 
 =begin comment
@@ -156,9 +160,10 @@ private key.
         || !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 */
     ...
-    OSSL_PARAM_BLD_free(params);
+    OSSL_PARAM_BLD_free_params(params);
 
 =head2 Example 2
 
@@ -173,9 +178,10 @@ public key.
         || !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 */
     ...
-    OSSL_PARAM_BLD_free(params);
+    OSSL_PARAM_BLD_free_params(params);
 
 =head1 SEE ALSO