summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-12-04 23:31:35 +0000
committerwtchang%redhat.com <devnull@localhost>2006-12-04 23:31:35 +0000
commit8914b474f7fdf747dfdfcaaf13d5899cba9e8330 (patch)
treed89d9b495f0e914c4c5f495f06950a7377964df6
parent1ecf167a6d30179adf1a7c0141fd493a8ae409fa (diff)
downloadnss-hg-8914b474f7fdf747dfdfcaaf13d5899cba9e8330.tar.gz
Bugzilla Bug 362173: The NSS cryptographic module (the softoken and freebl
shared libraries) should have its own version numbers. r=nelsonb and neil.williams. Modified Files: lib/freebl/freebl.rc lib/freebl/freeblver.c lib/softoken/manifest.mn lib/softoken/pkcs11.c lib/softoken/softkver.c lib/softoken/softokn.rc Added Files: lib/softoken/softkver.h
-rw-r--r--security/nss/lib/freebl/freebl.rc16
-rw-r--r--security/nss/lib/freebl/freeblver.c6
-rw-r--r--security/nss/lib/softoken/manifest.mn1
-rw-r--r--security/nss/lib/softoken/pkcs11.c10
-rw-r--r--security/nss/lib/softoken/softkver.c6
-rw-r--r--security/nss/lib/softoken/softkver.h64
-rw-r--r--security/nss/lib/softoken/softokn.rc16
7 files changed, 92 insertions, 27 deletions
diff --git a/security/nss/lib/freebl/freebl.rc b/security/nss/lib/freebl/freebl.rc
index 39b0e70bc..c8dc397c8 100644
--- a/security/nss/lib/freebl/freebl.rc
+++ b/security/nss/lib/freebl/freebl.rc
@@ -34,7 +34,7 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "nss.h"
+#include "softkver.h"
#include <winver.h>
#define MY_LIBNAME "freebl"
@@ -42,7 +42,7 @@
#define STRINGIZE(x) #x
#define STRINGIZE2(x) STRINGIZE(x)
-#define NSS_VMAJOR_STR STRINGIZE2(NSS_VMAJOR)
+#define SOFTOKEN_VMAJOR_STR STRINGIZE2(SOFTOKEN_VMAJOR)
#ifdef _DEBUG
#define MY_DEBUG_STR " (debug)"
@@ -51,7 +51,7 @@
#define MY_DEBUG_STR ""
#define MY_FILEFLAGS_1 0x0L
#endif
-#if NSS_BETA
+#if SOFTOKEN_BETA
#define MY_FILEFLAGS_2 MY_FILEFLAGS_1|VS_FF_PRERELEASE
#else
#define MY_FILEFLAGS_2 MY_FILEFLAGS_1
@@ -63,7 +63,7 @@
#define MY_FILEOS VOS__WINDOWS32
#endif
-#define MY_INTERNAL_NAME MY_LIBNAME NSS_VMAJOR_STR
+#define MY_INTERNAL_NAME MY_LIBNAME SOFTOKEN_VMAJOR_STR
/////////////////////////////////////////////////////////////////////////////
//
@@ -71,8 +71,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0
- PRODUCTVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0
+ FILEVERSION SOFTOKEN_VMAJOR,SOFTOKEN_VMINOR,SOFTOKEN_VPATCH,0
+ PRODUCTVERSION SOFTOKEN_VMAJOR,SOFTOKEN_VMINOR,SOFTOKEN_VPATCH,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS MY_FILEFLAGS_2
FILEOS MY_FILEOS
@@ -86,11 +86,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "Mozilla Foundation\0"
VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
- VALUE "FileVersion", NSS_VERSION "\0"
+ VALUE "FileVersion", SOFTOKEN_VERSION "\0"
VALUE "InternalName", MY_INTERNAL_NAME "\0"
VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
VALUE "ProductName", "Network Security Services\0"
- VALUE "ProductVersion", NSS_VERSION "\0"
+ VALUE "ProductVersion", SOFTOKEN_VERSION "\0"
END
END
BLOCK "VarFileInfo"
diff --git a/security/nss/lib/freebl/freeblver.c b/security/nss/lib/freebl/freeblver.c
index e2c6a538c..2c5954534 100644
--- a/security/nss/lib/freebl/freeblver.c
+++ b/security/nss/lib/freebl/freeblver.c
@@ -36,7 +36,7 @@
/* Library identity and versioning */
-#include "nss.h"
+#include "softkver.h"
#if defined(DEBUG)
#define _DEBUG_STRING " (debug)"
@@ -50,7 +50,7 @@
* NOTE: the first component of the concatenated rcsid string
* must not end in a '$' to prevent rcs keyword substitution.
*/
-const char __nss_freebl_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING
+const char __nss_freebl_rcsid[] = "$Header: NSS " SOFTOKEN_VERSION _DEBUG_STRING
" " __DATE__ " " __TIME__ " $";
-const char __nss_freebl_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING
+const char __nss_freebl_sccsid[] = "@(#)NSS " SOFTOKEN_VERSION _DEBUG_STRING
" " __DATE__ " " __TIME__;
diff --git a/security/nss/lib/softoken/manifest.mn b/security/nss/lib/softoken/manifest.mn
index 983d66887..5df3a4517 100644
--- a/security/nss/lib/softoken/manifest.mn
+++ b/security/nss/lib/softoken/manifest.mn
@@ -64,6 +64,7 @@ PRIVATE_EXPORTS = \
pcertt.h \
softoken.h \
softoknt.h \
+ softkver.h \
$(NULL)
CSRCS = \
diff --git a/security/nss/lib/softoken/pkcs11.c b/security/nss/lib/softoken/pkcs11.c
index 16d4b26de..6187437b2 100644
--- a/security/nss/lib/softoken/pkcs11.c
+++ b/security/nss/lib/softoken/pkcs11.c
@@ -63,7 +63,7 @@
#include "secport.h"
#include "pcert.h"
#include "secrng.h"
-#include "nss.h"
+#include "softkver.h"
#include "keydbi.h"
@@ -3158,8 +3158,8 @@ CK_RV NSC_GetInfo(CK_INFO_PTR pInfo)
pInfo->cryptokiVersion.major = 2;
pInfo->cryptokiVersion.minor = 20;
PORT_Memcpy(pInfo->manufacturerID,manufacturerID,32);
- pInfo->libraryVersion.major = NSS_VMAJOR;
- pInfo->libraryVersion.minor = NSS_VMINOR;
+ pInfo->libraryVersion.major = SOFTOKEN_VMAJOR;
+ pInfo->libraryVersion.minor = SOFTOKEN_VMINOR;
PORT_Memcpy(pInfo->libraryDescription,libraryDescription,32);
pInfo->flags = 0;
return CKR_OK;
@@ -3204,8 +3204,8 @@ CK_RV NSC_GetSlotInfo(CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo)
}
/* ok we really should read it out of the keydb file. */
/* pInfo->hardwareVersion.major = NSSLOWKEY_DB_FILE_VERSION; */
- pInfo->hardwareVersion.major = NSS_VMAJOR;
- pInfo->hardwareVersion.minor = NSS_VMINOR;
+ pInfo->hardwareVersion.major = SOFTOKEN_VMAJOR;
+ pInfo->hardwareVersion.minor = SOFTOKEN_VMINOR;
return CKR_OK;
}
diff --git a/security/nss/lib/softoken/softkver.c b/security/nss/lib/softoken/softkver.c
index 343be94bb..931d620e1 100644
--- a/security/nss/lib/softoken/softkver.c
+++ b/security/nss/lib/softoken/softkver.c
@@ -36,7 +36,7 @@
/* Library identity and versioning */
-#include "nss.h"
+#include "softkver.h"
#if defined(DEBUG)
#define _DEBUG_STRING " (debug)"
@@ -50,7 +50,7 @@
* NOTE: the first component of the concatenated rcsid string
* must not end in a '$' to prevent rcs keyword substitution.
*/
-const char __nss_softokn_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING
+const char __nss_softokn_rcsid[] = "$Header: NSS " SOFTOKEN_VERSION _DEBUG_STRING
" " __DATE__ " " __TIME__ " $";
-const char __nss_softokn_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING
+const char __nss_softokn_sccsid[] = "@(#)NSS " SOFTOKEN_VERSION _DEBUG_STRING
" " __DATE__ " " __TIME__;
diff --git a/security/nss/lib/softoken/softkver.h b/security/nss/lib/softoken/softkver.h
new file mode 100644
index 000000000..96ab4cb6c
--- /dev/null
+++ b/security/nss/lib/softoken/softkver.h
@@ -0,0 +1,64 @@
+/*
+ * Softoken version numbers
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * 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 the Initial Developer are Copyright (C) 1994-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef _SOFTKVER_H_
+#define _SOFTKVER_H_
+
+/*
+ * Softoken's major version, minor version, patch level, and whether
+ * this is a beta release.
+ *
+ * The format of the version string should be
+ * "<major version>.<minor version>[.<patch level>] [<Beta>]"
+ */
+#ifdef NSS_ENABLE_ECC
+#ifdef NSS_ECC_MORE_THAN_SUITE_B
+#define SOFTOKEN_VERSION "3.12 Extended ECC Beta"
+#else
+#define SOFTOKEN_VERSION "3.12 Basic ECC Beta"
+#endif
+#else
+#define SOFTOKEN_VERSION "3.12 Beta"
+#endif
+#define SOFTOKEN_VMAJOR 3
+#define SOFTOKEN_VMINOR 12
+#define SOFTOKEN_VPATCH 0
+#define SOFTOKEN_BETA PR_TRUE
+
+#endif /* _SOFTKVER_H_ */
diff --git a/security/nss/lib/softoken/softokn.rc b/security/nss/lib/softoken/softokn.rc
index bbf8905a0..860155318 100644
--- a/security/nss/lib/softoken/softokn.rc
+++ b/security/nss/lib/softoken/softokn.rc
@@ -34,7 +34,7 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "nss.h"
+#include "softkver.h"
#include <winver.h>
#define MY_LIBNAME "softokn"
@@ -42,7 +42,7 @@
#define STRINGIZE(x) #x
#define STRINGIZE2(x) STRINGIZE(x)
-#define NSS_VMAJOR_STR STRINGIZE2(NSS_VMAJOR)
+#define SOFTOKEN_VMAJOR_STR STRINGIZE2(SOFTOKEN_VMAJOR)
#ifdef _DEBUG
#define MY_DEBUG_STR " (debug)"
@@ -51,7 +51,7 @@
#define MY_DEBUG_STR ""
#define MY_FILEFLAGS_1 0x0L
#endif
-#if NSS_BETA
+#if SOFTOKEN_BETA
#define MY_FILEFLAGS_2 MY_FILEFLAGS_1|VS_FF_PRERELEASE
#else
#define MY_FILEFLAGS_2 MY_FILEFLAGS_1
@@ -63,7 +63,7 @@
#define MY_FILEOS VOS__WINDOWS32
#endif
-#define MY_INTERNAL_NAME MY_LIBNAME NSS_VMAJOR_STR
+#define MY_INTERNAL_NAME MY_LIBNAME SOFTOKEN_VMAJOR_STR
/////////////////////////////////////////////////////////////////////////////
//
@@ -71,8 +71,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0
- PRODUCTVERSION NSS_VMAJOR,NSS_VMINOR,NSS_VPATCH,0
+ FILEVERSION SOFTOKEN_VMAJOR,SOFTOKEN_VMINOR,SOFTOKEN_VPATCH,0
+ PRODUCTVERSION SOFTOKEN_VMAJOR,SOFTOKEN_VMINOR,SOFTOKEN_VPATCH,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS MY_FILEFLAGS_2
FILEOS MY_FILEOS
@@ -86,11 +86,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "Mozilla Foundation\0"
VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
- VALUE "FileVersion", NSS_VERSION "\0"
+ VALUE "FileVersion", SOFTOKEN_VERSION "\0"
VALUE "InternalName", MY_INTERNAL_NAME "\0"
VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
VALUE "ProductName", "Network Security Services\0"
- VALUE "ProductVersion", NSS_VERSION "\0"
+ VALUE "ProductVersion", SOFTOKEN_VERSION "\0"
END
END
BLOCK "VarFileInfo"