xenc_pkcs12_export
Export of a certificate and private key into Personal Information Exchange Syntax (PKCS#12) format.
xenc_pkcs12_export
(in key_name varchar,
in name varchar,
in pass varchar);
Parameters
key_name –
The name of a key to which key belongs X.509 certificate.
name –
A name to be recorded in the PKCS#12 structure
pass –
A password to encrypt the exported key
Errors
This function can generate the following errors:
.
Examples
Persisting a key & certificate
The example bellow 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', ''));