]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - doc/man3/OSSL_CRMF_pbmp_new.pod
Add OPENSSL_CTX parameter to OSSL_CRMF_pbmp_new() and improve its doc
[thirdparty/openssl.git] / doc / man3 / OSSL_CRMF_pbmp_new.pod
index 8e07032cd110c2a58870aa91e7bed32a6db5183d..566775394437804ad08b02dd285b40a08bf77cff 100644 (file)
@@ -8,15 +8,16 @@ OSSL_CRMF_pbmp_new
 
 =head1 SYNOPSIS
 
 #include <openssl/crmf.h>
+ #include <openssl/crmf.h>
 
 int OSSL_CRMF_pbm_new(const OSSL_CRMF_PBMPARAMETER *pbmp,
-                        const unsigned char *msg, size_t msglen,
-                        const unsigned char *sec, size_t seclen,
-                        unsigned char **mac, size_t *maclen);
+ int OSSL_CRMF_pbm_new(const OSSL_CRMF_PBMPARAMETER *pbmp,
+                       const unsigned char *msg, size_t msglen,
+                       const unsigned char *sec, size_t seclen,
+                       unsigned char **mac, size_t *maclen);
 
-  OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(size_t saltlen, int owfnid,
-                                             int itercnt, int macnid);
+ OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(OPENSSL_CTX *libctx, size_t saltlen,
+                                            int owfnid, size_t itercnt,
+                                            int macnid);
 
 =head1 DESCRIPTION
 
@@ -26,13 +27,12 @@ lengths B<msglen> and B<seclen>. On success writes the address of the newly
 allocated MAC via the B<mac> reference parameter and writes the length via the
 B<maclen> reference parameter unless it its NULL.
 
-The iteration count must be at least 100, as stipulated by RFC 4211, and is
-limited to at most 100000 to avoid DoS through manipulated or otherwise
-malformed input.
-
-OSSL_CRMF_pbmp_new() initializes and returns a new PBMParameter
-structure with a new random salt of given length B<saltlen>, OWF (one-way
-function) NID B<owfnid>, iteration count B<itercnt>, and MAC NID B<macnid>.
+OSSL_CRMF_pbmp_new() initializes and returns a new B<PBMParameter> structure
+with a new random salt of given length B<saltlen>,
+OWF (one-way function) NID B<owfnid>, OWF iteration count B<itercnt>,
+and MAC NID B<macnid>.
+The library context I<libctx> parameter may be used to select the provider
+for the random number generation (DRBG) and may be NULL for the default.
 
 =head1 NOTES
 
@@ -40,7 +40,12 @@ The algorithms for the OWF (one-way function) and for the MAC (message
 authentication code) may be any with a NID defined in B<openssl/objects.h>.
 As specified by RFC 4210, these should include NID_hmac_sha1.
 
-RFC 4210 recommends that the salt SHOULD be at least 8 bytes (64 bits) long.
+RFC 4210 recommends that the salt SHOULD be at least 8 bytes (64 bits) long,
+where 16 bytes is common.
+
+The iteration count must be at least 100, as stipulated by RFC 4211, and is
+limited to at most 100000 to avoid DoS through manipulated or otherwise
+malformed input.
 
 =head1 RETURN VALUES