PEM_X509_INFO_READ_BIO_EX(3SSL)
π NAME π
okay so bestie, meet the squad: PEM_X509_INFO_read_ex, PEM_X509_INFO_read, PEM_X509_INFO_read_bio_ex, and PEM_X509_INFO_read_bio β they read PEM-encoded data structures into one or more X509_INFO objects β¨ (yes that's the whole job, and they eat π
)
πΈ SYNOPSIS πΈ
#include <openssl/pem.h>
STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk,
pem_password_cb *cb, void *u,
OSSL_LIB_CTX *libctx,
const char *propq);
STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
pem_password_cb *cb, void *u);
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bio,
STACK_OF(X509_INFO) *sk,
pem_password_cb *cb, void *u,
OSSL_LIB_CTX *libctx,
const char *propq);
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
pem_password_cb *cb, void *u);
π¦ DESCRIPTION π¦
PEM_X509_INFO_read_ex() loads the X509_INFO objects from a file fp. like, straight off the disk, no cap πΎ
PEM_X509_INFO_read() is similar to PEM_X509_INFO_read_ex() but uses the default (NULL) library context libctx and empty property query propq. it's giving "the chill version" π«Ά
PEM_X509_INFO_read_bio_ex() loads the X509_INFO objects using a bio bp. very demure, very bio-aware π
PEM_X509_INFO_read_bio() is similar to PEM_X509_INFO_read_bio_ex() but uses the default (NULL) library context libctx and empty property query propq. same energy, fewer params β¨
Now the part that's actually iconic β each of the loaded X509_INFO objects can contain a CRL, a certificate, and/or a private key π The elements are read sequentially, and as far as they are of different type than the elements read before, they are combined into the same X509_INFO object. The idea behind this is that if, for instance, a certificate is followed by a private key, the private key is supposed to correspond to the certificate. they literally get paired up, it's a whole love story π
If the input stack sk is NULL a new stack is allocated, else the given stack is extended. (yes, it'll grow your existing one, generous queen π±)
The optional cb and u parameters can be used for providing a pass phrase needed for decrypting encrypted PEM structures (normally only private keys). See PEM_read_bio_PrivateKey(3) and passphrase-encoding(7) for details. π
The library context libctx and property query propq are used for fetching algorithms from providers. (provider fetch, periodt π§)
π RETURN VALUES π
PEM_X509_INFO_read_ex(), PEM_X509_INFO_read(), PEM_X509_INFO_read_bio_ex() and PEM_X509_INFO_read_bio() return a stack of X509_INFO objects or NULL on failure. slay when it works, NULL when it doesn't π
π SEE ALSO π
go read these too bestie, iykyk π
β HISTORY β
The functions PEM_X509_INFO_read_ex() and PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0. the _ex girlies are the new additions, the originals been here π°οΈβ¨
π COPYRIGHT π
Copyright 2020-2022 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
k bye bestie, this page was served fresh from OpenSSL 4.0.3, dated 2026-09-29, and the manual is PEM_X509_INFO_READ_BIO_EX(3SSL) π mwah, go read some PEM files π«ΆπΈ
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms