diff -r 000000000000 -r 6474c204b198 security/nss/cmd/ocspclnt/ocspclnt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/security/nss/cmd/ocspclnt/ocspclnt.c Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,1264 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* + * Test program for client-side OCSP. + */ + +#include "secutil.h" +#include "nspr.h" +#include "plgetopt.h" +#include "nss.h" +#include "cert.h" +#include "ocsp.h" +#include "xconst.h" /* + * XXX internal header file; needed to get at + * cert_DecodeAuthInfoAccessExtension -- would be + * nice to not need this, but that would require + * better/different APIs. + */ + +#ifndef NO_PP /* + * Compile with this every once in a while to be + * sure that no dependencies on it get added + * outside of the pretty-printing routines. + */ +#include "ocspti.h" /* internals for pretty-printing routines *only* */ +#endif /* NO_PP */ + +#if defined(_WIN32) +#include "fcntl.h" +#include "io.h" +#endif + +#define DEFAULT_DB_DIR "~/.netscape" + +/* global */ +char *program_name; + + +static void +synopsis (char *program_name) +{ + PRFileDesc *pr_stderr; + + pr_stderr = PR_STDERR; + PR_fprintf (pr_stderr, "Usage:"); + PR_fprintf (pr_stderr, + "\t%s -p [-d ]\n", + program_name); + PR_fprintf (pr_stderr, + "\t%s -P [-d ]\n", + program_name); + PR_fprintf (pr_stderr, + "\t%s -r [-a] [-L] [-s ] [-d ]\n", + program_name); + PR_fprintf (pr_stderr, + "\t%s -R [-a] [-l ] [-s ] [-d ]\n", + program_name); + PR_fprintf (pr_stderr, + "\t%s -S [-a] [-l -t ]\n", + program_name); + PR_fprintf (pr_stderr, + "\t\t [-s ] [-w