Revision aa3b4b4d deps/openssl/openssl/crypto/ocsp/ocsp_ht.c
deps/openssl/openssl/crypto/ocsp/ocsp_ht.c | ||
---|---|---|
158 | 158 |
|
159 | 159 |
OCSP_REQ_CTX *rctx; |
160 | 160 |
rctx = OPENSSL_malloc(sizeof(OCSP_REQ_CTX)); |
161 |
if (!rctx) |
|
162 |
return NULL; |
|
161 | 163 |
rctx->state = OHS_ERROR; |
162 | 164 |
rctx->mem = BIO_new(BIO_s_mem()); |
163 | 165 |
rctx->io = io; |
... | ... | |
167 | 169 |
else |
168 | 170 |
rctx->iobuflen = OCSP_MAX_LINE_LEN; |
169 | 171 |
rctx->iobuf = OPENSSL_malloc(rctx->iobuflen); |
170 |
if (!rctx->iobuf) |
|
171 |
return 0;
|
|
172 |
if (!rctx->mem || !rctx->iobuf)
|
|
173 |
goto err;
|
|
172 | 174 |
if (!path) |
173 | 175 |
path = "/"; |
174 | 176 |
|
175 | 177 |
if (BIO_printf(rctx->mem, post_hdr, path) <= 0) |
176 |
return 0;
|
|
178 |
goto err;
|
|
177 | 179 |
|
178 | 180 |
if (req && !OCSP_REQ_CTX_set1_req(rctx, req)) |
179 |
return 0;
|
|
181 |
goto err;
|
|
180 | 182 |
|
181 | 183 |
return rctx; |
184 |
err: |
|
185 |
OCSP_REQ_CTX_free(rctx); |
|
186 |
return NULL; |
|
182 | 187 |
} |
183 | 188 |
|
184 | 189 |
/* Parse the HTTP response. This will look like this: |
... | ... | |
490 | 495 |
|
491 | 496 |
ctx = OCSP_sendreq_new(b, path, req, -1); |
492 | 497 |
|
498 |
if (!ctx) |
|
499 |
return NULL; |
|
500 |
|
|
493 | 501 |
do |
494 | 502 |
{ |
495 | 503 |
rv = OCSP_sendreq_nbio(&resp, ctx); |
Also available in: Unified diff