From 9253f8346acf065d8d52eb03aa87e2c7eb4f7cce Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Mon, 4 May 2020 19:54:43 +0200 Subject: Constify 'req' parameter of OSSL_HTTP_post_asn1() Reviewed-by: Matt Caswell Reviewed-by: Viktor Dukhovni (Merged from https://github.com/openssl/openssl/pull/11736) --- crypto/cmp/cmp_http.c | 4 ++-- crypto/http/http_client.c | 4 ++-- crypto/http/http_local.h | 2 +- doc/man3/OSSL_HTTP_transfer.pod | 2 +- include/openssl/http.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/cmp/cmp_http.c b/crypto/cmp/cmp_http.c index 4c9f542b49..3804f2498f 100644 --- a/crypto/cmp/cmp_http.c +++ b/crypto/cmp/cmp_http.c @@ -58,8 +58,8 @@ OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx, OSSL_CMP_CTX_get_http_cb_arg(ctx) != NULL, ctx->proxy, ctx->no_proxy, NULL, NULL, ctx->http_cb, OSSL_CMP_CTX_get_http_cb_arg(ctx), - headers, content_type_pkix, - (ASN1_VALUE *)req, ASN1_ITEM_rptr(OSSL_CMP_MSG), + headers, content_type_pkix, (const ASN1_VALUE *)req, + ASN1_ITEM_rptr(OSSL_CMP_MSG), 0, 0, ctx->msg_timeout, content_type_pkix, ASN1_ITEM_rptr(OSSL_CMP_MSG)); diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c index 98be2c4947..64f877abed 100644 --- a/crypto/http/http_client.c +++ b/crypto/http/http_client.c @@ -222,7 +222,7 @@ static int OSSL_HTTP_REQ_CTX_content(OSSL_HTTP_REQ_CTX *rctx, && BIO_write(rctx->mem, req, req_len) == (int)req_len; } -BIO *HTTP_asn1_item2bio(const ASN1_ITEM *it, ASN1_VALUE *val) +BIO *HTTP_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val) { BIO *res; @@ -1069,7 +1069,7 @@ ASN1_VALUE *OSSL_HTTP_post_asn1(const char *server, const char *port, OSSL_HTTP_bio_cb_t bio_update_fn, void *arg, const STACK_OF(CONF_VALUE) *headers, const char *content_type, - ASN1_VALUE *req, const ASN1_ITEM *req_it, + const ASN1_VALUE *req, const ASN1_ITEM *req_it, int maxline, unsigned long max_resp_len, int timeout, const char *expected_ct, const ASN1_ITEM *rsp_it) diff --git a/crypto/http/http_local.h b/crypto/http/http_local.h index 64b475b818..729d24e47f 100644 --- a/crypto/http/http_local.h +++ b/crypto/http/http_local.h @@ -27,7 +27,7 @@ typedef OCSP_REQ_CTX OSSL_HTTP_REQ_CTX; # 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, ASN1_VALUE *val); +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, const char *path, diff --git a/doc/man3/OSSL_HTTP_transfer.pod b/doc/man3/OSSL_HTTP_transfer.pod index 632f48dbe8..e0adb2a1d1 100644 --- a/doc/man3/OSSL_HTTP_transfer.pod +++ b/doc/man3/OSSL_HTTP_transfer.pod @@ -38,7 +38,7 @@ OSSL_HTTP_parse_url OSSL_HTTP_bio_cb_t bio_update_fn, void *arg, const STACK_OF(CONF_VALUE) *headers, const char *content_type, - ASN1_VALUE *req, const ASN1_ITEM *req_it, + const ASN1_VALUE *req, const ASN1_ITEM *req_it, int maxline, unsigned long max_resp_len, int timeout, const char *expected_ct, const ASN1_ITEM *rsp_it); diff --git a/include/openssl/http.h b/include/openssl/http.h index 4dff008801..45c8f11d7b 100644 --- a/include/openssl/http.h +++ b/include/openssl/http.h @@ -56,7 +56,7 @@ ASN1_VALUE *OSSL_HTTP_post_asn1(const char *server, const char *port, OSSL_HTTP_bio_cb_t bio_update_fn, void *arg, const STACK_OF(CONF_VALUE) *headers, const char *content_type, - ASN1_VALUE *req, const ASN1_ITEM *req_it, + const ASN1_VALUE *req, const ASN1_ITEM *req_it, int maxline, unsigned long max_resp_len, int timeout, const char *expected_ct, const ASN1_ITEM *rsp_it); -- cgit v1.2.3