Set MAC parameters in a PKCS#12 object without computing the MAC.

Synopsis

Declared in <openssl/pkcs12.h>

int
PKCS12_setup_mac(
    PKCS12* p12,
    int iter,
    unsigned char* salt,
    int saltlen,
    EVP_MD const* md_type);

Return Value

1 on success, 0 on error.

Parameters

Name

Description

p12

PKCS#12 structure to update.

iter

Iteration count for MAC key derivation (1 omits the count from the structure).

salt

Salt for MAC key derivation, or NULL to generate one.

saltlen

Length of salt in bytes.

md_type

Message digest for the HMAC.

Created with MrDocs