PKCS12_parse

Parse a PKCS#12 structure and extract key, certificate, and CA certificates.

Synopsis

Declared in <openssl/pkcs12.h>

int
PKCS12_parse(
    PKCS12* p12,
    char const* pass,
    EVP_PKEY** pkey,
    X509** cert,
    stack_st_X509** ca);

Return Value

1 on success, 0 on error.

Parameters

NameDescription
p12PKCS#12 structure to parse.
passPassphrase (UTF-8, or ISO8859-1 if not valid UTF-8).
pkeyAddress of pointer to receive the private key, or NULL to discard.
certAddress of pointer to receive the entity certificate, or NULL to discard.
caAddress of stack pointer to receive additional certificates, or NULL to discard.