mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
Simplify OCSP_sendreq_bio()
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14356)
This commit is contained in:
parent
0dca5ede0d
commit
73e6e3e03e
@ -50,17 +50,16 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req)
|
||||
{
|
||||
OCSP_RESPONSE *resp = NULL;
|
||||
OSSL_HTTP_REQ_CTX *ctx;
|
||||
int rv;
|
||||
|
||||
ctx = OCSP_sendreq_new(b, path, req, -1 /* default max resp line length */);
|
||||
if (ctx == NULL)
|
||||
return NULL;
|
||||
|
||||
rv = OCSP_sendreq_nbio(&resp, ctx);
|
||||
OCSP_sendreq_nbio(&resp, ctx);
|
||||
|
||||
/* this indirectly calls ERR_clear_error(): */
|
||||
OSSL_HTTP_REQ_CTX_free(ctx);
|
||||
|
||||
return rv == 1 ? resp : NULL;
|
||||
return resp;
|
||||
}
|
||||
#endif /* !defined(OPENSSL_NO_OCSP) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user