X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Focsp.c;h=5da51df5148c8c14b5cb28c71bfc7fb2a7fb83ca;hb=75f90688fb2dec0f897cad8be8b92be725c5016b;hp=ebb3732cd76f375c8737e851aba4aa4b93ae782e;hpb=ae5c8664e587f2445c8e4eb436cffbb64af4f6b8;p=oweals%2Fopenssl.git diff --git a/apps/ocsp.c b/apps/ocsp.c index ebb3732cd7..5da51df514 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -209,6 +209,7 @@ int MAIN(int argc, char **argv) OPENSSL_free(tport); if (tpath) OPENSSL_free(tpath); + thost = tport = tpath = NULL; if (args[1]) { args++; if (!OCSP_parse_url(*args, &host, &port, &path, &use_ssl)) { @@ -535,6 +536,8 @@ int MAIN(int argc, char **argv) "-CApath dir trusted certificates directory\n"); BIO_printf(bio_err, "-CAfile file trusted certificates file\n"); + BIO_printf(bio_err, + "-no_alt_chains only ever use the first certificate chain found\n"); BIO_printf(bio_err, "-VAfile file validator certificates file\n"); BIO_printf(bio_err, @@ -1038,7 +1041,7 @@ static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, bs = OCSP_BASICRESP_new(); thisupd = X509_gmtime_adj(NULL, 0); if (ndays != -1) - nextupd = X509_gmtime_adj(NULL, nmin * 60 + ndays * 3600 * 24); + nextupd = X509_time_adj_ex(NULL, ndays, nmin * 60, NULL); /* Examine each certificate id in the request */ for (i = 0; i < id_count; i++) { @@ -1258,8 +1261,8 @@ static OCSP_RESPONSE *query_responder(BIO *err, BIO *cbio, const char *path, return NULL; } - if (BIO_get_fd(cbio, &fd) <= 0) { - BIO_puts(err, "Can't get connection fd\n"); + if (BIO_get_fd(cbio, &fd) < 0) { + BIO_puts(bio_err, "Can't get connection fd\n"); goto err; }