PKCS12_PARSE(3)
π NAME π
okay so this is PKCS12_PARSE(3), from the Library Functions Manual (that's the manual name, bestie), libcrypto edition. The function is PKCS12_parse β it parses a PKCS#12 structure. That's the whole assignment. Periodt. π
β¨ SYNOPSIS β¨
the synopsis is giving:
library βlibcryptoβ #include <openssl/pkcs12.h>
int
PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey,
X509 **cert, STACK_OF(X509) **ca);
π«Ά DESCRIPTION π«Ά
PKCS12_parse() parses a PKCS12 structure. Iconic. π
p12β thePKCS12structure you're parsing.passβ the passphrase to use.
If everything goes off without a hitch, the private key gets written to *pkey, the corresponding certificate to *cert, and any additional certificates to *ca. β¨
β οΈ the parameterspkeyandcertcannot beNULLβ no cap, that's not allowed.cacan beNULL, and in that case additional certificates will be discarded. ποΈ
*ca can also be a valid STACK, and then additional certificates are appended to *ca. If *ca is NULL, a new STACK will be allocated. π«Ά
The friendlyName and localKeyID attributes (if present) of each certificate will be stored in the alias and keyid attributes of the X509 structure. iykyk. π
π RETURN VALUES π
PKCS12_parse() returns 1 for success and 0 if an error occurred. The error can be obtained from ERR_get_error(3). slay when it's 1, sad girl hours when it's 0. π
π¦ SEE ALSO π¦
go read these too, bestie:
πΈ HISTORY πΈ
PKCS12_parse() first appeared in OpenSSL 0.9.3 and has been available since OpenBSD 2.6. she's been around, okay? π
π BUGS π
- this function only returns a single private key and its corresponding certificate. if a more complex PKCS#12 file has multiple private keys, only the first match comes back. π
- right now, only
friendlyNameandlocalKeyIDattributes get stored in certificates. every other attribute is discarded. π - attributes currently cannot be stored in the private key
EVP_PKEYstructure. π
mwah π β this page is from Debian, dated June 8, 2025, and it's literally PKCS12_PARSE(3). bye bestie! π«Ά
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2002, 2009 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms