[openssl] master update

dev at ddvo.net dev at ddvo.net
Fri Mar 26 12:23:07 UTC 2021


The branch master has been updated
       via  1c8505fb7d68fb9c02fac6c11f56bffe6173fc88 (commit)
      from  814581bb7a1360ee054ad3500cd0907fbfeef915 (commit)


- Log -----------------------------------------------------------------
commit 1c8505fb7d68fb9c02fac6c11f56bffe6173fc88
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sat Mar 20 22:17:46 2021 +0100

    HTTP: Rename OSSL_HTTP_REQ_CTX_i2d() to OSSL_HTTP_REQ_CTX_set1_req()
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14677)

-----------------------------------------------------------------------

Summary of changes:
 crypto/http/http_client.c      |  4 ++--
 crypto/ocsp/ocsp_http.c        |  7 ++++---
 doc/man3/OCSP_sendreq_new.pod  |  8 ++++----
 doc/man3/OSSL_HTTP_REQ_CTX.pod | 14 +++++++-------
 include/openssl/http.h         |  4 ++--
 include/openssl/ocsp.h.in      |  2 +-
 util/libcrypto.num             |  2 +-
 7 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index 1d08c41052..744346adbf 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -247,8 +247,8 @@ BIO *ossl_http_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val)
     return res;
 }
 
-int OSSL_HTTP_REQ_CTX_i2d(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
-                          const ASN1_ITEM *it, ASN1_VALUE *req)
+int OSSL_HTTP_REQ_CTX_set1_req(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
+                               const ASN1_ITEM *it, ASN1_VALUE *req)
 {
     BIO *mem;
     int res;
diff --git a/crypto/ocsp/ocsp_http.c b/crypto/ocsp/ocsp_http.c
index 907720aac1..a35201e047 100644
--- a/crypto/ocsp/ocsp_http.c
+++ b/crypto/ocsp/ocsp_http.c
@@ -27,9 +27,10 @@ OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
     if (!OSSL_HTTP_REQ_CTX_set_request_line(rctx, NULL, NULL, path))
         goto err;
 
-    if (req != NULL && !OSSL_HTTP_REQ_CTX_i2d(rctx, "application/ocsp-request",
-                                              ASN1_ITEM_rptr(OCSP_REQUEST),
-                                              (ASN1_VALUE *)req))
+    if (req != NULL
+        && !OSSL_HTTP_REQ_CTX_set1_req(rctx, "application/ocsp-request",
+                                       ASN1_ITEM_rptr(OCSP_REQUEST),
+                                       (ASN1_VALUE *)req))
         goto err;
 
     return rctx;
diff --git a/doc/man3/OCSP_sendreq_new.pod b/doc/man3/OCSP_sendreq_new.pod
index 2333ac24d7..f01aadad6b 100644
--- a/doc/man3/OCSP_sendreq_new.pod
+++ b/doc/man3/OCSP_sendreq_new.pod
@@ -45,7 +45,7 @@ structure using connection B<BIO> I<io>, the URL path I<path>, the OCSP
 request I<req>, and with a response header maximum line length of I<maxline>.
 If I<maxline> is zero a default value of 4k is used.
 The I<req> may be set to NULL and provided later using OCSP_REQ_CTX_set1_req()
-or L<OSSL_HTTP_REQ_CTX_i2d(3)> .
+or L<OSSL_HTTP_REQ_CTX_set1_req(3)> .
 
 The I<io> and I<path> arguments to OCSP_sendreq_new() correspond to the
 components of the URL.
@@ -65,12 +65,12 @@ for compatibility; use OCSP_sendreq_nbio() instead.
 
 OCSP_REQ_CTX_i2d(rctx, it, req) is equivalent to the following:
 
-  OSSL_HTTP_REQ_CTX_i2d(rctx, "application/ocsp-request", it, req)
+  OSSL_HTTP_REQ_CTX_set1_req(rctx, "application/ocsp-request", it, req)
 
 OCSP_REQ_CTX_set1_req(rctx, req) is equivalent to the following:
 
- OSSL_HTTP_REQ_CTX_i2d(rctx, "application/ocsp-request",
-                       ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)req)
+ OSSL_HTTP_REQ_CTX_set1_req(rctx, "application/ocsp-request",
+                            ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)req)
 
 The other deprecated type and functions have been superseded by the
 following equivalents:
diff --git a/doc/man3/OSSL_HTTP_REQ_CTX.pod b/doc/man3/OSSL_HTTP_REQ_CTX.pod
index 0b730b4e17..9cfae4c3cb 100644
--- a/doc/man3/OSSL_HTTP_REQ_CTX.pod
+++ b/doc/man3/OSSL_HTTP_REQ_CTX.pod
@@ -7,7 +7,7 @@ OSSL_HTTP_REQ_CTX_new,
 OSSL_HTTP_REQ_CTX_free,
 OSSL_HTTP_REQ_CTX_set_request_line,
 OSSL_HTTP_REQ_CTX_add1_header,
-OSSL_HTTP_REQ_CTX_i2d,
+OSSL_HTTP_REQ_CTX_set1_req,
 OSSL_HTTP_REQ_CTX_nbio,
 OSSL_HTTP_REQ_CTX_sendreq_d2i,
 OSSL_HTTP_REQ_CTX_get0_mem_bio,
@@ -34,8 +34,8 @@ OSSL_HTTP_REQ_CTX_set_max_response_length
  int OSSL_HTTP_REQ_CTX_add1_header(OSSL_HTTP_REQ_CTX *rctx,
                                    const char *name, const char *value);
 
