Top

Name

xenc_pkcs12_export — Generates a secure Public-Key Cryptography Standards (PKCS#12) file from a PEM (base64 encoded DER) file comprised of an X.509 certificate and an associated Private Key.

Synopsis

xenc_pkcs12_export ( in key_name varchar ,
  in name varchar ,
  in pass varchar ,
  in export_chain integer := 0 ,
  in additional_certs varchar );
 

Description

Generates a secure Public-Key Cryptography Standards (PKCS#12) file from a PEM (base64 encoded DER) file comprised of an X.509 certificate and an associated Private Key.

Parameters

key_name

Name that identifies private key associated with X.509 certificate.

name

Name to used to identify each pkcs#12 object bundle.

pass

A password or pass phrase used to encrypt the pkcs#12 file

export_chain

1/0 - to export the certificate chain if there is a such

additional_certs

Certificates in PEM format to be added to the bundle even if they are not in the certificate chain stored in the memory object of the certificate

Examples

Example 24.480. Persisting a key & certificate

The example below persists a key named 'id_rsa' and certificate created for it into user's key space. Thus after server restart the key will be available again.

USER_KEY_STORE (user, 'id_rsa', 'X.509', 2, '', xenc_pkcs12_export ('id_rsa', 'CA Certificate', ''));