From c33e0a8553975578f98dc6026e8d12deea31982f Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Thu, 18 Jan 2001 20:29:10 +0000 Subject: [PATCH] Add library version info to the NSS, S/MIME, and SSL shared libraries. Define the NSS version macros and add NSS_VersionCheck in nss.h. Add linker option to record internal name of shared libraries. Add Windows resource files. Add rcs and sccs id strings that can be retrieved with 'ident' and 'what'. Modified Files: coreconf/HP-UX.mk coreconf/OSF1.mk coreconf/SunOS5.mk coreconf/WIN954.0.mk coreconf/WINNT4.0.mk coreconf/WINNT5.0.mk coreconf/rules.mk nss/lib/nss/config.mk nss/lib/nss/manifest.mn nss/lib/nss/nss.h nss/lib/nss/nssinit.c nss/lib/smime/config.mk nss/lib/smime/manifest.mn nss/lib/ssl/config.mk nss/lib/ssl/manifest.mn Added Files: nss/lib/nss/nss.rc nss/lib/nss/nssver.c nss/lib/smime/smime.rc nss/lib/smime/smimever.c nss/lib/ssl/ssl.rc nss/lib/ssl/sslver.c --- security/coreconf/HP-UX.mk | 2 +- security/coreconf/OSF1.mk | 2 +- security/coreconf/SunOS5.mk | 5 +- security/coreconf/WIN954.0.mk | 9 ++- security/coreconf/WINNT4.0.mk | 11 ++-- security/coreconf/WINNT5.0.mk | 11 ++-- security/coreconf/rules.mk | 3 +- security/nss/lib/nss/config.mk | 2 + security/nss/lib/nss/manifest.mn | 1 + security/nss/lib/nss/nss.h | 28 ++++++++- security/nss/lib/nss/nss.rc | 98 ++++++++++++++++++++++++++++++ security/nss/lib/nss/nssinit.c | 53 +++++++++++++++- security/nss/lib/nss/nssver.c | 53 ++++++++++++++++ security/nss/lib/smime/config.mk | 2 + security/nss/lib/smime/manifest.mn | 1 + security/nss/lib/smime/smime.rc | 98 ++++++++++++++++++++++++++++++ security/nss/lib/smime/smimever.c | 53 ++++++++++++++++ security/nss/lib/ssl/config.mk | 2 + security/nss/lib/ssl/manifest.mn | 1 + security/nss/lib/ssl/ssl.rc | 98 ++++++++++++++++++++++++++++++ security/nss/lib/ssl/sslver.c | 53 ++++++++++++++++ 21 files changed, 567 insertions(+), 19 deletions(-) create mode 100644 security/nss/lib/nss/nss.rc create mode 100644 security/nss/lib/nss/nssver.c create mode 100644 security/nss/lib/smime/smime.rc create mode 100644 security/nss/lib/smime/smimever.c create mode 100644 security/nss/lib/ssl/ssl.rc create mode 100644 security/nss/lib/ssl/sslver.c diff --git a/security/coreconf/HP-UX.mk b/security/coreconf/HP-UX.mk index 422583af8666..2519ec3deb51 100644 --- a/security/coreconf/HP-UX.mk +++ b/security/coreconf/HP-UX.mk @@ -64,7 +64,7 @@ LDFLAGS = -z -Wl,+s MKSHLIB = $(LD) $(DSO_LDOPTS) -DSO_LDOPTS = -b +DSO_LDOPTS = -b +h $(notdir $@) DSO_LDFLAGS = # +Z generates position independent code for use in shared libraries. diff --git a/security/coreconf/OSF1.mk b/security/coreconf/OSF1.mk index a3edf8d7761d..a47100e4c1ea 100644 --- a/security/coreconf/OSF1.mk +++ b/security/coreconf/OSF1.mk @@ -62,5 +62,5 @@ ifeq ($(USE_PTHREADS),1) endif # The command to build a shared library on OSF1. -MKSHLIB += ld -shared -all -expect_unresolved "*" +MKSHLIB += ld -shared -all -expect_unresolved "*" -soname $(notdir $@) DSO_LDOPTS += -shared diff --git a/security/coreconf/SunOS5.mk b/security/coreconf/SunOS5.mk index e8cce71219e9..1e1b1db993fa 100644 --- a/security/coreconf/SunOS5.mk +++ b/security/coreconf/SunOS5.mk @@ -113,13 +113,12 @@ endif # Purify doesn't like -MDupdate NOMD_OS_CFLAGS += $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS) -MKSHLIB = $(LD) -MKSHLIB += $(DSO_LDOPTS) +MKSHLIB = $(LD) $(DSO_LDOPTS) # ld options: # -G: produce a shared object # -z defs: no unresolved symbols allowed -DSO_LDOPTS += -G +DSO_LDOPTS += -G -h $(notdir $@) # -KPIC generates position independent code for use in shared libraries. # (Similarly for -fPIC in case of gcc.) diff --git a/security/coreconf/WIN954.0.mk b/security/coreconf/WIN954.0.mk index 68b3b7e4f27b..8b99703fe31f 100644 --- a/security/coreconf/WIN954.0.mk +++ b/security/coreconf/WIN954.0.mk @@ -43,16 +43,19 @@ include $(CORE_DEPTH)/coreconf/WIN32.mk PROCESSOR := $(shell uname -p) ifeq ($(PROCESSOR), I386) CPU_ARCH = x386 - OS_CFLAGS += -W3 -nologo -D_X86_ + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ else ifeq ($(PROCESSOR), MIPS) CPU_ARCH = MIPS - #OS_CFLAGS += -W3 -nologo -D_MIPS_ + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ OS_CFLAGS += -W3 -nologo else ifeq ($(PROCESSOR), ALPHA) CPU_ARCH = ALPHA - OS_CFLAGS += -W3 -nologo -D_ALPHA_=1 + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 else CPU_ARCH = processor_is_undefined endif diff --git a/security/coreconf/WINNT4.0.mk b/security/coreconf/WINNT4.0.mk index 204b790a8f13..c760bb4fb345 100644 --- a/security/coreconf/WINNT4.0.mk +++ b/security/coreconf/WINNT4.0.mk @@ -43,16 +43,19 @@ include $(CORE_DEPTH)/coreconf/WIN32.mk PROCESSOR := $(shell uname -p) ifeq ($(PROCESSOR), I386) CPU_ARCH = x386 - OS_CFLAGS += -W3 -nologo -D_X86_ + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ else ifeq ($(PROCESSOR), MIPS) CPU_ARCH = MIPS - #OS_CFLAGS += -W3 -nologo -D_MIPS_ + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ OS_CFLAGS += -W3 -nologo else ifeq ($(PROCESSOR), ALPHA) CPU_ARCH = ALPHA - OS_CFLAGS += -W3 -nologo -D_ALPHA_=1 + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 else CPU_ARCH = processor_is_undefined endif @@ -64,6 +67,6 @@ OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE # Win NT needs -GT so that fibers can work # OS_CFLAGS += -GT -OS_CFLAGS += -DWINNT +DEFINES += -DWINNT NSPR31_LIB_PREFIX = lib diff --git a/security/coreconf/WINNT5.0.mk b/security/coreconf/WINNT5.0.mk index 6bf454e05098..844e7c04866b 100644 --- a/security/coreconf/WINNT5.0.mk +++ b/security/coreconf/WINNT5.0.mk @@ -43,16 +43,19 @@ include $(CORE_DEPTH)/coreconf/WIN32.mk PROCESSOR := $(shell uname -p) ifeq ($(PROCESSOR), I386) CPU_ARCH = x386 - OS_CFLAGS += -W3 -nologo -D_X86_ + OS_CFLAGS += -W3 -nologo + DEFINES += -D_X86_ else ifeq ($(PROCESSOR), MIPS) CPU_ARCH = MIPS - #OS_CFLAGS += -W3 -nologo -D_MIPS_ + #OS_CFLAGS += -W3 -nologo + #DEFINES += -D_MIPS_ OS_CFLAGS += -W3 -nologo else ifeq ($(PROCESSOR), ALPHA) CPU_ARCH = ALPHA - OS_CFLAGS += -W3 -nologo -D_ALPHA_=1 + OS_CFLAGS += -W3 -nologo + DEFINES += -D_ALPHA_=1 else CPU_ARCH = processor_is_undefined endif @@ -64,6 +67,6 @@ OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE # Win NT needs -GT so that fibers can work # OS_CFLAGS += -GT -OS_CFLAGS += -DWINNT +DEFINES += -DWINNT NSPR31_LIB_PREFIX = lib diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk index 489f6a0b5609..35885ee21885 100644 --- a/security/coreconf/rules.mk +++ b/security/coreconf/rules.mk @@ -362,7 +362,8 @@ endif ifeq ($(OS_ARCH), WINNT) $(RES): $(RESNAME) @$(MAKE_OBJDIR) - $(RC) -Fo$(RES) $(RESNAME) +# The resource compiler does not understand the -U option. + $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< @echo $(RES) finished endif diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk index aad305cc4415..e7f050e9c1ae 100644 --- a/security/nss/lib/nss/config.mk +++ b/security/nss/lib/nss/config.mk @@ -50,6 +50,8 @@ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib DLLFLAGS += -DEF:nss.def +RES = $(OBJDIR)/nss.res +RESNAME = nss.rc # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) CRYPTOLIB=$(DIST)/lib/freebl.lib diff --git a/security/nss/lib/nss/manifest.mn b/security/nss/lib/nss/manifest.mn index 18dfa49cddde..958db2b581fa 100644 --- a/security/nss/lib/nss/manifest.mn +++ b/security/nss/lib/nss/manifest.mn @@ -40,6 +40,7 @@ MODULE = security CSRCS = \ nssinit.c \ + nssver.c \ $(NULL) REQUIRES = security dbm diff --git a/security/nss/lib/nss/nss.h b/security/nss/lib/nss/nss.h index 2e11a7831c7f..bb9249047d33 100644 --- a/security/nss/lib/nss/nss.h +++ b/security/nss/lib/nss/nss.h @@ -32,7 +32,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: nss.h,v 1.4 2001/01/06 01:57:47 relyea%netscape.com Exp $ + * $Id: nss.h,v 1.5 2001/01/18 20:28:59 wtc%netscape.com Exp $ */ #ifndef __nss_h_ @@ -41,6 +41,32 @@ #include "seccomon.h" SEC_BEGIN_PROTOS + +/* + * NSS's major version, minor version, patch level, and whether + * this is a beta release. + * + * The format of the version string should be + * ".[.] []" + */ +#define NSS_VERSION "3.2 Beta" +#define NSS_VMAJOR 3 +#define NSS_VMINOR 2 +#define NSS_VPATCH 0 +#define NSS_BETA PR_TRUE + +/* + * Return a boolean that indicates whether the underlying library + * will perform as the caller expects. + * + * The only argument is a string, which should be the verson + * identifier of the NSS library. That string will be compared + * against a string that represents the actual build version of + * the NSS library. It also invokes the version checking functions + * of the dependent libraries such as NSPR. + */ +extern PRBool NSS_VersionCheck(const char *importedVersion); + /* * Open the Cert, Key, and Security Module databases, read only. * Initialize the Random Number Generator. diff --git a/security/nss/lib/nss/nss.rc b/security/nss/lib/nss/nss.rc new file mode 100644 index 000000000000..7eb93b8bb10f --- /dev/null +++ b/security/nss/lib/nss/nss.rc @@ -0,0 +1,98 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape security libraries. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nss.h" +#include + +#define MY_LIBNAME "nss" +#define MY_FILEDESCRIPTION "NSS Base Library" + +#define STRINGIZE(x) #x +#define STRINGIZE2(x) STRINGIZE(x) +#define NSS_VMAJOR_STR STRINGIZE2(NSS_VMAJOR) + +#ifdef _DEBUG +#define MY_DEBUG_STR " (debug)" +#define MY_FILEFLAGS_1 VS_FF_DEBUG +#else +#define MY_DEBUG_STR "" +#define MY_FILEFLAGS_1 0x0L +#endif +#if NSS_BETA +#define MY_FILEFLAGS_2 MY_FILEFLAGS_1|VS_FF_PRERELEASE +#else +#define MY_FILEFLAGS_2 MY_FILEFLAGS_1 +#endif + +#ifdef WINNT +#define MY_FILEOS VOS_NT_WINDOWS32 +#else +#define MY_FILEOS VOS__WINDOWS32 +#endif + +#define MY_INTERNAL_NAME MY_LIBNAME NSS_VMAJOR_STR + +///////////////////////////////////////////////////////////////////////////// +// +// Version-information resource +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0 + PRODUCTVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS MY_FILEFLAGS_2 + FILEOS MY_FILEOS + FILETYPE VFT_DLL + FILESUBTYPE 0x0L // not used + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" // Lang=US English, CharSet=Unicode + BEGIN + VALUE "CompanyName", "Netscape Communications Corporation\0" + VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0" + VALUE "FileVersion", NSS_VERSION "\0" + VALUE "InternalName", MY_INTERNAL_NAME "\0" + VALUE "LegalCopyright", "Copyright \251 1994-2001 Netscape Communications Corporation\0" + VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0" + VALUE "ProductName", "Network Security Services\0" + VALUE "ProductVersion", NSS_VERSION "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c index 7b569cff7d77..7d8df62bbfbd 100644 --- a/security/nss/lib/nss/nssinit.c +++ b/security/nss/lib/nss/nssinit.c @@ -32,10 +32,12 @@ * may use your version of this file under either the MPL or the * GPL. * - # $Id: nssinit.c,v 1.7 2001/01/07 07:37:18 nelsonb%netscape.com Exp $ + # $Id: nssinit.c,v 1.8 2001/01/18 20:29:00 wtc%netscape.com Exp $ */ +#include #include "seccomon.h" +#include "prinit.h" #include "prprf.h" #include "prmem.h" #include "cert.h" @@ -265,3 +267,52 @@ NSS_Shutdown(void) */ } +PRBool +NSS_VersionCheck(const char *importedVersion) +{ + /* + * This is the secret handshake algorithm. + * + * This release has a simple version compatibility + * check algorithm. This release is not backward + * compatible with previous major releases. It is + * not compatible with future major, minor, or + * patch releases. + */ + int vmajor = 0, vminor = 0, vpatch = 0; + const char *ptr = importedVersion; + + while (isdigit(*ptr)) { + vmajor = 10 * vmajor + *ptr - '0'; + ptr++; + } + if (*ptr == '.') { + ptr++; + while (isdigit(*ptr)) { + vminor = 10 * vminor + *ptr - '0'; + ptr++; + } + if (*ptr == '.') { + ptr++; + while (isdigit(*ptr)) { + vpatch = 10 * vpatch + *ptr - '0'; + ptr++; + } + } + } + + if (vmajor != NSS_VMAJOR) { + return PR_FALSE; + } + if (vmajor == NSS_VMAJOR && vminor > NSS_VMINOR) { + return PR_FALSE; + } + if (vmajor == NSS_VMAJOR && vminor == NSS_VMINOR && vpatch > NSS_VPATCH) { + return PR_FALSE; + } + /* Check dependent libraries */ + if (PR_VersionCheck(PR_VERSION) == PR_FALSE) { + return PR_FALSE; + } + return PR_TRUE; +} diff --git a/security/nss/lib/nss/nssver.c b/security/nss/lib/nss/nssver.c new file mode 100644 index 000000000000..463a77b6b177 --- /dev/null +++ b/security/nss/lib/nss/nssver.c @@ -0,0 +1,53 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape security libraries. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* Library identity and versioning */ + +#include "nss.h" + +#if defined(DEBUG) +#define _DEBUG_STRING " (debug)" +#else +#define _DEBUG_STRING "" +#endif + +/* + * Version information for the 'ident' and 'what commands + * + * NOTE: the first component of the concatenated rcsid string + * must not end in a '$' to prevent rcs keyword substitution. + */ +const char __nss_base_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING + " " __DATE__ " " __TIME__ " $"; +const char __nss_base_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING + " " __DATE__ " " __TIME__; diff --git a/security/nss/lib/smime/config.mk b/security/nss/lib/smime/config.mk index 0e1ed6dfc877..e26b36540f36 100644 --- a/security/nss/lib/smime/config.mk +++ b/security/nss/lib/smime/config.mk @@ -51,6 +51,8 @@ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib DLLFLAGS += -DEF:smime.def +RES = $(OBJDIR)/smime.res +RESNAME = smime.rc SHARED_LIBRARY_LIBS = \ $(DIST)/lib/pkcs12.lib \ diff --git a/security/nss/lib/smime/manifest.mn b/security/nss/lib/smime/manifest.mn index d8924158178e..6e526dfb4dda 100644 --- a/security/nss/lib/smime/manifest.mn +++ b/security/nss/lib/smime/manifest.mn @@ -67,6 +67,7 @@ CSRCS = \ cmsutil.c \ smimemessage.c \ smimeutil.c \ + smimever.c \ $(NULL) REQUIRES = security dbm diff --git a/security/nss/lib/smime/smime.rc b/security/nss/lib/smime/smime.rc new file mode 100644 index 000000000000..f75da062dc44 --- /dev/null +++ b/security/nss/lib/smime/smime.rc @@ -0,0 +1,98 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape security libraries. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nss.h" +#include + +#define MY_LIBNAME "smime" +#define MY_FILEDESCRIPTION "NSS S/MIME Library" + +#define STRINGIZE(x) #x +#define STRINGIZE2(x) STRINGIZE(x) +#define NSS_VMAJOR_STR STRINGIZE2(NSS_VMAJOR) + +#ifdef _DEBUG +#define MY_DEBUG_STR " (debug)" +#define MY_FILEFLAGS_1 VS_FF_DEBUG +#else +#define MY_DEBUG_STR "" +#define MY_FILEFLAGS_1 0x0L +#endif +#if NSS_BETA +#define MY_FILEFLAGS_2 MY_FILEFLAGS_1|VS_FF_PRERELEASE +#else +#define MY_FILEFLAGS_2 MY_FILEFLAGS_1 +#endif + +#ifdef WINNT +#define MY_FILEOS VOS_NT_WINDOWS32 +#else +#define MY_FILEOS VOS__WINDOWS32 +#endif + +#define MY_INTERNAL_NAME MY_LIBNAME NSS_VMAJOR_STR + +///////////////////////////////////////////////////////////////////////////// +// +// Version-information resource +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0 + PRODUCTVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS MY_FILEFLAGS_2 + FILEOS MY_FILEOS + FILETYPE VFT_DLL + FILESUBTYPE 0x0L // not used + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" // Lang=US English, CharSet=Unicode + BEGIN + VALUE "CompanyName", "Netscape Communications Corporation\0" + VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0" + VALUE "FileVersion", NSS_VERSION "\0" + VALUE "InternalName", MY_INTERNAL_NAME "\0" + VALUE "LegalCopyright", "Copyright \251 1994-2001 Netscape Communications Corporation\0" + VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0" + VALUE "ProductName", "Network Security Services\0" + VALUE "ProductVersion", NSS_VERSION "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/security/nss/lib/smime/smimever.c b/security/nss/lib/smime/smimever.c new file mode 100644 index 000000000000..d10e7a6a312d --- /dev/null +++ b/security/nss/lib/smime/smimever.c @@ -0,0 +1,53 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape security libraries. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* Library identity and versioning */ + +#include "nss.h" + +#if defined(DEBUG) +#define _DEBUG_STRING " (debug)" +#else +#define _DEBUG_STRING "" +#endif + +/* + * Version information for the 'ident' and 'what commands + * + * NOTE: the first component of the concatenated rcsid string + * must not end in a '$' to prevent rcs keyword substitution. + */ +const char __nss_smime_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING + " " __DATE__ " " __TIME__ " $"; +const char __nss_smime_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING + " " __DATE__ " " __TIME__; diff --git a/security/nss/lib/ssl/config.mk b/security/nss/lib/ssl/config.mk index 16206ccbb71f..1a5d7c506c5d 100644 --- a/security/nss/lib/ssl/config.mk +++ b/security/nss/lib/ssl/config.mk @@ -49,6 +49,8 @@ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib DLLFLAGS += -DEF:ssl.def +RES = $(OBJDIR)/ssl.res +RESNAME = ssl.rc EXTRA_SHARED_LIBS += \ $(DIST)/lib/nss3.lib \ diff --git a/security/nss/lib/ssl/manifest.mn b/security/nss/lib/ssl/manifest.mn index 3795c627d058..e76c516f1a72 100644 --- a/security/nss/lib/ssl/manifest.mn +++ b/security/nss/lib/ssl/manifest.mn @@ -66,6 +66,7 @@ CSRCS = \ sslsnce.c \ sslsock.c \ ssltrace.c \ + sslver.c \ authcert.c \ cmpcert.c \ nsskea.c \ diff --git a/security/nss/lib/ssl/ssl.rc b/security/nss/lib/ssl/ssl.rc new file mode 100644 index 000000000000..864c94f94da5 --- /dev/null +++ b/security/nss/lib/ssl/ssl.rc @@ -0,0 +1,98 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape security libraries. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +#include "nss.h" +#include + +#define MY_LIBNAME "ssl" +#define MY_FILEDESCRIPTION "NSS SSL Library" + +#define STRINGIZE(x) #x +#define STRINGIZE2(x) STRINGIZE(x) +#define NSS_VMAJOR_STR STRINGIZE2(NSS_VMAJOR) + +#ifdef _DEBUG +#define MY_DEBUG_STR " (debug)" +#define MY_FILEFLAGS_1 VS_FF_DEBUG +#else +#define MY_DEBUG_STR "" +#define MY_FILEFLAGS_1 0x0L +#endif +#if NSS_BETA +#define MY_FILEFLAGS_2 MY_FILEFLAGS_1|VS_FF_PRERELEASE +#else +#define MY_FILEFLAGS_2 MY_FILEFLAGS_1 +#endif + +#ifdef WINNT +#define MY_FILEOS VOS_NT_WINDOWS32 +#else +#define MY_FILEOS VOS__WINDOWS32 +#endif + +#define MY_INTERNAL_NAME MY_LIBNAME NSS_VMAJOR_STR + +///////////////////////////////////////////////////////////////////////////// +// +// Version-information resource +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0 + PRODUCTVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS MY_FILEFLAGS_2 + FILEOS MY_FILEOS + FILETYPE VFT_DLL + FILESUBTYPE 0x0L // not used + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" // Lang=US English, CharSet=Unicode + BEGIN + VALUE "CompanyName", "Netscape Communications Corporation\0" + VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0" + VALUE "FileVersion", NSS_VERSION "\0" + VALUE "InternalName", MY_INTERNAL_NAME "\0" + VALUE "LegalCopyright", "Copyright \251 1994-2001 Netscape Communications Corporation\0" + VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0" + VALUE "ProductName", "Network Security Services\0" + VALUE "ProductVersion", NSS_VERSION "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/security/nss/lib/ssl/sslver.c b/security/nss/lib/ssl/sslver.c new file mode 100644 index 000000000000..58bcdd858aa2 --- /dev/null +++ b/security/nss/lib/ssl/sslver.c @@ -0,0 +1,53 @@ +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is the Netscape security libraries. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License Version 2 or later (the + * "GPL"), in which case the provisions of the GPL are applicable + * instead of those above. If you wish to allow use of your + * version of this file only under the terms of the GPL and not to + * allow others to use your version of this file under the MPL, + * indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by + * the GPL. If you do not delete the provisions above, a recipient + * may use your version of this file under either the MPL or the + * GPL. + */ + +/* Library identity and versioning */ + +#include "nss.h" + +#if defined(DEBUG) +#define _DEBUG_STRING " (debug)" +#else +#define _DEBUG_STRING "" +#endif + +/* + * Version information for the 'ident' and 'what commands + * + * NOTE: the first component of the concatenated rcsid string + * must not end in a '$' to prevent rcs keyword substitution. + */ +const char __nss_ssl_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING + " " __DATE__ " " __TIME__ " $"; +const char __nss_ssl_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING + " " __DATE__ " " __TIME__;