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
This commit is contained in:
wtchang%redhat.com 2006-12-04 23:31:35 +00:00
Родитель b19e29f2c4
Коммит f430d03a0b
7 изменённых файлов: 92 добавлений и 27 удалений

Просмотреть файл

@ -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"

Просмотреть файл

@ -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__;

Просмотреть файл

@ -64,6 +64,7 @@ PRIVATE_EXPORTS = \
pcertt.h \
softoken.h \
softoknt.h \
softkver.h \
$(NULL)
CSRCS = \

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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__;

Просмотреть файл

@ -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_ */

Просмотреть файл

@ -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"