PKCS12_gen_mac

Generate the HMAC for a PKCS#12 object using configured MAC parameters.

Synopsis

Declared in <openssl/pkcs12.h>

int
PKCS12_gen_mac(
    PKCS12* p12,
    char const* pass,
    int passlen,
    unsigned char* mac,
    unsigned int* maclen);

Return Value

1 on success, 0 on error.

Parameters

NameDescription
p12PKCS#12 structure with MAC parameters already set.
passPassphrase for the HMAC.
passlenLength of pass, or -1 to use strlen().
macBuffer to receive the MAC value.
maclenAddress to receive MAC length in bytes on input and output.