logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PEM_X509_INFO_read_ex, PEM_X509_INFO_read, PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_bio - read

Description

PEM_X509_INFO_read_ex() loads the X509_INFO objects from a file fp.

       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.

       PEM_X509_INFO_read_bio_ex() loads the X509_INFO objects using a bio bp.

       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.

       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.

       If the input stack sk is NULL a new stack is allocated, else the given stack is extended.

       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.

History

       The functions PEM_X509_INFO_read_ex() and PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0.

Name

       PEM_X509_INFO_read_ex, PEM_X509_INFO_read, PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_bio - read
       PEM-encoded data structures into one or more X509_INFO objects

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.

See Also

PEM_read_bio_ex(3), PEM_read_bio_PrivateKey(3), passphrase-encoding(7)

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);