=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/ocsp.c,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** src/usr.bin/openssl/ocsp.c 2017/01/21 09:29:09 1.12 --- src/usr.bin/openssl/ocsp.c 2017/11/29 23:47:18 1.13 *************** *** 1,4 **** ! /* $OpenBSD: ocsp.c,v 1.12 2017/01/21 09:29:09 deraadt Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ --- 1,4 ---- ! /* $OpenBSD: ocsp.c,v 1.13 2017/11/29 23:47:18 guenther Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ *************** *** 106,112 **** ocsp_main(int argc, char **argv) { char **args; ! char *host = NULL, *port = NULL, *path = "/"; char *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL; char *signfile = NULL, *keyfile = NULL; --- 106,112 ---- ocsp_main(int argc, char **argv) { char **args; ! char *host = NULL, *port = NULL, *path = NULL; char *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL; char *signfile = NULL, *keyfile = NULL; *************** *** 177,183 **** } else badarg = 1; } else if (!strcmp(*args, "-url")) { ! if (args[1]) { args++; if (!OCSP_parse_url(*args, &host, &port, &path, &use_ssl)) { BIO_printf(bio_err, "Error parsing URL\n"); --- 177,184 ---- } else badarg = 1; } else if (!strcmp(*args, "-url")) { ! if (args[1] && host == NULL && port == NULL && ! path == NULL) { args++; if (!OCSP_parse_url(*args, &host, &port, &path, &use_ssl)) { BIO_printf(bio_err, "Error parsing URL\n"); *************** *** 186,198 **** } else badarg = 1; } else if (!strcmp(*args, "-host")) { ! if (args[1]) { args++; host = *args; } else badarg = 1; } else if (!strcmp(*args, "-port")) { ! if (args[1]) { args++; port = *args; } else --- 187,199 ---- } else badarg = 1; } else if (!strcmp(*args, "-host")) { ! if (args[1] && use_ssl == -1) { args++; host = *args; } else badarg = 1; } else if (!strcmp(*args, "-port")) { ! if (args[1] && use_ssl == -1) { args++; port = *args; } else *************** *** 331,337 **** } else badarg = 1; } else if (!strcmp(*args, "-path")) { ! if (args[1]) { args++; path = *args; } else --- 332,338 ---- } else badarg = 1; } else if (!strcmp(*args, "-path")) { ! if (args[1] && use_ssl == -1) { args++; path = *args; } else *************** *** 629,635 **** if (cbio) send_ocsp_response(cbio, resp); } else if (host) { ! resp = process_responder(bio_err, req, host, path, port, use_ssl, headers, req_timeout); if (!resp) goto end; --- 630,636 ---- if (cbio) send_ocsp_response(cbio, resp); } else if (host) { ! resp = process_responder(bio_err, req, host, path ? path : "/", port, use_ssl, headers, req_timeout); if (!resp) goto end;