Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "OCSP_SENDREQ_NEW 3ossl"
OCSP_SENDREQ_NEW 3ossl "2023-09-19" "3.0.11" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
OCSP_REQ_CTX, OCSP_sendreq_new, OCSP_sendreq_nbio, OCSP_sendreq_bio, OCSP_REQ_CTX_i2d, OCSP_REQ_CTX_add1_header, OCSP_REQ_CTX_free, OCSP_set_max_response_length, OCSP_REQ_CTX_set1_req \- OCSP responder query functions
"SYNOPSIS"
Header "SYNOPSIS" .Vb 1 #include <openssl/ocsp.h> \& OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, const OCSP_REQUEST *req, int buf_size); OCSP_RESPONSE *OCSP_sendreq_bio(BIO *io, const char *path, OCSP_REQUEST *req); .Ve

The following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by defining \s-1OPENSSL_API_COMPAT\s0 with a suitable version value, see openssl_user_macros\|(7):

.Vb 8 typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX; int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OSSL_HTTP_REQ_CTX *rctx); int OCSP_REQ_CTX_i2d(OCSP_REQ_CT *rctx, const ASN1_ITEM *it, ASN1_VALUE *req); int OCSP_REQ_CTX_add1_header(OCSP_REQ_CT *rctx, const char *name, const char *value); void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); void OCSP_set_max_response_length(OCSP_REQ_CT *rctx, unsigned long len); int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, const OCSP_REQUEST *req); .Ve

"DESCRIPTION"
Header "DESCRIPTION" These functions perform an \s-1OCSP POST\s0 request / response transfer over \s-1HTTP,\s0 using the \s-1HTTP\s0 request functions described in \s-1OSSL_HTTP_REQ_CTX\s0\|(3).

The function OCSP_sendreq_new() builds a complete \s-1OSSL_HTTP_REQ_CTX\s0 structure with the \s-1BIO\s0 io to be used for requests and response, the \s-1URL\s0 path path, optionally the \s-1OCSP\s0 request req, and a response header maximum line length of buf_size. If buf_size is zero a default value of 4KiB is used. The req may be set to \s-1NULL\s0 and provided later using OCSP_REQ_CTX_set1_req() or OSSL_HTTP_REQ_CTX_set1_req\|(3). The io and path arguments to OCSP_sendreq_new() correspond to the components of the \s-1URL.\s0 For example if the responder \s-1URL\s0 is \*(C`http://example.com/ocspreq\*(C' the \s-1BIO\s0 \fIio should haven been connected to host \*(C`example.com\*(C' on port 80 and path should be set to \*(C`/ocspreq\*(C'.

\fBOCSP_sendreq_nbio() attempts to send the request prepared in rctx and to gather the response via \s-1HTTP,\s0 using the \s-1BIO\s0 io and path that were given when calling OCSP_sendreq_new(). If the operation gets completed it assigns the response, a pointer to a \s-1OCSP_RESPONSE\s0 structure, in *presp. The function may need to be called again if its result is -1, which indicates \fBBIO_should_retry\|(3). In such a case it is advisable to sleep a little in between, using BIO_wait\|(3) on the read \s-1BIO\s0 to prevent a busy loop.

\fBOCSP_sendreq_bio() combines OCSP_sendreq_new() with as many calls of \fBOCSP_sendreq_nbio() as needed and then OCSP_REQ_CTX_free(), with a response header maximum line length 4k. It waits indefinitely on a response. It does not support setting a timeout or adding headers and is retained for compatibility; use OSSL_HTTP_transfer\|(3) instead.

OCSP_REQ_CTX_i2d(rctx, it, req) is equivalent to the following:

.Vb 1 OSSL_HTTP_REQ_CTX_set1_req(rctx, "application/ocsp-request", it, req) .Ve

OCSP_REQ_CTX_set1_req(rctx, req) is equivalent to the following:

.Vb 3 OSSL_HTTP_REQ_CTX_set1_req(rctx, "application/ocsp-request", ASN1_ITEM_rptr(OCSP_REQUEST), (const ASN1_VALUE *)req) .Ve

The deprecated type and the remaining deprecated functions have been superseded by the following equivalents: \fB\s-1OCSP_REQ_CTX\s0 by \s-1OSSL_HTTP_REQ_CTX\s0\|(3), \fBOCSP_REQ_CTX_add1_header() by OSSL_HTTP_REQ_CTX_add1_header\|(3), \fBOCSP_REQ_CTX_free() by OSSL_HTTP_REQ_CTX_free\|(3), and \fBOCSP_set_max_response_length() by \fBOSSL_HTTP_REQ_CTX_set_max_response_length\|(3).

"RETURN VALUES"
Header "RETURN VALUES" \fBOCSP_sendreq_new() returns a valid \s-1OSSL_HTTP_REQ_CTX\s0 structure or \s-1NULL\s0 if an error occurred.

\fBOCSP_sendreq_nbio() returns 1 for success, 0 on error, -1 if retry is needed.

\fBOCSP_sendreq_bio() returns the \s-1OCSP_RESPONSE\s0 structure sent by the responder or \s-1NULL\s0 if an error occurred.

"SEE ALSO"
Header "SEE ALSO" \s-1OSSL_HTTP_REQ_CTX\s0\|(3), OSSL_HTTP_transfer\|(3), \fBOCSP_cert_to_id\|(3), \fBOCSP_request_add1_nonce\|(3), \fBOCSP_REQUEST_new\|(3), \fBOCSP_resp_find_status\|(3), \fBOCSP_response_status\|(3)
"HISTORY"
Header "HISTORY" \fB\s-1OCSP_REQ_CTX\s0, \fBOCSP_REQ_CTX_i2d(), \fBOCSP_REQ_CTX_add1_header(), \fBOCSP_REQ_CTX_free(), \fBOCSP_set_max_response_length(), and OCSP_REQ_CTX_set1_req() were deprecated in OpenSSL 3.0.
"COPYRIGHT"
Header "COPYRIGHT" Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.