PKCS7 / PKCS12 bundles
PKCS7 and PKCS12 are container formats for storing multiple certificates and/or keys.
write_p12(key = NULL, cert = NULL, ca = NULL, name = NULL, password = NULL, path = NULL)
write_p7b(ca, path = NULL)
read_p12(file, password = askpass)
read_p7b(file, der = is.raw(file))
a private key
certificate that matches `key`
a list of certificates (the CA chain)
a friendly title for the bundle
string or function to set/get the password.
a file where to write the output to. If `NULL` the output is returned as a raw vector.
path or raw vector with binary PKCS12 data to parse
set to TRUE for binary files and FALSE for PEM files
The PKCS#7 or P7B format is a container for one or more certificates. It can either be stored in binary form or in a PEM file. P7B files are typically used to import and export public certificates.
The PKCS#12 or PFX format is a binary-only format for storing the server certificate, any intermediate certificates, and the private key into a single encryptable file. PFX files are usually found with the extensions .pfx and .p12. PFX files are typically used to import and export certificates with their private keys.
The PKCS formats also allow for including signatures and CRLs but this is quite rare and these are currently ignored.