summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2002-04-05 00:52:34 +0000
committercvs2hg <devnull@localhost>2002-04-05 00:52:34 +0000
commit9c19f7f7bba81ef182af21c0e5a3785e34add59d (patch)
tree38fceefac4c4396b2a3702fac6d5ac9859e95a47
parent72d25599beac76d22b82a8b553e0a7066c3ed00e (diff)
downloadnss-hg-9c19f7f7bba81ef182af21c0e5a3785e34add59d.tar.gz
fixup commit for branch 'MOZILLA_1_0_BRANCH'
-rw-r--r--dbm/include/mcom_db.h4
-rw-r--r--security/coreconf/WINCE.mk207
-rw-r--r--security/coreconf/WINCE3.0.mk (renamed from security/dbm/config/config.mk)78
-rw-r--r--security/dbm/Makefile80
-rw-r--r--security/dbm/include/Makefile76
-rw-r--r--security/dbm/include/manifest.mn57
-rw-r--r--security/dbm/manifest.mn45
-rw-r--r--security/dbm/src/Makefile76
-rw-r--r--security/dbm/src/config.mk65
-rw-r--r--security/dbm/src/dirent.c348
-rw-r--r--security/dbm/src/dirent.h97
-rw-r--r--security/dbm/src/manifest.mn61
-rw-r--r--security/dbm/tests/Makefile69
-rw-r--r--security/nss/lib/ckfw/builtins/bobject.c12
-rw-r--r--security/nss/lib/ckfw/nssckmdt.h34
-rw-r--r--security/nss/lib/ckfw/object.c19
-rw-r--r--security/nss/lib/dev/nssdev.h72
-rw-r--r--security/nss/lib/freebl/mac_rand.c4
-rw-r--r--security/nss/macbuild/smime.xml40
-rw-r--r--security/nss/macbuild/ssl.xml40
-rw-r--r--security/nss/manifest.mn2
21 files changed, 393 insertions, 1093 deletions
diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h
index 395f9d2ca..252a9b268 100644
--- a/dbm/include/mcom_db.h
+++ b/dbm/include/mcom_db.h
@@ -240,9 +240,9 @@
#include "xp_mcom.h"
#define O_ACCMODE 3 /* Mask for file access modes */
#define EFTYPE 2000
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
int mkstemp(const char *path);
-XP_END_PROTOS
+PR_END_EXTERN_C
#endif /* MACINTOSH */
#if !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2)
diff --git a/security/coreconf/WINCE.mk b/security/coreconf/WINCE.mk
new file mode 100644
index 000000000..035e3c884
--- /dev/null
+++ b/security/coreconf/WINCE.mk
@@ -0,0 +1,207 @@
+#
+# 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) 1994-2000 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.
+#
+
+#
+# Configuration common to all versions of Windows CE and Pocket PC x.
+#
+
+ifeq ($(CPU_ARCH),x86)
+ DEFAULT_COMPILER = cl
+ CC = cl
+ CCC = cl
+else
+ifeq ($(CPU_ARCH),ARM)
+ DEFAULT_COMPILER = clarm
+ CC = clarm
+ CCC = clarm
+else
+include CPU_ARCH_is_not_recognized
+include _$(CPU_ARCH)
+endif
+endif
+
+LINK = link
+AR = lib
+AR += -NOLOGO -OUT:"$@"
+RANLIB = echo
+BSDECHO = echo
+
+ifdef BUILD_TREE
+NSINSTALL_DIR = $(BUILD_TREE)/nss
+else
+NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
+endif
+NSINSTALL = nsinstall
+
+MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
+MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend.exe
+# Note: MKDEPENDENCIES __MUST__ be a relative pathname, not absolute.
+# If it is absolute, gmake will crash unless the named file exists.
+MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk
+
+INSTALL = $(NSINSTALL)
+MAKE_OBJDIR = mkdir
+MAKE_OBJDIR += $(OBJDIR)
+RC = rc.exe
+GARBAGE += $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb
+XP_DEFINE += -DXP_PC
+LIB_SUFFIX = lib
+DLL_SUFFIX = dll
+
+ifdef BUILD_OPT
+# OS_CFLAGS += -MD
+ OPTIMIZER += -O2
+ DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
+ DLLFLAGS += -OUT:"$@"
+else
+ #
+ # Define USE_DEBUG_RTL if you want to use the debug runtime library
+ # (RTL) in the debug build
+ #
+ ifdef USE_DEBUG_RTL
+# OS_CFLAGS += -MDd
+ else
+# OS_CFLAGS += -MD
+ endif
+ OPTIMIZER += -Od -Z7
+ #OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od
+ DEFINES += -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_$(USERNAME)
+ DLLFLAGS += -DEBUG -DEBUGTYPE:CV -OUT:"$@"
+ LDFLAGS += -DEBUG -DEBUGTYPE:CV
+endif
+
+# DEFINES += -DWIN32
+
+ifdef MAPFILE
+ DLLFLAGS += -DEF:$(MAPFILE)
+endif
+
+# Change PROCESS to put the mapfile in the correct format for this platform
+PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@
+
+#
+# The following is NOT needed for the NSPR 2.0 library.
+#
+
+DEFINES += -D_WINDOWS
+
+# override default, which is ASFLAGS = CFLAGS
+AS = ml.exe
+ASFLAGS = -Cp -Sn -Zi -coff $(INCLUDES)
+
+#
+# override the definitions of RELEASE_TREE found in tree.mk
+#
+ifndef RELEASE_TREE
+ ifdef BUILD_SHIP
+ ifdef USE_SHIPS
+ RELEASE_TREE = $(NTBUILD_SHIP)
+ else
+ RELEASE_TREE = //redbuild/components
+ endif
+ else
+ RELEASE_TREE = //redbuild/components
+ endif
+endif
+
+#
+# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk
+#
+
+ifndef LIB_PREFIX
+ LIB_PREFIX = $(NULL)
+endif
+
+ifndef DLL_PREFIX
+ DLL_PREFIX = $(NULL)
+endif
+
+#
+# override the definitions of various _SUFFIX symbols in suffix.mk
+#
+
+#
+# Object suffixes
+#
+ifndef OBJ_SUFFIX
+ OBJ_SUFFIX = .obj
+endif
+
+#
+# Assembler source suffixes
+#
+ifndef ASM_SUFFIX
+ ASM_SUFFIX = .asm
+endif
+
+#
+# Library suffixes
+#
+
+ifndef IMPORT_LIB_SUFFIX
+ IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX)
+endif
+
+ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING
+ DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX)
+endif
+
+#
+# Program suffixes
+#
+ifndef PROG_SUFFIX
+ PROG_SUFFIX = .exe
+endif
+
+#
+# override ruleset.mk, removing the "lib" prefix for library names, and
+# adding the "32" after the LIBRARY_VERSION.
+#
+ifdef LIBRARY_NAME
+ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll
+ IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib
+endif
+
+#
+# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
+#
+ifndef TARGETS
+ TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
+endif
+
+
+#
+# Always set CPU_TAG on Linux, OpenVMS, WINCE.
+#
+CPU_TAG = _$(CPU_ARCH)
+
diff --git a/security/dbm/config/config.mk b/security/coreconf/WINCE3.0.mk
index 94fc55a0b..ddf7a4c7b 100644
--- a/security/dbm/config/config.mk
+++ b/security/coreconf/WINCE3.0.mk
@@ -1,4 +1,3 @@
-#! gmake
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
@@ -33,35 +32,68 @@
#
#
-# These macros are defined by mozilla's configure script.
-# We define them manually here.
+# Config stuff for WINCE 3.0 (MS Pocket PC 2002)
#
+# CPU_ARCH must already be defined to one of:
+# x86, ARM
+#
+# This makefile defines the following variables:
+# OS_CFLAGS, and OS_DLLFLAGS.
-DEFINES += -DSTDC_HEADERS -DHAVE_STRERROR
+include $(CORE_DEPTH)/coreconf/WINCE.mk
-#
-# Most platforms have snprintf, so it's simpler to list the exceptions.
-#
-HAVE_SNPRINTF = 1
-#
-# OSF1 V4.0D doesn't have snprintf but V5.0A does.
-#
-ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0D)
-HAVE_SNPRINTF =
+CEVersion = 300
+CePlatform = WIN32_PLATFORM_PSPC=310
+
+ifeq ($(CPU_ARCH), x86)
+ DEFINES += -D_X86_ -D_i386_ -Di_386_ -Dx86
+ OS_CFLAGS += -Gs8192 -GF
+ OS_DLLFLAGS += -machine:IX86
+else
+ifeq ($(CPU_ARCH), ARM)
+ DEFINES += -DARM -D_ARM_
+ OS_DLLFLAGS += -machine:ARM
+else
+ include CPU_ARCH_is_undefined
endif
-ifdef HAVE_SNPRINTF
-DEFINES += -DHAVE_SNPRINTF
endif
-ifeq (,$(filter-out IRIX Linux,$(OS_ARCH)))
-DEFINES += -DHAVE_SYS_CDEFS_H
-endif
+DEFINES += -D_WIN32_WCE=300 -DUNDER_CE=300
+DEFINES += -DWIN32_PLATFORM_PSPC=310
+DEFINES += -DUNICODE -D_UNICODE
+OS_CFLAGS += -W3 -nologo
-ifeq (,$(filter-out DGUX NCR ReliantUNIX SCO_SV SCOOS UNIXWARE,$(OS_ARCH)))
-DEFINES += -DHAVE_SYS_BYTEORDER_H
-endif
+OS_DLLFLAGS += -DLL
+
+LINKFLAGS = -nologo -PDB:NONE -subsystem:windowsce,3.00 \
+ -nodefaultlib:libc.lib \
+ -nodefaultlib:libcd.lib \
+ -nodefaultlib:libcmt.lib \
+ -nodefaultlib:libcmtd.lib \
+ -nodefaultlib:msvcrt.lib \
+ -nodefaultlib:msvcrtd.lib \
+ -nodefaultlib:oldnames.lib \
+ $(NULL)
+
+LINK += $(LINKFLAGS)
+LDFLAGS += $(LINKFLAGS)
+
+OS_LIBS= coredll.lib corelibc.lib
+
+#DLLBASE = -base:"0x00100000" -stack:0x10000,0x1000 -entry:"_DllMainCRTStartup"
+DLLBASE += -align:"4096"
+
+#SUB_SHLOBJS =
+#EXTRA_LIBS =
+#EXTRA_SHARED_LIBS =
+#OS_LIBS=
+#LD_LIBS=
#
-# None of the platforms that we are interested in need to
-# define HAVE_MEMORY_H.
+# Win NT needs -GT so that fibers can work
#
+#OS_CFLAGS += -GT
+#DEFINES += -DWINNT
+
+# WINNT uses the lib prefix, Win95 and WinCE don't
+#NSPR31_LIB_PREFIX = lib
diff --git a/security/dbm/Makefile b/security/dbm/Makefile
deleted file mode 100644
index 34cd6d899..000000000
--- a/security/dbm/Makefile
+++ /dev/null
@@ -1,80 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-#######################################################################
-# (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). #
-#######################################################################
-
-
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL) #
-#######################################################################
-
-
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL). #
-#######################################################################
-
-coreconf_hack:
- cd ../coreconf; gmake
- gmake import
-
-RelEng_bld: coreconf_hack
- gmake
diff --git a/security/dbm/include/Makefile b/security/dbm/include/Makefile
deleted file mode 100644
index ba4dd8ddf..000000000
--- a/security/dbm/include/Makefile
+++ /dev/null
@@ -1,76 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-#######################################################################
-# (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). #
-#######################################################################
-
-
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL) #
-#######################################################################
-
-
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL). #
-#######################################################################
-
-
-
diff --git a/security/dbm/include/manifest.mn b/security/dbm/include/manifest.mn
deleted file mode 100644
index 886fedd98..000000000
--- a/security/dbm/include/manifest.mn
+++ /dev/null
@@ -1,57 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-CORE_DEPTH = ../..
-
-VPATH = $(CORE_DEPTH)/../dbm/include
-
-MODULE = dbm
-
-EXPORTS = nsres.h \
- cdefs.h \
- mcom_db.h \
- ncompat.h \
- winfile.h \
- $(NULL)
-
-PRIVATE_EXPORTS = hsearch.h \
- page.h \
- extern.h \
- ndbm.h \
- queue.h \
- hash.h \
- mpool.h \
- search.h \
- $(NULL)
-
diff --git a/security/dbm/manifest.mn b/security/dbm/manifest.mn
deleted file mode 100644
index 11f4f4237..000000000
--- a/security/dbm/manifest.mn
+++ /dev/null
@@ -1,45 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-CORE_DEPTH = ..
-
-MODULE = dbm
-
-IMPORTS = nspr20/v4.1.2
-
-RELEASE = dbm
-
-DIRS = include \
- src \
- $(NULL)
diff --git a/security/dbm/src/Makefile b/security/dbm/src/Makefile
deleted file mode 100644
index 8fce98394..000000000
--- a/security/dbm/src/Makefile
+++ /dev/null
@@ -1,76 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-#######################################################################
-# (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) #
-#######################################################################
-
-include $(CORE_DEPTH)/dbm/config/config.mk
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL). #
-#######################################################################
-
-include config.mk
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL) #
-#######################################################################
-
-
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL). #
-#######################################################################
-
-
-
diff --git a/security/dbm/src/config.mk b/security/dbm/src/config.mk
deleted file mode 100644
index 32baf1737..000000000
--- a/security/dbm/src/config.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG)
-
-INCLUDES += -I$(CORE_DEPTH)/../dbm/include
-
-#
-# Currently, override TARGETS variable so that only static libraries
-# are specifed as dependencies within rules.mk.
-#
-
-TARGETS = $(LIBRARY)
-SHARED_LIBRARY =
-IMPORT_LIBRARY =
-PURE_LIBRARY =
-PROGRAM =
-
-ifdef SHARED_LIBRARY
- ifeq ($(OS_ARCH),WINNT)
- ifneq ($(OS_TARGET),WIN16)
- DLLBASE=/BASE:0x30000000
- RES=$(OBJDIR)/dbm.res
- RESNAME=../include/dbm.rc
- endif
- endif
- ifeq ($(DLL_SUFFIX),dll)
- DEFINES += -D_DLL
- endif
-endif
-
-ifeq ($(OS_ARCH),AIX)
- OS_LIBS += -lc_r
-endif
diff --git a/security/dbm/src/dirent.c b/security/dbm/src/dirent.c
deleted file mode 100644
index 001a48c5c..000000000
--- a/security/dbm/src/dirent.c
+++ /dev/null
@@ -1,348 +0,0 @@
-#ifdef OS2
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <dirent.h>
-#include <errno.h>
-
-/*#ifndef __EMX__
-#include <libx.h>
-#endif */
-
-#define INCL_DOSFILEMGR
-#define INCL_DOSERRORS
-#include <os2.h>
-
-#if OS2 >= 2
-# define FFBUF FILEFINDBUF3
-# define Word ULONG
- /*
- * LS20 recommends a request count of 100, but according to the
- * APAR text it does not lead to missing files, just to funny
- * numbers of returned entries.
- *
- * LS30 HPFS386 requires a count greater than 2, or some files
- * are missing (those starting with a character less that '.').
- *
- * Novell looses entries which overflow the buffer. In previous
- * versions of dirent2, this could have lead to missing files
- * when the average length of 100 directory entries was 40 bytes
- * or more (quite unlikely for files on a Novell server).
- *
- * Conclusion: Make sure that the entries all fit into the buffer
- * and that the buffer is large enough for more than 2 entries
- * (each entry is at most 300 bytes long). And ignore the LS20
- * effect.
- */
-# define Count 25
-# define BufSz (25 * (sizeof(FILEFINDBUF3)+1))
-#else
-# define FFBUF FILEFINDBUF
-# define Word USHORT
-# define BufSz 1024
-# define Count 3
-#endif
-
-#if defined(__IBMC__) || defined(__IBMCPP__)
- #define error(rc) _doserrno = rc, errno = EOS2ERR
-#elif defined(MICROSOFT)
- #define error(rc) _doserrno = rc, errno = 255
-#else
- #define error(rc) errno = 255
-#endif
-
-struct _dirdescr {
- HDIR handle; /* DosFindFirst handle */
- char fstype; /* filesystem type */
- Word count; /* valid entries in <ffbuf> */
- long number; /* absolute number of next entry */
- int index; /* relative number of next entry */
- FFBUF * next; /* pointer to next entry */
- char name[MAXPATHLEN+3]; /* directory name */
- unsigned attrmask; /* attribute mask for seekdir */
- struct dirent entry; /* buffer for directory entry */
- BYTE ffbuf[BufSz];
-};
-
-/*
- * Return first char of filesystem type, or 0 if unknown.
- */
-static char
-getFSType(const char *path)
-{
- static char cache[1+26];
- char drive[3], info[512];
- Word unit, infolen;
- char r;
-
- if (isalpha(path[0]) && path[1] == ':') {
- unit = toupper(path[0]) - '@';
- path += 2;
- } else {
- ULONG driveMap;
-#if OS2 >= 2
- if (DosQueryCurrentDisk(&unit, &driveMap))
-#else
- if (DosQCurDisk(&unit, &driveMap))
-#endif
- return 0;
- }
-
- if ((path[0] == '\\' || path[0] == '/')
- && (path[1] == '\\' || path[1] == '/'))
- return 0;
-
- if (cache [unit])
- return cache [unit];
-
- drive[0] = '@' + unit;
- drive[1] = ':';
- drive[2] = '\0';
- infolen = sizeof info;
-#if OS2 >= 2
- if (DosQueryFSAttach(drive, 0, FSAIL_QUERYNAME, (PVOID)info, &infolen))
- return 0;
- if (infolen >= sizeof(FSQBUFFER2)) {
- FSQBUFFER2 *p = (FSQBUFFER2 *)info;
- r = p->szFSDName[p->cbName];
- } else
-#else
- if (DosQFSAttach((PSZ)drive, 0, FSAIL_QUERYNAME, (PVOID)info, &infolen, 0))
- return 0;
- if (infolen >= 9) {
- char *p = info + sizeof(USHORT);
- p += sizeof(USHORT) + *(USHORT *)p + 1 + sizeof(USHORT);
- r = *p;
- } else
-#endif
- r = 0;
- return cache [unit] = r;
-}
-
-char *
-abs_path(const char *name, char *buffer, int len)
-{
- char buf[4];
- if (isalpha(name[0]) && name[1] == ':' && name[2] == '\0') {
- buf[0] = name[0];
- buf[1] = name[1];
- buf[2] = '.';
- buf[3] = '\0';
- name = buf;
- }
-#if OS2 >= 2
- if (DosQueryPathInfo((PSZ)name, FIL_QUERYFULLNAME, buffer, len))
-#else
- if (DosQPathInfo((PSZ)name, FIL_QUERYFULLNAME, (PBYTE)buffer, len, 0L))
-#endif
- return NULL;
- return buffer;
-}
-
-DIR *
-openxdir(const char *path, unsigned att_mask)
-{
- DIR *dir;
- char name[MAXPATHLEN+3];
- Word rc;
-
- dir = malloc(sizeof(DIR));
- if (dir == NULL) {
- errno = ENOMEM;
- return NULL;
- }
-
- strncpy(name, path, MAXPATHLEN);
- name[MAXPATHLEN] = '\0';
- switch (name[strlen(name)-1]) {
- default:
- strcat(name, "\\");
- case '\\':
- case '/':
- case ':':
- ;
- }
- strcat(name, ".");
- if (!abs_path(name, dir->name, MAXPATHLEN+1))
- strcpy(dir->name, name);
- if (dir->name[strlen(dir->name)-1] == '\\')
- strcat(dir->name, "*");
- else
- strcat(dir->name, "\\*");
-
- dir->fstype = getFSType(dir->name);
- dir->attrmask = att_mask | A_DIR;
-
- dir->handle = HDIR_CREATE;
- dir->count = 100;
-#if OS2 >= 2
- rc = DosFindFirst(dir->name, &dir->handle, dir->attrmask,
- dir->ffbuf, sizeof dir->ffbuf, &dir->count, FIL_STANDARD);
-#else
- rc = DosFindFirst((PSZ)dir->name, &dir->handle, dir->attrmask,
- (PFILEFINDBUF)dir->ffbuf, sizeof dir->ffbuf, &dir->count, 0);
-#endif
- switch (rc) {
- default:
- free(dir);
- error(rc);
- return NULL;
- case NO_ERROR:
- case ERROR_NO_MORE_FILES:
- ;
- }
-
- dir->number = 0;
- dir->index = 0;
- dir->next = (FFBUF *)dir->ffbuf;
-
- return (DIR *)dir;
-}
-
-DIR *
-opendir(const char *pathname)
-{
- return openxdir(pathname, 0);
-}
-
-struct dirent *
-readdir(DIR *dir)
-{
- static int dummy_ino = 2;
-
- if (dir->index == dir->count) {
- Word rc;
- dir->count = 100;
-#if OS2 >= 2
- rc = DosFindNext(dir->handle, dir->ffbuf,
- sizeof dir->ffbuf, &dir->count);
-#else
- rc = DosFindNext(dir->handle, (PFILEFINDBUF)dir->ffbuf,
- sizeof dir->ffbuf, &dir->count);
-#endif
- if (rc) {
- error(rc);
- return NULL;
- }
-
- dir->index = 0;
- dir->next = (FFBUF *)dir->ffbuf;
- }
-
- if (dir->index == dir->count)
- return NULL;
-
- memcpy(dir->entry.d_name, dir->next->achName, dir->next->cchName);
- dir->entry.d_name[dir->next->cchName] = '\0';
- dir->entry.d_ino = dummy_ino++;
- dir->entry.d_reclen = dir->next->cchName;
- dir->entry.d_namlen = dir->next->cchName;
- dir->entry.d_size = dir->next->cbFile;
- dir->entry.d_attribute = dir->next->attrFile;
- dir->entry.d_time = *(USHORT *)&dir->next->ftimeLastWrite;
- dir->entry.d_date = *(USHORT *)&dir->next->fdateLastWrite;
-
- switch (dir->fstype) {
- case 'F': /* FAT */
- case 'C': /* CDFS */
- if (dir->next->attrFile & FILE_DIRECTORY)
- strupr(dir->entry.d_name);
- else
- strlwr(dir->entry.d_name);
- }
-
-#if OS2 >= 2
- dir->next = (FFBUF *)((BYTE *)dir->next + dir->next->oNextEntryOffset);
-#else
- dir->next = (FFBUF *)((BYTE *)dir->next->achName + dir->next->cchName + 1);
-#endif
- ++dir->number;
- ++dir->index;
-
- return &dir->entry;
-}
-
-long
-telldir(DIR *dir)
-{
- return dir->number;
-}
-
-void
-seekdir(DIR *dir, long off)
-{
- if (dir->number > off) {
- char name[MAXPATHLEN+2];
- Word rc;
-
- DosFindClose(dir->handle);
-
- strcpy(name, dir->name);
- strcat(name, "*");
-
- dir->handle = HDIR_CREATE;
- dir->count = 32767;
-#if OS2 >= 2
- rc = DosFindFirst(name, &dir->handle, dir->attrmask,
- dir->ffbuf, sizeof dir->ffbuf, &dir->count, FIL_STANDARD);
-#else
- rc = DosFindFirst((PSZ)name, &dir->handle, dir->attrmask,
- (PFILEFINDBUF)dir->ffbuf, sizeof dir->ffbuf, &dir->count, 0);
-#endif
- switch (rc) {
- default:
- error(rc);
- return;
- case NO_ERROR:
- case ERROR_NO_MORE_FILES:
- ;
- }
-
- dir->number = 0;
- dir->index = 0;
- dir->next = (FFBUF *)dir->ffbuf;
- }
-
- while (dir->number < off && readdir(dir))
- ;
-}
-
-void
-closedir(DIR *dir)
-{
- DosFindClose(dir->handle);
- free(dir);
-}
-
-/*****************************************************************************/
-
-#ifdef TEST
-
-main(int argc, char **argv)
-{
- int i;
- DIR *dir;
- struct dirent *ep;
-
- for (i = 1; i < argc; ++i) {
- dir = opendir(argv[i]);
- if (!dir)
- continue;
- while (ep = readdir(dir))
- if (strchr("\\/:", argv[i] [strlen(argv[i]) - 1]))
- printf("%s%s\n", argv[i], ep->d_name);
- else
- printf("%s/%s\n", argv[i], ep->d_name);
- closedir(dir);
- }
-
- return 0;
-}
-
-#endif
-
-#endif /* OS2 */
-
diff --git a/security/dbm/src/dirent.h b/security/dbm/src/dirent.h
deleted file mode 100644
index 07a6c0ac8..000000000
--- a/security/dbm/src/dirent.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#ifndef __DIRENT_H__
-#define __DIRENT_H__
-/*
- * @(#)msd_dir.h 1.4 87/11/06 Public Domain.
- *
- * A public domain implementation of BSD directory routines for
- * MS-DOS. Written by Michael Rendell ({uunet,utai}michael@garfield),
- * August 1897
- *
- * Extended by Peter Lim (lim@mullian.oz) to overcome some MS DOS quirks
- * and returns 2 more pieces of information - file size & attribute.
- * Plus a little reshuffling of some #define's positions December 1987
- *
- * Some modifications by Martin Junius 02-14-89
- *
- * AK900712
- * AK910410 abs_path - make absolute path
- *
- */
-
-#ifdef __EMX__
-#include <sys/param.h>
-#else
-#if defined(__IBMC__) || defined(__IBMCPP__) || defined(XP_W32_MSVC)
-#include <stdio.h>
-#ifdef MAXPATHLEN
- #undef MAXPATHLEN
-#endif
-#define MAXPATHLEN (FILENAME_MAX*4)
-#define MAXNAMLEN FILENAME_MAX
-
-#else
-#include <param.h>
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* attribute stuff */
-#ifndef A_RONLY
-# define A_RONLY 0x01
-# define A_HIDDEN 0x02
-# define A_SYSTEM 0x04
-# define A_LABEL 0x08
-# define A_DIR 0x10
-# define A_ARCHIVE 0x20
-#endif
-
-struct dirent {
-#if defined(OS2) || defined(WIN32) /* use the layout of EMX to avoid trouble */
- int d_ino; /* Dummy */
- int d_reclen; /* Dummy, same as d_namlen */
- int d_namlen; /* length of name */
- char d_name[MAXNAMLEN + 1];
- unsigned long d_size;
- unsigned short d_attribute; /* attributes (see above) */
- unsigned short d_time; /* modification time */
- unsigned short d_date; /* modification date */
-#else
- char d_name[MAXNAMLEN + 1]; /* garentee null termination */
- char d_attribute; /* .. extension .. */
- unsigned long d_size; /* .. extension .. */
-#endif
-};
-
-typedef struct _dirdescr DIR;
-/* the structs do not have to be defined here */
-
-extern DIR *opendir(const char *);
-extern DIR *openxdir(const char *, unsigned);
-extern struct dirent *readdir(DIR *);
-extern void seekdir(DIR *, long);
-extern long telldir(DIR *);
-extern void closedir(DIR *);
-#define rewinddir(dirp) seekdir(dirp, 0L)
-
-extern char * abs_path(const char *name, char *buffer, int len);
-
-#ifndef S_IFMT
-#define S_IFMT ( S_IFDIR | S_IFREG )
-#endif
-
-#ifndef S_ISDIR
-#define S_ISDIR( m ) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
-#ifndef S_ISREG
-#define S_ISREG( m ) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/security/dbm/src/manifest.mn b/security/dbm/src/manifest.mn
deleted file mode 100644
index 80f2abfd0..000000000
--- a/security/dbm/src/manifest.mn
+++ /dev/null
@@ -1,61 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-
-CORE_DEPTH = ../..
-
-VPATH = $(CORE_DEPTH)/../dbm/src
-
-MODULE = dbm
-
-#
-# memmove.c, snprintf.c, and strerror.c are not in CSRCS because
-# the Standard C Library has memmove and strerror and DBM is not
-# using snprintf.
-#
-
-CSRCS = db.c \
- h_bigkey.c \
- h_func.c \
- h_log2.c \
- h_page.c \
- hash.c \
- hash_buf.c \
- hsearch.c \
- mktemp.c \
- ndbm.c \
- nsres.c \
- dirent.c \
- $(NULL)
-
-LIBRARY_NAME = dbm
diff --git a/security/dbm/tests/Makefile b/security/dbm/tests/Makefile
deleted file mode 100644
index 5e0f96eb5..000000000
--- a/security/dbm/tests/Makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-#! gmake
-#
-# 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) 1994-2000 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.
-#
-DEPTH = ../..
-CORE_DEPTH = ../..
-
-VPATH = $(CORE_DEPTH)/../dbm/tests
-
-MODULE = dbm
-
-CSRCS = lots.c
-
-PROGRAM = lots
-
-include $(DEPTH)/coreconf/config.mk
-
-include $(DEPTH)/dbm/config/config.mk
-
-ifeq ($(OS_ARCH),WINNT)
-LIBDBM = ../src/$(PLATFORM)/dbm$(STATIC_LIB_SUFFIX)
-else
-LIBDBM = ../src/$(PLATFORM)/libdbm$(STATIC_LIB_SUFFIX)
-endif
-
-INCLUDES += -I$(CORE_DEPTH)/../dbm/include
-
-LDFLAGS = $(LDOPTS) $(LIBDBM)
-
-include $(DEPTH)/coreconf/rules.mk
-
-lots.pure: lots
- purify $(CC) -o lots.pure $(CFLAGS) $(OBJS) $(MYLIBS)
-
-crash: crash.o $(MYLIBS)
- $(CC) -o crash $(CFLAGS) $^
-
-crash.pure: crash.o $(MYLIBS)
- purify $(CC) -o crash.pure $(CFLAGS) $^
-
diff --git a/security/nss/lib/ckfw/builtins/bobject.c b/security/nss/lib/ckfw/builtins/bobject.c
index 9ad2ccaec..0fff19932 100644
--- a/security/nss/lib/ckfw/builtins/bobject.c
+++ b/security/nss/lib/ckfw/builtins/bobject.c
@@ -163,7 +163,7 @@ builtins_mdObject_GetAttributeSize
return 0;
}
-static const NSSItem *
+static NSSCKFWItem
builtins_mdObject_GetAttribute
(
NSSCKMDObject *mdObject,
@@ -178,17 +178,22 @@ builtins_mdObject_GetAttribute
CK_RV *pError
)
{
+ NSSCKFWItem mdItem;
builtinsInternalObject *io = (builtinsInternalObject *)mdObject->etc;
CK_ULONG i;
+ mdItem.needsFreeing = PR_FALSE;
+ mdItem.item = (NSSItem*) NULL;
+
for( i = 0; i < io->n; i++ ) {
if( attribute == io->types[i] ) {
- return &io->items[i];
+ mdItem.item = (NSSItem*) &io->items[i];
+ return mdItem;
}
}
*pError = CKR_ATTRIBUTE_TYPE_INVALID;
- return (NSSItem *)NULL;
+ return mdItem;
}
static CK_ULONG
@@ -226,6 +231,7 @@ builtins_prototype_mdObject = {
builtins_mdObject_GetAttributeTypes,
builtins_mdObject_GetAttributeSize,
builtins_mdObject_GetAttribute,
+ NULL, /* FreeAttribute */
NULL, /* SetAttribute */
builtins_mdObject_GetObjectSize,
(void *)NULL /* null terminator */
diff --git a/security/nss/lib/ckfw/nssckmdt.h b/security/nss/lib/ckfw/nssckmdt.h
index 30e4fc33b..c4a18a814 100644
--- a/security/nss/lib/ckfw/nssckmdt.h
+++ b/security/nss/lib/ckfw/nssckmdt.h
@@ -66,6 +66,21 @@ typedef struct NSSCKMDMechanismStr NSSCKMDMechanism;
typedef struct NSSCKMDObjectStr NSSCKMDObject;
/*
+ * NSSCKFWItem
+ *
+ * This is a structure used by modules to return object attributes.
+ * The needsFreeing bit indicates whether the object needs to be freed.
+ * If so, the framework will call the FreeAttribute function on the item
+ * after it is done using it.
+ *
+ */
+
+typedef struct {
+ PRBool needsFreeing;
+ NSSItem* item;
+} NSSCKFWItem ;
+
+/*
* NSSCKMDInstance
*
* This is the basic handle for an instance of a PKCS#11 Module.
@@ -1943,13 +1958,13 @@ struct NSSCKMDObjectStr {
);
/*
- * This routine returns the specified attribute. It can return
- * NULL upon error. The pointer in the item will not be freed;
- * any host memory required should come from the object's arena
- * (which is likely the Framework's token or session arena).
- * It may return NULL on error.
+ * This routine returns an NSSCKFWItem structure.
+ * The item pointer points to an NSSItem containing the attribute value.
+ * The needsFreeing bit tells the framework whether to call the
+ * FreeAttribute function . Upon error, an NSSCKFWItem structure
+ * with a NULL NSSItem item pointer will be returned
*/
- const NSSItem *(PR_CALLBACK *GetAttribute)(
+ NSSCKFWItem (PR_CALLBACK *GetAttribute)(
NSSCKMDObject *mdObject,
NSSCKFWObject *fwObject,
NSSCKMDSession *mdSession,
@@ -1963,6 +1978,13 @@ struct NSSCKMDObjectStr {
);
/*
+ * This routine returns CKR_OK if the attribute could be freed.
+ */
+ CK_RV (PR_CALLBACK *FreeAttribute)(
+ NSSCKFWItem * item
+ );
+
+ /*
* This routine changes the specified attribute. If unimplemented,
* the object will be considered read-only.
*/
diff --git a/security/nss/lib/ckfw/object.c b/security/nss/lib/ckfw/object.c
index de24fb633..1cbcf0172 100644
--- a/security/nss/lib/ckfw/object.c
+++ b/security/nss/lib/ckfw/object.c
@@ -598,7 +598,7 @@ nssCKFWObject_GetAttribute
)
{
NSSItem *rv = (NSSItem *)NULL;
- const NSSItem *mdItem;
+ NSSCKFWItem mdItem;
#ifdef NSSDEBUG
if( (CK_RV *)NULL == pError ) {
@@ -626,7 +626,7 @@ nssCKFWObject_GetAttribute
fwObject->fwToken, fwObject->mdInstance, fwObject->fwInstance,
attribute, pError);
- if( (NSSItem *)NULL == mdItem ) {
+ if( (NSSItem *)NULL == mdItem.item ) {
if( CKR_OK == *pError ) {
*pError = CKR_GENERAL_ERROR;
}
@@ -645,7 +645,7 @@ nssCKFWObject_GetAttribute
}
if( (void *)NULL == rv->data ) {
- rv->size = mdItem->size;
+ rv->size = mdItem.item->size;
rv->data = nss_ZAlloc(arenaOpt, rv->size);
if( (void *)NULL == rv->data ) {
*pError = CKR_HOST_MEMORY;
@@ -656,8 +656,8 @@ nssCKFWObject_GetAttribute
goto done;
}
} else {
- if( rv->size >= mdItem->size ) {
- rv->size = mdItem->size;
+ if( rv->size >= mdItem.item->size ) {
+ rv->size = mdItem.item->size;
} else {
*pError = CKR_BUFFER_TOO_SMALL;
/* Should we set rv->size to mdItem->size? */
@@ -667,7 +667,14 @@ nssCKFWObject_GetAttribute
}
}
- (void)nsslibc_memcpy(rv->data, mdItem->data, rv->size);
+ (void)nsslibc_memcpy(rv->data, mdItem.item->data, rv->size);
+
+ if (PR_TRUE == mdItem.needsFreeing) {
+ PR_ASSERT(fwObject->mdObject->FreeAttribute);
+ if (fwObject->mdObject->FreeAttribute) {
+ *pError = fwObject->mdObject->FreeAttribute(&mdItem);
+ }
+ }
done:
(void)nssCKFWMutex_Unlock(fwObject->mutex);
diff --git a/security/nss/lib/dev/nssdev.h b/security/nss/lib/dev/nssdev.h
new file mode 100644
index 000000000..7b219adfe
--- /dev/null
+++ b/security/nss/lib/dev/nssdev.h
@@ -0,0 +1,72 @@
+/*
+ * 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) 1994-2000 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.
+ */
+
+#ifndef NSSDEV_H
+#define NSSDEV_H
+
+#ifdef DEBUG
+static const char NSSDEV_CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
+#endif /* DEBUG */
+/*
+ * nssdev.h
+ *
+ * High-level methods for interaction with cryptoki devices
+ */
+
+#ifndef NSSDEVT_H
+#include "nssdevt.h"
+#endif /* NSSDEVT_H */
+
+PR_BEGIN_EXTERN_C
+
+/* NSSAlgorithmAndParameters
+ *
+ * NSSAlgorithmAndParameters_CreateSHA1Digest
+ * NSSAlgorithmAndParameters_CreateMD5Digest
+ */
+
+NSS_EXTERN NSSAlgorithmAndParameters *
+NSSAlgorithmAndParameters_CreateSHA1Digest
+(
+ NSSArena *arenaOpt
+);
+
+NSS_EXTERN NSSAlgorithmAndParameters *
+NSSAlgorithmAndParameters_CreateMD5Digest
+(
+ NSSArena *arenaOpt
+);
+
+PR_END_EXTERN_C
+
+#endif /* DEV_H */
diff --git a/security/nss/lib/freebl/mac_rand.c b/security/nss/lib/freebl/mac_rand.c
index 8578dfa08..27efdde68 100644
--- a/security/nss/lib/freebl/mac_rand.c
+++ b/security/nss/lib/freebl/mac_rand.c
@@ -297,11 +297,11 @@ void FE_ReadScreen()
offset = ( rowBytes * y ) + (UInt32)( (float)x * bytesPerPixel );
/* don't read past the end of the pixmap's rowbytes */
- bytesToRead = MIN( (UInt32)( w * bytesPerPixel ),
+ bytesToRead = PR_MIN( (UInt32)( w * bytesPerPixel ),
(UInt32)( rowBytes - ( x * bytesPerPixel ) ) );
/* don't read past the end of the graphics device pixmap */
- rowsToRead = MIN( h,
+ rowsToRead = PR_MIN( h,
( screenHeight - y ) );
p = GetPixBaseAddr( pmap ) + offset;
diff --git a/security/nss/macbuild/smime.xml b/security/nss/macbuild/smime.xml
index 79a310032..9671a3b56 100644
--- a/security/nss/macbuild/smime.xml
+++ b/security/nss/macbuild/smime.xml
@@ -604,7 +604,7 @@
<!-- Settings for "FTP Panel" panel -->
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
- <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>265mzj7n65mhi32&#224; &#177;&#176;(</VALUE></SETTING>
+ <SETTING><NAME>MWFTP_Post_password</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
@@ -1262,13 +1262,6 @@
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
- <PATH>utilDebug.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- <FILEKIND>Library</FILEKIND>
- <FILEFLAGS></FILEFLAGS>
- </FILE>
- <FILE>
- <PATHTYPE>Name</PATHTYPE>
<PATH>NSLibraryStartup.o</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
@@ -1486,11 +1479,6 @@
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
- <PATH>utilDebug.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <PATHTYPE>Name</PATHTYPE>
<PATH>NSLibraryStartup.o</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
@@ -2067,7 +2055,7 @@
<!-- Settings for "FTP Panel" panel -->
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
- <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>265mzj7n65mhi32&#224; &#177;&#176;(</VALUE></SETTING>
+ <SETTING><NAME>MWFTP_Post_password</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
@@ -2739,13 +2727,6 @@
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
- <PATH>util.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- <FILEKIND>Library</FILEKIND>
- <FILEFLAGS>Debug</FILEFLAGS>
- </FILE>
- <FILE>
- <PATHTYPE>Name</PATHTYPE>
<PATH>NSRuntime.shlb</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
@@ -2959,11 +2940,6 @@
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
- <PATH>util.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <PATHTYPE>Name</PATHTYPE>
<PATH>NSRuntime.shlb</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
@@ -3214,12 +3190,6 @@
<FILEREF>
<TARGETNAME>SMIME3Debug.shlb</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
- <PATH>utilDebug.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <TARGETNAME>SMIME3Debug.shlb</TARGETNAME>
- <PATHTYPE>Name</PATHTYPE>
<PATH>NSRuntimeDebug.shlb</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
@@ -3252,12 +3222,6 @@
<FILEREF>
<TARGETNAME>SMIME3.shlb</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
- <PATH>util.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <TARGETNAME>SMIME3.shlb</TARGETNAME>
- <PATHTYPE>Name</PATHTYPE>
<PATH>NSRuntime.shlb</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
diff --git a/security/nss/macbuild/ssl.xml b/security/nss/macbuild/ssl.xml
index 70593ab71..b6eed8118 100644
--- a/security/nss/macbuild/ssl.xml
+++ b/security/nss/macbuild/ssl.xml
@@ -584,7 +584,7 @@
<!-- Settings for "FTP Panel" panel -->
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
- <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>263mqppn63m8nj2&#224; &#177;&#176;(</VALUE></SETTING>
+ <SETTING><NAME>MWFTP_Post_password</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
@@ -1179,13 +1179,6 @@
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
- <PATH>utilDebug.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- <FILEKIND>Library</FILEKIND>
- <FILEFLAGS></FILEFLAGS>
- </FILE>
- <FILE>
- <PATHTYPE>Name</PATHTYPE>
<PATH>ssl.mcp.exp</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
@@ -1330,11 +1323,6 @@
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
- <PATH>utilDebug.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <PATHTYPE>Name</PATHTYPE>
<PATH>ssl.mcp.exp</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
@@ -1871,7 +1859,7 @@
<!-- Settings for "FTP Panel" panel -->
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
- <SETTING><NAME>MWFTP_Post_password</NAME><VALUE>263mqppn63m8nj2&#224; &#177;&#176;(</VALUE></SETTING>
+ <SETTING><NAME>MWFTP_Post_password</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_remoteDir</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathVersion</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_ftp_PathType</NAME><VALUE>0</VALUE></SETTING>
@@ -2466,13 +2454,6 @@
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
- <PATH>util.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- <FILEKIND>Library</FILEKIND>
- <FILEFLAGS>Debug</FILEFLAGS>
- </FILE>
- <FILE>
- <PATHTYPE>Name</PATHTYPE>
<PATH>ssl.mcp.exp</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Text</FILEKIND>
@@ -2617,11 +2598,6 @@
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
- <PATH>util.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <PATHTYPE>Name</PATHTYPE>
<PATH>ssl.mcp.exp</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
@@ -2801,12 +2777,6 @@
<PATH>NSStdLib.shlb</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
- <FILEREF>
- <TARGETNAME>SSL3.shlb</TARGETNAME>
- <PATHTYPE>Name</PATHTYPE>
- <PATH>util.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
</GROUP>
<GROUP><NAME>Debug</NAME>
<FILEREF>
@@ -2833,12 +2803,6 @@
<PATH>NSStdLibDebug.shlb</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
- <FILEREF>
- <TARGETNAME>SSL3Debug.shlb</TARGETNAME>
- <PATHTYPE>Name</PATHTYPE>
- <PATH>utilDebug.o</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
</GROUP>
</GROUP>
<FILEREF>
diff --git a/security/nss/manifest.mn b/security/nss/manifest.mn
index 2b0fcd29a..a72cac1ea 100644
--- a/security/nss/manifest.mn
+++ b/security/nss/manifest.mn
@@ -34,7 +34,7 @@ CORE_DEPTH = ..
DEPTH = ..
IMPORTS = nspr20/v4.1.2 \
- dbm/DBM_1_6_RTM \
+ dbm/DBM_1_61_RC1 \
$(NULL)
RELEASE = security