summaryrefslogtreecommitdiffstats
path: root/doc/man3/OSSL_CRMF_pbmp_new.pod
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man3/OSSL_CRMF_pbmp_new.pod')
-rw-r--r--doc/man3/OSSL_CRMF_pbmp_new.pod22
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/man3/OSSL_CRMF_pbmp_new.pod b/doc/man3/OSSL_CRMF_pbmp_new.pod
index d386d2b264..a83209b51a 100644
--- a/doc/man3/OSSL_CRMF_pbmp_new.pod
+++ b/doc/man3/OSSL_CRMF_pbmp_new.pod
@@ -13,7 +13,7 @@ OSSL_CRMF_pbmp_new
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, unsigned int *maclen);
+ unsigned char **mac, size_t *maclen);
OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(size_t saltlen, int owfnid,
int itercnt, int macnid);
@@ -22,23 +22,23 @@ OSSL_CRMF_pbmp_new
OSSL_CRMF_pbm_new() generates a PBM (Password-Based MAC) based on given PBM
parameters B<pbmp>, message B<msg>, and secret B<sec>, along with the respective
-lengths B<msglen> and B<seclen>. Will write the adddress of the newly allocated
-MAC via the B<mac> reference parameter and the length via the B<maclen> reference
-parameter. Any previous pointer referred to by B<mac> will be freed if not NULL.
+lengths B<msglen> and B<seclen>. On success writes the adddress 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 new a random salt of given length B<saltlen>, OWF (one-way
+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>.
=head1 NOTES
-The OWF (one-way function) and for the MAC (message authentication code) may be
-any with a NID defined in B<openssl/objects.h>,
-which also should include NID_hmac_sha1 which is specified by RFC 4210.
+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.
@@ -53,9 +53,9 @@ structure, or NULL on error.
OSSL_CRMF_PBMPARAMETER *pbm = NULL;
unsigned char *msg = "Hello";
- unsigend char *sec = "SeCrEt";
- unsigend char *mac = NULL;
- unsigend int maclen;
+ unsigned char *sec = "SeCrEt";
+ unsigned char *mac = NULL;
+ size_t maclen;
if ((pbm = OSSL_CRMF_pbmp_new(16, NID_sha256, 500, NID_hmac_sha1) == NULL))
goto err;