write_p12 {openssl}R Documentation

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.


[Package openssl version 2.2.0 Index]