From: Marcel Poul Date: Tue, 7 Aug 2012 17:21:21 +0000 (+0000) Subject: Split query_responder(), depends on SSLEAY_VERSION and support of ocsp nonblocking... X-Git-Tag: glite-lbjp-common-gss_R_3_2_4_1~34 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=2bfa18a02223155271976afbfbd018a64bd30670;p=jra1mw.git Split query_responder(), depends on SSLEAY_VERSION and support of ocsp nonblocking queries. --- diff --git a/emi.canl.canl-c/src/canl_ocsp.c b/emi.canl.canl-c/src/canl_ocsp.c index 690103d..733501d 100644 --- a/emi.canl.canl-c/src/canl_ocsp.c +++ b/emi.canl.canl-c/src/canl_ocsp.c @@ -513,15 +513,13 @@ end: return resp; } +#if SSLEAY_VERSION_NUMBER >= 0x0090808fL /*TODO the timeout variable should be modified if TO is reached. Somehow retur error codes! */ static OCSP_RESPONSE * query_responder(BIO *conn, char *path, OCSP_REQUEST *req, int req_timeout) { OCSP_RESPONSE *rsp = NULL; - -/*openssl does support non blocking BIO for OCSP_send_request*/ -#if SSLEAY_VERSION_NUMBER >= 0x0090808fL int fd; int rv; OCSP_REQ_CTX *ctx = NULL; @@ -605,8 +603,23 @@ query_responder(BIO *conn, char *path, OCSP_REQUEST *req, int req_timeout) } } +err: + if (ctx) + OCSP_REQ_CTX_free(ctx); + return rsp; +} +#endif + +#if SSLEAY_VERSION_NUMBER < 0x0090808fL +/*TODO the timeout variable should be modified if TO is reached. + Somehow retur error codes! */ + static OCSP_RESPONSE * +query_responder(BIO *conn, char *path, OCSP_REQUEST *req, int req_timeout) +{ + OCSP_RESPONSE *rsp = NULL; + +/*openssl does support non blocking BIO for OCSP_send_request*/ -#else /*openssl does not support non blocking BIO for OCSP_send_request*/ if (BIO_do_connect(conn) <= 0) @@ -621,13 +634,7 @@ query_responder(BIO *conn, char *path, OCSP_REQUEST *req, int req_timeout) goto err; } -#endif - err: -#if SSLEAY_VERSION_NUMBER >= 0x0090808fL - if (ctx) - OCSP_REQ_CTX_free(ctx); -#endif return rsp; } - +#endif