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