aboutsummaryrefslogtreecommitdiff
path: root/crypto/http
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-01-18 12:05:11 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-01-23 15:25:04 +0100
commit0a20cc4bc3af7bd9bb5860c09683a7a7f4ba39ed (patch)
treebec9685a8d1205336e2e0b351bb740ff3f4df531 /crypto/http
parent85c8b87b826b728a6c162edf4ec3b955c0979b4e (diff)
downloadopenssl-0a20cc4bc3af7bd9bb5860c09683a7a7f4ba39ed.zip
openssl-0a20cc4bc3af7bd9bb5860c09683a7a7f4ba39ed.tar.gz
openssl-0a20cc4bc3af7bd9bb5860c09683a7a7f4ba39ed.tar.bz2
Add check of HTTP method to OSSL_HTTP_REQ_CTX_content()
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13898)
Diffstat (limited to 'crypto/http')
-rw-r--r--crypto/http/http_client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index d8a6bde..731142b 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -207,6 +207,10 @@ static int OSSL_HTTP_REQ_CTX_content(OSSL_HTTP_REQ_CTX *rctx,
ERR_raise(ERR_LIB_HTTP, ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
+ if (rctx->method_GET) {
+ ERR_raise(ERR_LIB_HTTP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
+ return 0;
+ }
if (content_type != NULL
&& BIO_printf(rctx->mem, "Content-Type: %s\r\n", content_type) <= 0)