Lines Matching full:bio
19 typedef BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg,
23 int use_ssl, BIO *bio, BIO *rbio,
26 int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port,
28 int timeout, BIO *bio_err, const char *prog);
31 const char *content_type, BIO *req,
34 BIO *OSSL_HTTP_exchange(OSSL_HTTP_REQ_CTX *rctx, char **redirection_url);
35 BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
36 BIO *bio, BIO *rbio,
41 BIO *OSSL_HTTP_transfer(OSSL_HTTP_REQ_CTX **prctx,
45 BIO *bio, BIO *rbio,
48 const char *content_type, BIO *req,
55 OSSL_HTTP_open() initiates an HTTP session using the I<bio> argument if not
58 Typically the OpenSSL build supports sockets and the I<bio> parameter is NULL.
60 The function creates a network BIO internally using L<BIO_new_connect(3)>
63 Then this internal BIO is used for setting up a connection
66 If I<bio> is given and I<rbio> is NULL then this I<bio> is used instead.
67 If both I<bio> and I<rbio> are given (which may be memory BIOs for instance)
69 I<bio> is used for writing requests and I<rbio> for reading responses.
70 As soon as the client has flushed I<bio> the server must be ready to provide
73 If I<bio> is given,
76 If I<bio> is NULL the optional I<proxy> parameter can be used to set an
99 may be used to modify the connection BIO used by the HTTP client,
100 but cannot be used when both I<bio> and I<rbio> are given.
101 I<bio_update_fn> is a BIO connect/disconnect callback function with prototype
103 BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg, int connect, int detail)
105 The callback function may modify the BIO provided in the I<bio> argument,
112 For instance, on connect the callback may push an SSL BIO to implement HTTPS;
113 after disconnect it may do some diagnostic output and pop and free the SSL BIO.
115 The callback function must return either the potentially modified BIO I<bio>
116 or NULL to indicate failure, in which case it should not modify the BIO.
120 BIO *http_tls_cb(BIO *bio, void *arg, int connect, int detail)
124 BIO *sbio = BIO_new_ssl(ctx, 1);
126 bio = sbio != NULL ? BIO_push(sbio, bio) : NULL;
128 BIO *hbio;
133 BIO_ssl_shutdown(bio);
134 hbio = BIO_pop(bio);
135 BIO_free(bio); /* SSL BIO */
136 bio = hbio;
138 return bio;
141 After disconnect the modified BIO will be deallocated using BIO_free_all().
154 OSSL_HTTP_proxy_connect() may be used by an above BIO connect callback function
156 It promotes the given BIO I<bio> representing a connection
179 BIO will be read on-the-fly while sending the request, which supports streaming.
200 the contents buffered in a memory BIO, which does not support streaming.
201 Otherwise it returns directly the read BIO that holds the response contents,
203 The caller is responsible for freeing the BIO pointer obtained.
205 OSSL_HTTP_get() uses HTTP GET to obtain data from I<bio> if non-NULL,
206 else from the server contained in the I<url>, and returns it as a BIO.
209 If I<bio> is non-NULL, any host and port components in the I<url> are not used
217 The caller is responsible for freeing the BIO pointer obtained.
229 The caller is responsible for freeing the BIO pointer obtained.
232 The I<ok> parameter is passed to any BIO update function
255 return a memory BIO that buffers all the data received if an ASN.1-encoded
256 response is expected, otherwise a BIO that may support streaming.
257 The BIO must be freed by the caller.
260 The caller is responsible for freeing the BIO pointer obtained.