- data = pki:privateKey([format])
- data = pki:publicKey([format])
- result = pki:savePrivateKey(filename[, format])
- result = pki:savePublicKey(filename[, format])
SYNOPSIS
DESCRIPTION
This is a set of function to retrieve a stored key. The first two forms return the data as a Lua string variable, the second two forms save the key to a file.
The supported formats are "PEM" or "DER", the default is "PEM".
RETURN VALUE
On success, the first two forms return a string, the second two forms write a file and return true.
In case of an error returns three values: nil, a string describing the error and a negative error code from the underlying mbed TLS implementation.