diff options
Diffstat (limited to 'src/lib/libcrypto/ocsp/ocsp_ht.c')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ht.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_ht.c b/src/lib/libcrypto/ocsp/ocsp_ht.c index 5d1627192c..4d21543396 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ht.c +++ b/src/lib/libcrypto/ocsp/ocsp_ht.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_ht.c,v 1.21 2014/07/25 06:05:32 doug Exp $ */ | 1 | /* $OpenBSD: ocsp_ht.c,v 1.22 2014/10/03 06:02:38 doug Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -119,11 +119,8 @@ OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx) | |||
119 | int | 119 | int |
120 | OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req) | 120 | OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req) |
121 | { | 121 | { |
122 | static const char req_hdr[] = | 122 | if (BIO_printf(rctx->mem, "Content-Type: application/ocsp-request\r\n" |
123 | "Content-Type: application/ocsp-request\r\n" | 123 | "Content-Length: %d\r\n\r\n", i2d_OCSP_REQUEST(req, NULL)) <= 0) |
124 | "Content-Length: %d\r\n\r\n"; | ||
125 | |||
126 | if (BIO_printf(rctx->mem, req_hdr, i2d_OCSP_REQUEST(req, NULL)) <= 0) | ||
127 | return 0; | 124 | return 0; |
128 | if (i2d_OCSP_REQUEST_bio(rctx->mem, req) <= 0) | 125 | if (i2d_OCSP_REQUEST_bio(rctx->mem, req) <= 0) |
129 | return 0; | 126 | return 0; |
@@ -154,7 +151,6 @@ OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, const char *name, | |||
154 | OCSP_REQ_CTX * | 151 | OCSP_REQ_CTX * |
155 | OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline) | 152 | OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline) |
156 | { | 153 | { |
157 | static const char post_hdr[] = "POST %s HTTP/1.0\r\n"; | ||
158 | OCSP_REQ_CTX *rctx; | 154 | OCSP_REQ_CTX *rctx; |
159 | 155 | ||
160 | rctx = malloc(sizeof(OCSP_REQ_CTX)); | 156 | rctx = malloc(sizeof(OCSP_REQ_CTX)); |
@@ -177,7 +173,7 @@ OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline) | |||
177 | if (!path) | 173 | if (!path) |
178 | path = "/"; | 174 | path = "/"; |
179 | 175 | ||
180 | if (BIO_printf(rctx->mem, post_hdr, path) <= 0) { | 176 | if (BIO_printf(rctx->mem, "POST %s HTTP/1.0\r\n", path) <= 0) { |
181 | free(rctx->iobuf); | 177 | free(rctx->iobuf); |
182 | BIO_free(rctx->mem); | 178 | BIO_free(rctx->mem); |
183 | free(rctx); | 179 | free(rctx); |