Document OCSP_REQ_CTX_i2d.
authorRich Salz <rsalz@akamai.com>
Fri, 11 Dec 2020 19:18:46 +0000 (14:18 -0500)
committerDr. David von Oheimb <dev@ddvo.net>
Tue, 15 Dec 2020 09:36:59 +0000 (10:36 +0100)
Based on comments from David von Oheimb.

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/13620)

doc/man3/OCSP_sendreq_new.pod
util/missingcrypto.txt

index 3988eb2c01e01f865344b7d8c4b8ad5dc4a35d9c..0f9d1339c936b27dfbaef5d7480ce2eb79e1c6eb 100644 (file)
@@ -2,9 +2,15 @@
 
 =head1 NAME
 
-OCSP_sendreq_new, OCSP_sendreq_nbio, OCSP_REQ_CTX_free,
-OCSP_set_max_response_length, OCSP_REQ_CTX_add1_header,
-OCSP_REQ_CTX_set1_req, OCSP_sendreq_bio - OCSP responder query functions
+OCSP_sendreq_new,
+OCSP_sendreq_nbio,
+OCSP_REQ_CTX_free,
+OCSP_set_max_response_length,
+OCSP_REQ_CTX_add1_header,
+OCSP_sendreq_bio,
+OCSP_REQ_CTX_i2d,
+OCSP_REQ_CTX_set1_req
+- OCSP responder query functions
 
 =head1 SYNOPSIS
 
@@ -25,6 +31,9 @@ OCSP_REQ_CTX_set1_req, OCSP_sendreq_bio - OCSP responder query functions
 
  OCSP_RESPONSE *OCSP_sendreq_bio(BIO *io, const char *path, OCSP_REQUEST *req);
 
+ int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const char *content_type,
+                      const ASN1_ITEM *it, ASN1_VALUE *req);
+
 Deprecated since OpenSSL 3.0, can be hidden entirely by defining
 B<OPENSSL_API_COMPAT> with a suitable version value, see
 L<openssl_user_macros(7)>:
@@ -58,15 +67,23 @@ OCSP_sendreq_bio() performs an OCSP request using the responder B<io>, the URL
 path B<path>, the OCSP request B<req> and with a response header maximum line
 length 4k. It waits indefinitely on a response.
 
-OCSP_REQ_CTX_set1_req() sets the OCSP request in B<rctx> to B<req>. This
-function should be called after any calls to OCSP_REQ_CTX_add1_header().
+OCSP_REQ_CTX_i2d() sets the request context B<rctx> to have the request
+B<req>, which has the ASN.1 type B<it>.
+The B<content_type>, if not NULL, will be included in the HTTP request.
+The function should be called after all other headers have already been added.
+
+OCSP_REQ_CTX_set1_req(rctx, req) is equivalent to the following:
+
+ OCSP_REQ_CTX_i2d(rctx, "application/ocsp-request",
+                        ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)req)
 
 =head1 RETURN VALUES
 
 OCSP_sendreq_new() returns a valid B<OCSP_REQ_CTX> structure or B<NULL>
 if an error occurred.
 
-OCSP_sendreq_nbio(), OCSP_REQ_CTX_add1_header() and OCSP_REQ_CTX_set1_req()
+OCSP_sendreq_nbio(), OCSP_REQ_CTX_add1_header(), OCSP_REQ_CTX_i2d(),
+and OCSP_REQ_CTX_set1_req()
 return B<1> for success and B<0> for failure.
 
 OCSP_sendreq_bio() returns the B<OCSP_RESPONSE> structure sent by the
index d56d428772754fca98d637690910fb1dee60f22f..8a2c773e1db9e6931f7dfee3d286cc78da90d763 100644 (file)
@@ -805,7 +805,6 @@ OCSP_REQUEST_it(3)
 OCSP_REQUEST_print(3)
 OCSP_REQ_CTX_get0_mem_bio(3)
 OCSP_REQ_CTX_http(3)
-OCSP_REQ_CTX_i2d(3)
 OCSP_REQ_CTX_nbio(3)
 OCSP_REQ_CTX_nbio_d2i(3)
 OCSP_REQ_CTX_new(3)