Document OCSP_REQ_CTX_i2d.
This is a backport of the documentation from #13620.
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13691)
Rich Salz authored 3 years ago
Tomas Mraz committed 3 years ago
1 | 1 | |
2 | 2 | =head1 NAME |
3 | 3 | |
4 | OCSP_sendreq_new, OCSP_sendreq_nbio, OCSP_REQ_CTX_free, | |
5 | OCSP_set_max_response_length, OCSP_REQ_CTX_add1_header, | |
6 | OCSP_REQ_CTX_set1_req, OCSP_sendreq_bio - OCSP responder query functions | |
4 | OCSP_sendreq_new, | |
5 | OCSP_sendreq_nbio, | |
6 | OCSP_REQ_CTX_free, | |
7 | OCSP_set_max_response_length, | |
8 | OCSP_REQ_CTX_add1_header, | |
9 | OCSP_REQ_CTX_set1_req, | |
10 | OCSP_sendreq_bio, | |
11 | OCSP_REQ_CTX_i2d | |
12 | - OCSP responder query functions | |
7 | 13 | |
8 | 14 | =head1 SYNOPSIS |
9 | 15 | |
24 | 30 | int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req); |
25 | 31 | |
26 | 32 | OCSP_RESPONSE *OCSP_sendreq_bio(BIO *io, const char *path, OCSP_REQUEST *req); |
33 | ||
34 | int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const char *content_type, | |
35 | const ASN1_ITEM *it, ASN1_VALUE *req); | |
27 | 36 | |
28 | 37 | =head1 DESCRIPTION |
29 | 38 | |
50 | 59 | |
51 | 60 | OCSP_REQ_CTX_set1_req() sets the OCSP request in B<rctx> to B<req>. This |
52 | 61 | function should be called after any calls to OCSP_REQ_CTX_add1_header(). |
62 | OCSP_REQ_CTX_set1_req(rctx, req) is equivalent to the following: | |
63 | ||
64 | OCSP_REQ_CTX_i2d(rctx, "application/ocsp-request", | |
65 | ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)req) | |
66 | ||
67 | OCSP_REQ_CTX_i2d() sets the request context B<rctx> to have the request | |
68 | B<req>, which has the ASN.1 type B<it>. | |
69 | The B<content_type>, if not NULL, will be included in the HTTP request. | |
70 | The function should be called after all other headers have already been added. | |
53 | 71 | |
54 | 72 | OCSP_sendreq_bio() performs an OCSP request using the responder B<io>, the URL |
55 | 73 | path B<path>, and the OCSP request B<req> with a response header maximum line |
63 | 81 | OCSP_sendreq_nbio() returns B<1> if the operation was completed successfully, |
64 | 82 | B<-1> if the operation should be retried and B<0> if an error occurred. |
65 | 83 | |
66 | OCSP_REQ_CTX_add1_header() and OCSP_REQ_CTX_set1_req() return B<1> for success | |
67 | and B<0> for failure. | |
84 | OCSP_REQ_CTX_add1_header(), OCSP_REQ_CTX_set1_req(), and OCSP_REQ_CTX_i2d() | |
85 | return B<1> for success and B<0> for failure. | |
68 | 86 | |
69 | 87 | OCSP_sendreq_bio() returns the B<OCSP_RESPONSE> structure sent by the |
70 | 88 | responder or B<NULL> if an error occurred. |