Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
PEM_bytes_read_bio — read a PEM-encoded data structure from a BIOSYNOPSIS
#include <openssl/pem.h>PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *in_bp, pem_password_cb *cb, void *u);
DESCRIPTION
PEM_bytes_read_bio() reads and PEM decodes the first object of type name (e.g. RSA PRIVATE KEY, CERTIFICATE, etc.) from in_bp. If multiple PEM-encoded data structures are present in the same stream, it skips non-matching data types and continues reading. Before reading each PEM object, lines not starting with “-----BEGIN ” are also skipped; see PEM_read_bio(3) for details of PEM parsing.RETURN VALUES
PEM_bytes_read_bio() returns 1 for success or 0 for failure.ERRORS
Diagnostics that can be retrieved with ERR_get_error(3), ERR_GET_REASON(3), and ERR_reason_error_string(3) include:- PEM_R_NO_START_LINE “no start line”
- No more PEM objects were found in the input. This can happen when the input contains no PEM objects at all, or only objects that do not match the type name.
- PEM_R_NOT_PROC_TYPE “not proc type”
- The first PEM header does not start with “Proc-Type: ”.
- PEM_R_NOT_ENCRYPTED “not encrypted”
- The Proc-Type header differs from “4,ENCRYPTED”.
- PEM_R_SHORT_HEADER “short header”
- The Proc-Type header is the last header line.
- PEM_R_NOT_DEK_INFO “not dek info”
- The second PEM header does not start with “DEK-Info: ”.
- PEM_R_UNSUPPORTED_ENCRYPTION “unsupported encryption”
- The cipher name given in the DEK-Info header is unknown to EVP_get_cipherbyname(3).
- PEM_R_BAD_IV_CHARS “bad iv chars”
- The word following the cipher name in the DEK-Info header contains bytes that are not hexadecimal digits. This also happens when the initialization vector is missing or too short.
- PEM_R_BAD_PASSWORD_READ “bad password read”
- cb reported failure. This may for example happen when the user mistypes the password.
- PEM_R_BAD_DECRYPT “bad decrypt”
- EVP_DecryptInit_ex(3), EVP_DecryptUpdate(3), or EVP_DecryptFinal_ex(3) failed.