Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
PEM_write, PEM_write_bio, PEM_read, PEM_read_bio, PEM_get_EVP_CIPHER_INFO, PEM_do_header, PEM_def_callback, pem_password_cb — PEM encoding routinesSYNOPSIS
#include <openssl/pem.h>PEM_write(FILE *fp, const char *name, const char *header, const unsigned char *data, long len);
PEM_write_bio(BIO *bp, const char *name, const char *header, const unsigned char *data, long len);
PEM_read(FILE *fp, char **name, char **header, unsigned char **data, long *len);
PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data, long *len);
PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cinfo);
PEM_do_header(EVP_CIPHER_INFO *cinfo, unsigned char *data, long *len, pem_password_cb *cb, void *userdata);
PEM_def_callback(char *password, int size, int verify, void *userdata);
pem_password_cb(char *password, int size, int verify, void *userdata);
DESCRIPTION
These functions read and write PEM-encoded objects, using the PEM type name, any additional header information, and the raw data of length len.-----BEGIN PRIVATE KEY----- MIICdg.... ... bhTQ== -----END PRIVATE KEY-----
- 1
bytes are accepted from the user and copied into the byte string buffer password. A callback function cb supplied by the application may use userdata for a different purpose than PEM_def_callback() does, e.g., as auxiliary data to use while acquiring the password. For example, a GUI application might pass a window handle. If the verify flag is non-zero, the user is prompted twice for the password to make typos less likely and it is checked that both inputs agree. This flag is not set by PEM_do_header() nor by other read functions, but it is typically set by write functions.