NAME
PKCS12parse - parse a PKCS#12 structure
SYNOPSIS
#include
int PKCS12parse(PKCS12 *p12, const char *pass, EVPPKEY **pkey, X509 **cert, STACKOF(X509) **ca);DESCRIPTION
PKCS12parse() parses a PKCS12 structure. pp1122 is the PPKKCCSS1122 structure to parse. ppaassss is the passphrase to use. If successful the private key will be written to **ppkkeeyy, the corresponding certificate to **cceerrtt and any additional certificates to **ccaa. NNOOTTEESS The parameters ppkkeeyy and cceerrtt cannot be NNUULLLL. ccaa can bein which case additional certificates will be discarded. **ccaa can also be a valid STACK in which case additional certificates are appended to **ccaa. If **ccaa is NNUULLLL a new STACK will be allocated. The ffrriieennddllyyNNaammee and llooccaallKKeeyyIIDD attributes (if present) on each certificate will be stored in the aalliiaass and kkeeyyiidd attributes of the XX550099 structure. BUGS
Only a single private key and corresponding certificate is returned bythis function. More complex PKCS#12 files with multiple private keys
will only return the first match. Only ffrriieennddllyyNNaammee and llooccaallKKeeyyIIDD attributes are currently stored in certificates. Other attributes are discarded. Attributes currently cannot be store in the private key EEVVPPPPKKEEYY structure.SEE ALSO
d2iPKCS12(3) HISTORY PKCS12parse was added in OpenSSL 0.9.30.9.7l 2002-10-09 PKCS12parse(3)