From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- security/nss/cmd/ocspclnt/ocspclnt.c | 1248 ++++++++++++++++++++++++++++++++++ 1 file changed, 1248 insertions(+) create mode 100644 security/nss/cmd/ocspclnt/ocspclnt.c (limited to 'security/nss/cmd/ocspclnt/ocspclnt.c') diff --git a/security/nss/cmd/ocspclnt/ocspclnt.c b/security/nss/cmd/ocspclnt/ocspclnt.c new file mode 100644 index 0000000000..69d48b4987 --- /dev/null +++ b/security/nss/cmd/ocspclnt/ocspclnt.c @@ -0,0 +1,1248 @@ +/* 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 *progname) +{ + PRFileDesc *pr_stderr; + + pr_stderr = PR_STDERR; + PR_fprintf(pr_stderr, "Usage:"); + PR_fprintf(pr_stderr, + "\t%s -p [-d ]\n", + progname); + PR_fprintf(pr_stderr, + "\t%s -P [-d ]\n", + progname); + PR_fprintf(pr_stderr, + "\t%s -r [-a] [-L] [-s ] [-d ]\n", + progname); + PR_fprintf(pr_stderr, + "\t%s -R [-a] [-l ] [-s ] [-d ]\n", + progname); + PR_fprintf(pr_stderr, + "\t%s -S [-a] [-l -t ]\n", + progname); + PR_fprintf(pr_stderr, + "\t\t [-s ] [-w