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

Name

Description

p12

PKCS#12 structure to parse.

pass

Passphrase (UTF‐8, or ISO8859‐1 if not valid UTF‐8).

pkey

Address of pointer to receive the private key, or NULL to discard.

cert

Address of pointer to receive the entity certificate, or NULL to discard.

ca

Address of stack pointer to receive additional certificates, or NULL to discard.

Created with MrDocs