Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
PEM_X509_INFO_read, PEM_X509_INFO_read_bio — PEM and DER decode X.509 certificates, private keys, and revocation listsSYNOPSIS
#include <openssl/pem.h>PEM_X509_INFO_read(FILE *in_fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u);
PEM_X509_INFO_read_bio(BIO *in_bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u);
DESCRIPTION
These functions read zero or more objects related to X.509 certificates from in_fp or in_bp, perform both PEM and DER decoding, and wrap the resulting objects in newly allocated X509_INFO containers.PEM type name | decoder |
X509_INFO field |
CERTIFICATE | d2i_X509(3) | certificate |
X509 CERTIFICATE | d2i_X509(3) | certificate |
TRUSTED CERTIFICATE | d2i_X509_AUX(3) | certificate |
X509 CRL | d2i_X509_CRL(3) | revocation list |
RSA PRIVATE KEY | d2i_PrivateKey(3) | private key |
DSA PRIVATE KEY | d2i_PrivateKey(3) | private key |
EC PRIVATE KEY | d2i_PrivateKey(3) | private key |
RETURN VALUES
These functions return a pointer to the stack the objects read were pushed onto or NULL if an error occurs. They fail if PEM_read_bio(3), PEM_get_EVP_CIPHER_INFO(3), PEM_do_header(3), or DER decoding fails or if memory is exhausted.ERRORS
Diagnostics that can be retrieved with ERR_get_error(3), ERR_GET_REASON(3), and ERR_reason_error_string(3) include:- ERR_R_ASN1_LIB “ASN1 lib”
- DER decoding of a PEM object failed.
- ERR_R_BUF_LIB “BUF lib”
- PEM_X509_INFO_read() failed to set up a temporary BIO, for example because memory was exhausted.
- ERR_R_MALLOC_FAILURE “malloc failure”
- PEM_X509_INFO_read_bio() failed to allocate a new X509_INFO, STACK_OF(X509_INFO), or X509_PKEY object.