Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pkcs12

PKCS7 / PKCS12 bundles


Description

PKCS7 and PKCS12 are container formats for storing multiple certificates and/or keys.

Usage

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))

Arguments

key

a private key

cert

certificate that matches 'key'

ca

a list of certificates (the CA chain)

name

a friendly title for the bundle

password

string or function to set/get the password.

path

a file where to write the output to. If 'NULL' the output is returned as a raw vector.

file

path or raw vector with binary PKCS12 data to parse

der

set to TRUE for binary files and FALSE for PEM files

Details

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.


openssl

Toolkit for Encryption, Signatures and Certificates Based on OpenSSL

v1.4.4
MIT + file LICENSE
Authors
Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Oliver Keyes [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.