OpenSSL PKCS12_parse(3openssl)
NNNNAAAAMMMMEEEEPKCS12_parse - parse a PKCS#12 structure
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS#include
int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY
**pkey, X509 **cert, STACK_OF(X509) **ca);
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNPKCS12_parse() parses a PKCS12 structure.
pppp11112222 is the PPPPKKKKCCCCSSSS11112222 structure to parse. ppppaaaassssssss is the passphrase to use. If successful the private key will be written to ****ppppkkkkeeeeyyyy, the corresponding certificate to ****cccceeeerrrrtttt and any additional certificates to ****ccccaaaa. NNNNOOOOTTTTEEEESSSS The parameters ppppkkkkeeeeyyyy and cccceeeerrrrtttt cannot be NNNNUUUULLLLLLLL. ccccaaaa can bein which case additional certificates will be discarded. ****ccccaaaa can also be a valid STACK in which case additional certificates are appended to ****ccccaaaa. If ****ccccaaaa is NNNNUUUULLLLLLLL a new STACK will be allocated. The ffffrrrriiiieeeennnnddddllllyyyyNNNNaaaammmmeeee and llllooooccccaaaallllKKKKeeeeyyyyIIIIDDDD attributes (if present) on each certificate will be stored in the aaaalllliiiiaaaassss and kkkkeeeeyyyyiiiidddd attributes of the XXXX555500009999 structure. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS PKCS12_parse() returns 1 for success and zero if an error
occurred.The error can be obtained from ERR_get_error(3)
BBBBUUUUGGGGSSSS Only a single private key and corresponding certificate isreturned by this function. More complex PKCS#12 files with
multiple private keys will only return the first match. Only ffffrrrriiiieeeennnnddddllllyyyyNNNNaaaammmmeeee and llllooooccccaaaallllKKKKeeeeyyyyIIIIDDDD attributes are currently stored in certificates. Other attributes are discarded. Attributes currently cannot be stored in the private keyEEEEVVVVPPPP_PPPPKKKKEEEEYYYY structure.
SSSSEEEEEEEE AAAALLLLSSSSOOOOd2i_PKCS12(3)
HHHHIIIISSSSTTTTOOOORRRRYYYYPKCS12_parse was added in OpenSSL 0.9.3
17/May/2009 Last change: 0.9.8o 1
OpenSSL PKCS12_parse(3openssl)
17/May/2009 Last change: 0.9.8o 2