- int OSSL_HTTP_REQ_CTX_i2d(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
-                           const ASN1_ITEM *it, ASN1_VALUE *req);
+ int OSSL_HTTP_REQ_CTX_set1_req(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
+                                const ASN1_ITEM *it, ASN1_VALUE *req);
  int OSSL_HTTP_REQ_CTX_nbio(OSSL_HTTP_REQ_CTX *rctx);
  ASN1_VALUE *OSSL_HTTP_REQ_CTX_sendreq_d2i(OSSL_HTTP_REQ_CTX *rctx,
                                            const ASN1_ITEM *it);
@@ -90,7 +90,7 @@ For example, to add a C<Host> header for C<example.com> you would call:
 
  OSSL_HTTP_REQ_CTX_add1_header(ctx, "Host", "example.com");
 
-OSSL_HTTP_REQ_CTX_i2d() finalizes the HTTP request context by adding
+OSSL_HTTP_REQ_CTX_set1_req() finalizes the HTTP request context by adding
 the DER encoding of I<req>, using the ASN.1 template I<it> to do the encoding.
 The HTTP header C<Content-Length> is automatically filled out, and if
 I<content_type> isn't NULL, the HTTP header C<Content-Type> is also added with
@@ -149,7 +149,7 @@ This is optional and may be done multiple times with different names.
 
 =item 3.
 
-Add C<POST> data with OSSL_HTTP_REQ_CTX_i2d().  This may only be done if
+Add C<POST> data with OSSL_HTTP_REQ_CTX_set1_req().  This may only be done if
 I<method_POST> was 1 in the OSSL_HTTP_REQ_CTX_new() call, and must be done
 exactly once in that case.
 
@@ -167,8 +167,8 @@ OSSL_HTTP_REQ_CTX_free() and OSSL_HTTP_REQ_CTX_set_max_response_length()
 do not return values.
 
 OSSL_HTTP_REQ_CTX_set_request_line(), OSSL_HTTP_REQ_CTX_add1_header(),
-OSSL_HTTP_REQ_CTX_i2d() and OSSL_HTTP_REQ_CTX_nbio return 1 for success and 0
-for failure.
+OSSL_HTTP_REQ_CTX_set1_req() and OSSL_HTTP_REQ_CTX_nbio
+return 1 for success and 0 for failure.
 
 OSSL_HTTP_REQ_CTX_sendreq_d2i() returns a pointer to an B<ASN1_VALUE> for
 success and NULL for failure.
diff --git a/include/openssl/http.h b/include/openssl/http.h
index c39049918f..9be738f48c 100644
--- a/include/openssl/http.h
+++ b/include/openssl/http.h
@@ -49,8 +49,8 @@ int OSSL_HTTP_REQ_CTX_set_request_line(OSSL_HTTP_REQ_CTX *rctx,
                                        const char *path);
 int OSSL_HTTP_REQ_CTX_add1_header(OSSL_HTTP_REQ_CTX *rctx,
                                   const char *name, const char *value);
-int OSSL_HTTP_REQ_CTX_i2d(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
-                          const ASN1_ITEM *it, ASN1_VALUE *req);
+int OSSL_HTTP_REQ_CTX_set1_req(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
+                               const ASN1_ITEM *it, ASN1_VALUE *req);
 int OSSL_HTTP_REQ_CTX_nbio(OSSL_HTTP_REQ_CTX *rctx);
 ASN1_VALUE *OSSL_HTTP_REQ_CTX_sendreq_d2i(OSSL_HTTP_REQ_CTX *rctx,
                                           const ASN1_ITEM *it);
diff --git a/include/openssl/ocsp.h.in b/include/openssl/ocsp.h.in
index 5e11987dc5..b84d1d89d5 100644
--- a/include/openssl/ocsp.h.in
+++ b/include/openssl/ocsp.h.in
@@ -186,7 +186,7 @@ typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
 #   define OCSP_REQ_CTX_add1_header(r, n, v) \
         OSSL_HTTP_REQ_CTX_add1_header(r, n, v)
 #   define OCSP_REQ_CTX_i2d(r, i, req) \
-        OSSL_HTTP_REQ_CTX_i2d(r, "application/ocsp-request", i, req)
+        OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", i, req)
 #   define OCSP_REQ_CTX_nbio(r) \
         OSSL_HTTP_REQ_CTX_nbio(r)
 #   define OCSP_REQ_CTX_nbio_d2i(r, p, i)        \
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 3fd52714bc..0c3575dca4 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -1577,7 +1577,7 @@ BIO_ADDRINFO_address                    1613	3_0_0	EXIST::FUNCTION:SOCK
 ASN1_STRING_print_ex                    1614	3_0_0	EXIST::FUNCTION:
 i2d_CMS_ReceiptRequest                  1615	3_0_0	EXIST::FUNCTION:CMS
 d2i_TS_REQ_fp                           1616	3_0_0	EXIST::FUNCTION:STDIO,TS
-OSSL_HTTP_REQ_CTX_i2d                   1617	3_0_0	EXIST::FUNCTION:
+OSSL_HTTP_REQ_CTX_set1_req              1617	3_0_0	EXIST::FUNCTION:
 EVP_PKEY_get_default_digest_nid         1618	3_0_0	EXIST::FUNCTION:
 ASIdOrRange_new                         1619	3_0_0	EXIST::FUNCTION:RFC3779
 ASN1_SCTX_new                           1620	3_0_0	EXIST::FUNCTION:


More information about the openssl-commits mailing list