Home | History | Annotate | Line # | Download | only in man3
      1  1.1  christos =pod
      2  1.1  christos 
      3  1.1  christos =head1 NAME
      4  1.1  christos 
      5  1.1  christos X509_load_http,
      6  1.1  christos X509_http_nbio,
      7  1.1  christos X509_CRL_load_http,
      8  1.1  christos X509_CRL_http_nbio
      9  1.1  christos - certificate and CRL loading functions
     10  1.1  christos 
     11  1.1  christos =head1 SYNOPSIS
     12  1.1  christos 
     13  1.1  christos  #include <openssl/x509.h>
     14  1.1  christos 
     15  1.1  christos  X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
     16  1.1  christos  X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
     17  1.1  christos 
     18  1.1  christos The following macros have been deprecated since OpenSSL 3.0, and can be
     19  1.1  christos hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
     20  1.1  christos see L<openssl_user_macros(7)>:
     21  1.1  christos 
     22  1.1  christos  #define X509_http_nbio(rctx, pcert)
     23  1.1  christos  #define X509_CRL_http_nbio(rctx, pcrl)
     24  1.1  christos 
     25  1.1  christos =head1 DESCRIPTION
     26  1.1  christos 
     27  1.1  christos X509_load_http() and X509_CRL_load_http() loads a certificate or a CRL,
     28  1.1  christos respectively, in ASN.1 format using HTTP from the given B<url>.
     29  1.1  christos 
     30  1.3  christos Maximum size of the HTTP response is 100 kB for certificates and 32 MB for CRLs
     31  1.3  christos and hard coded in the functions.
     32  1.3  christos 
     33  1.1  christos If B<bio> is given and B<rbio> is NULL then this BIO is used instead of an
     34  1.1  christos internal one for connecting, writing the request, and reading the response.
     35  1.1  christos If both B<bio> and B<rbio> are given (which may be memory BIOs, for instance)
     36  1.1  christos then no explicit connection is attempted,
     37  1.1  christos B<bio> is used for writing the request, and B<rbio> for reading the response.
     38  1.1  christos 
     39  1.1  christos If the B<timeout> parameter is > 0 this indicates the maximum number of seconds
     40  1.1  christos to wait until the transfer is complete.
     41  1.1  christos A value of 0 enables waiting indefinitely,
     42  1.1  christos while a value < 0 immediately leads to a timeout condition.
     43  1.1  christos 
     44  1.1  christos X509_http_nbio() and X509_CRL_http_nbio() are macros for backward compatibility
     45  1.1  christos that have the same effect as the functions above but with infinite timeout
     46  1.1  christos and without the possibility to specify custom BIOs.
     47  1.1  christos 
     48  1.1  christos =head1 RETURN VALUES
     49  1.1  christos 
     50  1.1  christos On success the function yield the loaded value, else NULL.
     51  1.1  christos Error conditions include connection/transfer timeout, parse errors, etc.
     52  1.1  christos 
     53  1.1  christos =head1 SEE ALSO
     54  1.1  christos 
     55  1.1  christos L<OSSL_HTTP_get(3)>
     56  1.1  christos 
     57  1.1  christos =head1 HISTORY
     58  1.1  christos 
     59  1.1  christos X509_load_http() and X509_CRL_load_http() were added in OpenSSL 3.0.
     60  1.1  christos X509_http_nbio() and X509_CRL_http_nbio() were deprecated in OpenSSL 3.0.
     61  1.1  christos 
     62  1.1  christos =head1 COPYRIGHT
     63  1.1  christos 
     64  1.1  christos Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
     65  1.1  christos 
     66  1.1  christos Licensed under the Apache License 2.0 (the "License").  You may not use
     67  1.1  christos this file except in compliance with the License.  You can obtain a copy
     68  1.1  christos in the file LICENSE in the source distribution or at
     69  1.1  christos L<https://www.openssl.org/source/license.html>.
     70  1.1  christos 
     71  1.1  christos =cut
     72