diff options
author | Rich Salz <rsalz@akamai.com> | 2020-12-26 10:21:41 -0500 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-01-19 11:13:15 +0100 |
commit | 83b6dc8dc739ce7ca82652461bea92c31e634a57 (patch) | |
tree | e2bf6b2f26ffbd21f17b5638dc4d3eaf20cb8b49 /crypto | |
parent | fee0af0863dff8d13b09cd59af0afbd7e4ae2d57 (diff) |
Deprecate OCSP_xxx API for OSSL_HTTP_xxx
Deprecations made:
OCSP_REQ_CTX typedef->OSSL_HTTP_REQ_CTX
OCSP_REQ_CTX_new->OSSL_HTTP_REQ_CTX_new
OCSP_REQ_CTX_free->OSSL_HTTP_REQ_CTX_free
OCSP_REQ_CTX_http-> OSSL_HTTP_REQ_CTX_header
OCSP_REQ_CTX_add1_header->OSSL_HTTP_REQ_CTX_add1_header
OCSP_REQ_CTX_i2d->OSSL_HTTP_REQ_CTX_i2d
OCSP_REQ_CTX_get0_mem_bio->OSSL_HTTP_REQ_CTX_get0_mem_bio
OCSP_set_max_response_length->OSSL_HTTP_REQ_CTX_set_max_response_length
OCSP_REQ_CTX_nbio_d2i->OSSL_HTTP_REQ_CTX_sendreq_d2i
OCSP_REQ_CTX_nbio->OSSL_HTTP_REQ_CTX_nbio
Made some editorial changes to man3/OCSP_sendreq.pod; move the NOTES
text inline. Some of the original functions had no documentation:
OCSP_REQ_CTX_new, OCSP_REQ_CTX_http, OCSP_REQ_CTX_get0_mem_bio,
OCSP_REQ_CTX_nbio_d2i, and OCSP_REQ_CTX_nbio. Their new counterparts
are now documented in doc/man3/OSSL_HTTP_REQ_CTX.pod
Fixes #12234
Co-authored-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13742)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/http/http_local.h | 14 | ||||
-rw-r--r-- | crypto/ocsp/ocsp_http.c | 21 |
2 files changed, 11 insertions, 24 deletions
diff --git a/crypto/http/http_local.h b/crypto/http/http_local.h index 729d24e47f..d98dc54e1f 100644 --- a/crypto/http/http_local.h +++ b/crypto/http/http_local.h @@ -13,20 +13,6 @@ # include <openssl/ocsp.h> -/* name aliases for legacy names with name prefix "OCSP_" */ -typedef OCSP_REQ_CTX OSSL_HTTP_REQ_CTX; -/* functions meanwhile only used internally */ -# define OSSL_HTTP_REQ_CTX_new OCSP_REQ_CTX_new -# define OSSL_HTTP_REQ_CTX_free OCSP_REQ_CTX_free -# define OSSL_HTTP_REQ_CTX_header OCSP_REQ_CTX_http -# define OSSL_HTTP_REQ_CTX_add1_header OCSP_REQ_CTX_add1_header -# define OSSL_HTTP_REQ_CTX_i2d OCSP_REQ_CTX_i2d -# define OSSL_HTTP_REQ_CTX_nbio OCSP_REQ_CTX_nbio -# define OSSL_HTTP_REQ_CTX_sendreq_d2i OCSP_REQ_CTX_nbio_d2i -/* functions that are meanwhile unused */ -# define OSSL_HTTP_REQ_CTX_get0_mem_bio OCSP_REQ_CTX_get0_mem_bio /* undoc'd */ -# define OSSL_HTTP_REQ_CTX_set_max_response_length OCSP_set_max_response_length - BIO *HTTP_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val); OSSL_HTTP_REQ_CTX *HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int use_http_proxy, const char *server, const char *port, diff --git a/crypto/ocsp/ocsp_http.c b/crypto/ocsp/ocsp_http.c index eae6107dff..c5508698c8 100644 --- a/crypto/ocsp/ocsp_http.c +++ b/crypto/ocsp/ocsp_http.c @@ -14,19 +14,20 @@ #ifndef OPENSSL_NO_OCSP # ifndef OPENSSL_NO_DEPRECATED_3_0 -int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, const OCSP_REQUEST *req) +int OCSP_REQ_CTX_set1_req(OSSL_HTTP_REQ_CTX *rctx, const OCSP_REQUEST *req) { - return OCSP_REQ_CTX_i2d(rctx, "application/ocsp-request", - ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)req); + return OSSL_HTTP_REQ_CTX_i2d(rctx, "application/ocsp-request", + ASN1_ITEM_rptr(OCSP_REQUEST), + (ASN1_VALUE *)req); } # endif -OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, - int maxline) +OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, + OCSP_REQUEST *req, int maxline) { BIO *req_mem = HTTP_asn1_item2bio(ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)req); - OCSP_REQ_CTX *res = + OSSL_HTTP_REQ_CTX *res = HTTP_REQ_CTX_new(io, io, 0 /* no HTTP proxy used */, NULL, NULL, path, NULL /* headers */, "application/ocsp-request", req_mem /* may be NULL */, @@ -37,17 +38,17 @@ OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, return res; } -int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx) +int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OSSL_HTTP_REQ_CTX *rctx) { *presp = (OCSP_RESPONSE *) - OCSP_REQ_CTX_nbio_d2i(rctx, ASN1_ITEM_rptr(OCSP_RESPONSE)); + OSSL_HTTP_REQ_CTX_sendreq_d2i(rctx, ASN1_ITEM_rptr(OCSP_RESPONSE)); return *presp != NULL; } OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req) { OCSP_RESPONSE *resp = NULL; - OCSP_REQ_CTX *ctx; + OSSL_HTTP_REQ_CTX *ctx; int rv; ctx = OCSP_sendreq_new(b, path, req, -1 /* default max resp line length */); @@ -57,7 +58,7 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req) rv = OCSP_sendreq_nbio(&resp, ctx); /* this indirectly calls ERR_clear_error(): */ - OCSP_REQ_CTX_free(ctx); + OSSL_HTTP_REQ_CTX_free(ctx); return rv == 1 ? resp : NULL; } |