From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- security/nss/cmd/ocspclnt/Makefile | 45 ++ security/nss/cmd/ocspclnt/manifest.mn | 24 + security/nss/cmd/ocspclnt/ocspclnt.c | 1243 ++++++++++++++++++++++++++++++++ security/nss/cmd/ocspclnt/ocspclnt.gyp | 25 + 4 files changed, 1337 insertions(+) create mode 100644 security/nss/cmd/ocspclnt/Makefile create mode 100644 security/nss/cmd/ocspclnt/manifest.mn create mode 100644 security/nss/cmd/ocspclnt/ocspclnt.c create mode 100644 security/nss/cmd/ocspclnt/ocspclnt.gyp (limited to 'security/nss/cmd/ocspclnt') diff --git a/security/nss/cmd/ocspclnt/Makefile b/security/nss/cmd/ocspclnt/Makefile new file mode 100644 index 000000000..265ea5601 --- /dev/null +++ b/security/nss/cmd/ocspclnt/Makefile @@ -0,0 +1,45 @@ +#! gmake +# +# 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/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + +include ../platrules.mk diff --git a/security/nss/cmd/ocspclnt/manifest.mn b/security/nss/cmd/ocspclnt/manifest.mn new file mode 100644 index 000000000..a2794a383 --- /dev/null +++ b/security/nss/cmd/ocspclnt/manifest.mn @@ -0,0 +1,24 @@ +# +# 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/. + +CORE_DEPTH = ../.. + +# MODULE public and private header directories are implicitly REQUIRED. +MODULE = nss + +CSRCS = \ + ocspclnt.c \ + $(NULL) + +# headers for the MODULE (defined above) are implicitly required. +REQUIRES = dbm seccmd + +# WINNT uses EXTRA_LIBS as the list of libs to link in. +# Unix uses OS_LIBS for that purpose. +# We can solve this via conditional makefile code, but +# can't do this in manifest.mn because OS_ARCH isn't defined there. +# So, look in the local Makefile for the defines for the list of libs. + +PROGRAM = ocspclnt diff --git a/security/nss/cmd/ocspclnt/ocspclnt.c b/security/nss/cmd/ocspclnt/ocspclnt.c new file mode 100644 index 000000000..afcb7e13f --- /dev/null +++ b/security/nss/cmd/ocspclnt/ocspclnt.c @@ -0,0 +1,1243 @@ +/* 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