summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2000-07-27 18:25:32 +0000
committercvs2hg <devnull@localhost>2000-07-27 18:25:32 +0000
commit59151db9a02acf05908de9b6df8f3e424513150a (patch)
tree5fba8a88c542e5a0f475f2eac85aa06da573c592
parentb4dd7bda56eaf37da6408c8709968458cf3613fc (diff)
downloadnss-hg-59151db9a02acf05908de9b6df8f3e424513150a.tar.gz
fixup commit for branch 'SeaMonkey_M17_BRANCH'SeaMonkey_M17_RELEASESeaMonkey_M17_BASE
-rw-r--r--dbm/include/mcom_db.h10
-rw-r--r--dbm/src/hash.c1
-rw-r--r--security/coreconf/.cshrc273
-rw-r--r--security/coreconf/.profile216
-rw-r--r--security/coreconf/AIX.mk74
-rw-r--r--security/coreconf/AIX3.2.mk35
-rw-r--r--security/coreconf/AIX4.1.mk46
-rw-r--r--security/coreconf/AIX4.2.mk44
-rw-r--r--security/coreconf/AIX4.3.mk51
-rw-r--r--security/coreconf/FreeBSD2.mk65
-rw-r--r--security/coreconf/HP-UX.mk70
-rw-r--r--security/coreconf/HP-UXA.09.03.mk44
-rw-r--r--security/coreconf/HP-UXA.09.07.mk43
-rw-r--r--security/coreconf/HP-UXA.09.mk38
-rw-r--r--security/coreconf/HP-UXB.10.01.mk40
-rw-r--r--security/coreconf/HP-UXB.10.10.mk50
-rw-r--r--security/coreconf/HP-UXB.10.20.mk50
-rw-r--r--security/coreconf/HP-UXB.10.30.mk56
-rw-r--r--security/coreconf/HP-UXB.10.mk38
-rw-r--r--security/coreconf/HP-UXB.11.00.mk55
-rw-r--r--security/coreconf/HP-UXB.11.mk56
-rw-r--r--security/coreconf/IRIX.mk122
-rw-r--r--security/coreconf/IRIX5.2.mk35
-rw-r--r--security/coreconf/IRIX5.3.mk37
-rw-r--r--security/coreconf/IRIX5.mk40
-rw-r--r--security/coreconf/IRIX6.2.mk43
-rw-r--r--security/coreconf/IRIX6.3.mk42
-rw-r--r--security/coreconf/IRIX6.5.mk42
-rw-r--r--security/coreconf/IRIX6.mk47
-rw-r--r--security/coreconf/Linux.mk97
-rw-r--r--security/coreconf/Linux2.1.mk44
-rw-r--r--security/coreconf/Linux2.2.mk43
-rw-r--r--security/coreconf/LinuxELF1.2.mk36
-rw-r--r--security/coreconf/LinuxELF2.0.mk36
-rw-r--r--security/coreconf/Makefile43
-rw-r--r--security/coreconf/NCR3.0.mk90
-rw-r--r--security/coreconf/NEC4.2.mk61
-rw-r--r--security/coreconf/OSF1.mk74
-rw-r--r--security/coreconf/OSF1V2.0.mk35
-rw-r--r--security/coreconf/OSF1V3.0.mk35
-rw-r--r--security/coreconf/OSF1V3.2.mk44
-rw-r--r--security/coreconf/OSF1V4.0.mk51
-rw-r--r--security/coreconf/OSF1V4.0B.mk35
-rw-r--r--security/coreconf/OSF1V4.0D.mk39
-rw-r--r--security/coreconf/README568
-rw-r--r--security/coreconf/ReliantUNIX.mk84
-rw-r--r--security/coreconf/ReliantUNIX5.4.mk35
-rw-r--r--security/coreconf/SCOOS5.0.mk36
-rw-r--r--security/coreconf/SCO_SV3.2.mk86
-rw-r--r--security/coreconf/SunOS4.1.3_U1.mk59
-rw-r--r--security/coreconf/SunOS5.3.mk38
-rw-r--r--security/coreconf/SunOS5.4.mk38
-rw-r--r--security/coreconf/SunOS5.4_i86pc.mk68
-rw-r--r--security/coreconf/SunOS5.5.1.mk44
-rw-r--r--security/coreconf/SunOS5.5.1_i86pc.mk45
-rw-r--r--security/coreconf/SunOS5.5.mk42
-rw-r--r--security/coreconf/SunOS5.6.mk44
-rw-r--r--security/coreconf/SunOS5.6_i86pc.mk45
-rw-r--r--security/coreconf/SunOS5.7.mk44
-rw-r--r--security/coreconf/SunOS5.8.mk44
-rw-r--r--security/coreconf/SunOS5.mk133
-rw-r--r--security/coreconf/UNIX.mk87
-rw-r--r--security/coreconf/UNIXWARE2.1.mk51
-rw-r--r--security/coreconf/WIN16.mk117
-rw-r--r--security/coreconf/WIN32.mk100
-rw-r--r--security/coreconf/WIN954.0.mk63
-rw-r--r--security/coreconf/WINNT3.51.mk70
-rw-r--r--security/coreconf/WINNT4.0.mk69
-rw-r--r--security/coreconf/arch.mk292
-rw-r--r--security/coreconf/command.mk55
-rw-r--r--security/coreconf/config.mk142
-rw-r--r--security/coreconf/coreconf.pl156
-rwxr-xr-xsecurity/coreconf/cpdist.pl195
-rw-r--r--security/coreconf/headers.mk54
-rwxr-xr-xsecurity/coreconf/import.pl218
-rw-r--r--security/coreconf/jdk.mk652
-rwxr-xr-xsecurity/coreconf/jniregen.pl92
-rw-r--r--security/coreconf/location.mk60
-rw-r--r--security/coreconf/makefile.win100
-rw-r--r--security/coreconf/module.mk64
-rw-r--r--security/coreconf/nsinstall/Makefile59
-rwxr-xr-xsecurity/coreconf/nsinstall/nfspwd46
-rw-r--r--security/coreconf/nsinstall/nfspwd.pl46
-rw-r--r--security/coreconf/nsinstall/nsinstall.c403
-rw-r--r--security/coreconf/nsinstall/pathsub.c302
-rw-r--r--security/coreconf/nsinstall/pathsub.h77
-rw-r--r--security/coreconf/nsinstall/sunos4.h163
-rwxr-xr-xsecurity/coreconf/outofdate.pl67
-rw-r--r--security/coreconf/platform.mk38
-rw-r--r--security/coreconf/prefix.mk88
-rwxr-xr-xsecurity/coreconf/release.pl136
-rw-r--r--security/coreconf/rules.mk971
-rw-r--r--security/coreconf/ruleset.mk362
-rw-r--r--security/coreconf/source.mk174
-rw-r--r--security/coreconf/suffix.mk132
-rw-r--r--security/coreconf/tree.mk114
-rw-r--r--security/coreconf/version.mk103
-rw-r--r--security/coreconf/version.pl76
-rw-r--r--security/nss/cmd/bltest/Makefile82
-rw-r--r--security/nss/cmd/bltest/blapitest.c1798
-rw-r--r--security/nss/cmd/bltest/manifest.mn50
-rw-r--r--security/nss/cmd/bltest/tests/README26
-rw-r--r--security/nss/cmd/bltest/tests/des3_cbc/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/des3_cbc/iv01
-rw-r--r--security/nss/cmd/bltest/tests/des3_cbc/key01
-rw-r--r--security/nss/cmd/bltest/tests/des3_cbc/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/des3_cbc/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/des3_ecb/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/des3_ecb/key01
-rw-r--r--security/nss/cmd/bltest/tests/des3_ecb/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/des3_ecb/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/des_cbc/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/des_cbc/iv01
-rw-r--r--security/nss/cmd/bltest/tests/des_cbc/key01
-rw-r--r--security/nss/cmd/bltest/tests/des_cbc/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/des_cbc/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/des_ecb/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/des_ecb/key01
-rw-r--r--security/nss/cmd/bltest/tests/des_ecb/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/des_ecb/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/dsa/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/dsa/key06
-rw-r--r--security/nss/cmd/bltest/tests/dsa/keyseed01
-rw-r--r--security/nss/cmd/bltest/tests/dsa/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/dsa/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/dsa/pqg04
-rw-r--r--security/nss/cmd/bltest/tests/dsa/sigseed01
-rw-r--r--security/nss/cmd/bltest/tests/md2/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/md2/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/md2/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/md5/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/md5/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/md5/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_cbc/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_cbc/iv01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_cbc/key01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_cbc/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/rc2_cbc/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_ecb/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_ecb/key01
-rw-r--r--security/nss/cmd/bltest/tests/rc2_ecb/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/rc2_ecb/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/rc4/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/rc4/key01
-rw-r--r--security/nss/cmd/bltest/tests/rc4/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/rc4/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_cbc/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_cbc/iv01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_cbc/key01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_cbc/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/rc5_cbc/params02
-rw-r--r--security/nss/cmd/bltest/tests/rc5_cbc/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_ecb/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_ecb/key01
-rw-r--r--security/nss/cmd/bltest/tests/rc5_ecb/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/rc5_ecb/params02
-rw-r--r--security/nss/cmd/bltest/tests/rc5_ecb/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/rsa/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/rsa/key04
-rw-r--r--security/nss/cmd/bltest/tests/rsa/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/rsa/plaintext01
-rw-r--r--security/nss/cmd/bltest/tests/sha1/ciphertext01
-rw-r--r--security/nss/cmd/bltest/tests/sha1/numtests1
-rw-r--r--security/nss/cmd/bltest/tests/sha1/plaintext01
-rw-r--r--security/nss/cmd/certutil/certutil.c30
-rw-r--r--security/nss/cmd/lib/secpwd.c4
-rw-r--r--security/nss/cmd/lib/secutil.c18
-rw-r--r--security/nss/cmd/selfserv/selfserv.c18
-rw-r--r--security/nss/lib/certdb/certdb.h2
-rw-r--r--security/nss/lib/ckfw/dbm/Makefile38
-rw-r--r--security/nss/lib/ckfw/dbm/anchor.c50
-rw-r--r--security/nss/lib/ckfw/dbm/ckdbm.h281
-rw-r--r--security/nss/lib/ckfw/dbm/config.mk37
-rw-r--r--security/nss/lib/ckfw/dbm/db.c1065
-rw-r--r--security/nss/lib/ckfw/dbm/find.c166
-rw-r--r--security/nss/lib/ckfw/dbm/instance.c196
-rw-r--r--security/nss/lib/ckfw/dbm/manifest.mn54
-rw-r--r--security/nss/lib/ckfw/dbm/object.c204
-rw-r--r--security/nss/lib/ckfw/dbm/session.c298
-rw-r--r--security/nss/lib/ckfw/dbm/slot.c214
-rw-r--r--security/nss/lib/ckfw/dbm/token.c315
-rw-r--r--security/nss/lib/pk11wrap/pk11sdr.c6
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c77
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c71
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c79
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c105
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c90
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c85
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c135
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c117
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c104
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c153
-rw-r--r--security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c72
-rw-r--r--security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c85
-rwxr-xr-xsecurity/nss/macbuild/NSS.mcpbin85883 -> 91899 bytes
-rwxr-xr-xsecurity/nss/tests/all.sh2
-rwxr-xr-xsecurity/nss/tests/common/arch.sh31
-rw-r--r--security/nss/tests/common/init.sh8
-rwxr-xr-xsecurity/nss/tests/ssl/ssl.sh90
-rw-r--r--security/nss/tests/ssl/sslauth.txt24
200 files changed, 168 insertions, 16160 deletions
diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h
index af4e0f9e2..5b7098e68 100644
--- a/dbm/include/mcom_db.h
+++ b/dbm/include/mcom_db.h
@@ -156,7 +156,7 @@
#ifndef XP_OS2
#define MAXPATHLEN 1024
#else
-#include "os2file.h" /* includes dirent.h */
+#include <dirent.h>
#endif
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
@@ -200,10 +200,10 @@ XP_END_PROTOS
#endif /* MACINTOSH */
#if defined(XP_OS2)
-#include <xp_mcom.h>
-XP_BEGIN_PROTOS
-int mkstemp(char *path);
-XP_END_PROTOS
+/* #include <xp_mcom.h> */
+/* XP_BEGIN_PROTOS */
+/* int mkstemp(char *path); */
+/* XP_END_PROTOS */
#endif
#ifndef macintosh
diff --git a/dbm/src/hash.c b/dbm/src/hash.c
index be08567fc..cef9e08da 100644
--- a/dbm/src/hash.c
+++ b/dbm/src/hash.c
@@ -47,7 +47,6 @@ static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#if !defined(macintosh)
#ifdef XP_OS2_EMX
#include <sys/types.h>
-#include "xp_mcom.h" /* For strdup. */
#endif
#include <sys/stat.h>
#endif
diff --git a/security/coreconf/.cshrc b/security/coreconf/.cshrc
deleted file mode 100644
index 659e4f7aa..000000000
--- a/security/coreconf/.cshrc
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/csh
-#
-# 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.
-#
-# Startup file for csh and tcsh. It is meant to work on:
-#
-# SunOS 4.1.3_U1,
-# Sun Solaris,
-# Sun Solaris on Intel,
-# SGI IRIX,
-# SGI IRIX64,
-# UNIX_SV,
-# IBM AIX,
-# Hewlett-Packard HP-UX,
-# SCO_SV,
-# FreeBSD,
-# DEC OSF/1,
-# Linux,
-# and everything else.
-#
-
-###############################################
-# Set operating system name and release level #
-###############################################
-
-set os_name=`uname -s`
-set os_release=`uname -r`
-
-##########################################################
-# Set environment variables based upon operating system #
-##########################################################
-
-if ($os_name == "SunOS" && $os_release == "4.1.3_U1") then
- ##############################
- # SunOS 4.1.3_U1
- #
-
- setenv NO_MDUPDATE 1
-
- set path = ( /tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_sunos4.1.3_U1/bin \
- /tools/ns/bin \
- /sbin \
- /usr/bin \
- /usr/openwin/bin \
- /usr/openwin/include \
- /usr/ucb \
- /usr/local/bin \
- /etc \
- /usr/etc \
- /usr/etc/install \
- . )
-
-else if ($os_name == "SunOS") then
- ################################
- # Assume it is Sun Solaris
- #
-
- # To build Navigator on Solaris 2.5, I must set the environment
- # variable NO_MDUPDATE and use gcc-2.6.3.
- setenv NO_MDUPDATE 1
-
- set path = ( /share/builds/components/jdk/1.2.2_01/SunOS \
- /usr/ccs/bin \
- /usr/opt/bin \
- /tools/ns/bin \
- /usr/sbin \
- /sbin \
- /usr/bin \
- /usr/dt/bin \
- /usr/openwin/bin \
- /usr/openwin/include \
- /usr/ucb \
- /usr/opt/java/bin \
- /usr/local/bin \
- /etc \
- /usr/etc \
- /usr/etc/install \
- /opt/Acrobat3/bin \
- . )
-
- # To get the native Solaris cc
- if (`uname -m` == i86pc) then
- set path = ( /h/solx86/export/home/opt/SUNWspro/SC3.0.1/bin \
- $path )
- else
- set path = ( /tools/ns/workshop/bin \
- /tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_solaris2.4/bin \
- $path )
- endif
-
- setenv LD_LIBRARY_PATH /share/builds/components/jdk/1.2.2_01/SunOS/lib/sparc/native_threads
-
- setenv MANPATH /usr/local/man:/usr/local/lib/mh/man:/usr/local/lib/rcscvs/man:/usr/local/lib/fvwm/man:/usr/local/lib/xscreensaver/man:/usr/share/man:/usr/openwin/man:/usr/opt/man
-
- # For Purify
- setenv PURIFYHOME /usr/local-sparc-solaris/pure/purify-4.0-solaris2
- setenv PATH ${PURIFYHOME}:$PATH
- setenv MANPATH $PURIFYHOME/man:$MANPATH
- setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:$PURIFYHOME
- setenv PURIFYOPTIONS "-max_threads=1000 -follow-child-processes=yes"
-
-else if ($os_name == "IRIX" || $os_name == "IRIX64") then
- #############
- # SGI Irix
- #
-
- set path = ( /share/builds/components/jdk/1.2.1/IRIX \
- /tools/ns/bin \
- /tools/contrib/bin \
- /usr/local/bin \
- /usr/sbin \
- /usr/bsd \
- /usr/bin \
- /bin \
- /etc \
- /usr/etc \
- /usr/bin/X11 \
- . )
-
-else if ($os_name == "UNIX_SV") then
- #################
- # UNIX_SV
- #
-
- set path = ( /usr/local/bin \
- /tools/ns/bin \
- /bin \
- /usr/bin \
- /usr/bin/X11 \
- /X11/bin \
- /usr/X/bin \
- /usr/ucb \
- /usr/sbin \
- /sbin \
- /usr/ccs/bin \
- . )
-
-else if ($os_name == "AIX") then
- #################
- # IBM AIX
- #
-
- set path = ( /share/builds/components/jdk/1.2.2/AIX \
- /usr/ucb/ \
- /tools/ns-arch/rs6000_ibm_aix4.1/bin \
- /tools/ns-arch/rs6000_ibm_aix3.2.5/bin \
- /share/tools/ns/soft/cvs-1.8/run/default/rs6000_ibm_aix3.2.5/bin \
- /bin \
- /usr/bin \
- /usr/ccs/bin \
- /usr/sbin \
- /usr/local/bin \
- /usr/bin/X11 \
- /usr/etc \
- /etc \
- /sbin \
- . )
-
-else if ($os_name == "HP-UX") then
- #################
- # HP UX
- #
-
- set path = ( /share/builds/components/jdk/1.1.6/HP-UX \
- /usr/bin \
- /opt/ansic/bin \
- /usr/ccs/bin \
- /usr/contrib/bin \
- /opt/nettladm/bin \
- /opt/graphics/common/bin \
- /usr/bin/X11 \
- /usr/contrib/bin/X11 \
- /opt/upgrade/bin \
- /opt/CC/bin \
- /opt/aCC/bin \
- /opt/langtools/bin \
- /opt/imake/bin \
- /etc \
- /usr/etc \
- /usr/local/bin \
- /tools/ns/bin \
- /tools/contrib/bin \
- /usr/sbin \
- /usr/local/bin \
- /tools/ns/bin \
- /tools/contrib/bin \
- /usr/sbin \
- /usr/include/X11R5 \
- . )
-
-else if ($os_name == "SCO_SV") then
- #################
- # SCO
- #
-
- set path = ( /bin \
- /usr/bin \
- /tools/ns/bin \
- /tools/contrib/bin \
- /usr/sco/bin \
- /usr/bin/X11 \
- /usr/local/bin \
- . )
-
-else if ($os_name == "FreeBSD") then
- #################
- # FreeBSD
- #
-
- setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/local/bin:/usr/ucb:/usr/ccs/bin:/tools/contrib/bin:/tools/ns/bin:.
-
-else if ($os_name == "OSF1") then
- #################
- # DEC OSF1
- #
-
- set path = ( /share/builds/components/jdk/1.2.2_3/OSF1 \
- /tools/ns-arch/alpha_dec_osf4.0/bin \
- /tools/ns-arch/soft/cvs-1.8.3/run/default/alpha_dec_osf2.0/bin \
- /usr/local-alpha-osf/bin \
- /usr3/local/bin \
- /usr/local/bin \
- /usr/sbin \
- /usr/bin \
- /bin \
- /usr/bin/X11 \
- /usr/ucb \
- . )
-
-else if ($os_name == "Linux") then
- #################
- # Linux
- #
-
- set path = ( /share/builds/components/jdk/1.2.2/Linux \
- $path )
-
-endif
-
-###############################
-# Reset any "tracked" aliases #
-###############################
-
-rehash
diff --git a/security/coreconf/.profile b/security/coreconf/.profile
deleted file mode 100644
index 5474405e2..000000000
--- a/security/coreconf/.profile
+++ /dev/null
@@ -1,216 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-# Startup file for sh, ksh and bash. It is meant to work on:
-#
-# SunOS 4.1.3_U1,
-# Sun Solaris,
-# Sun Solaris on Intel,
-# SGI IRIX,
-# SGI IRIX64,
-# UNIX_SV,
-# IBM AIX,
-# Hewlett-Packard HP-UX,
-# SCO_SV,
-# FreeBSD,
-# DEC OSF/1,
-# Linux,
-# and everything else.
-#
-
-###############################################
-# Set operating system name and release level #
-###############################################
-
-OS_NAME=`uname -s`
-export OS_NAME
-
-OS_RELEASE=`uname -r`
-export OS_RELEASE
-
-##########################################################
-# Set environment variables based upon operating system #
-##########################################################
-
-case $OS_NAME in
-
- SunOS)
- ##############################
- # Sun
- #
-
- case $OS_RELEASE in
-
- 4.1.3_U1)
- ##############################
- # SunOS 4.1.3_U1
- #
-
- NO_MDUPDATE=1
- export NO_MDUPDATE
-
- PATH=/tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_sunos4.1.3_U1/bin:tools/ns/bin:/sbin:/usr/bin:/usr/openwin/bin:/usr/openwin/include:/usr/ucb:/usr/local/bin:/etc:/usr/etc:/usr/etc/install:.
- export PATH
- ;;
-
- *)
- ################################
- # Assume it is Sun Solaris
- #
-
- # To build Navigator on Solaris 2.5, I must set the environment
- # variable NO_MDUPDATE and use gcc-2.6.3.
- NO_MDUPDATE=1
- export NO_MDUPDATE
-
- PATH=/share/builds/components/jdk/1.2.2_01/SunOS:/usr/ccs/bin:/usr/opt/bin:/tools/ns/bin:/usr/sbin:/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/openwin/include:/usr/ucb:/usr/opt/java/bin:/usr/local/bin:/etc:/usr/etc:/usr/etc/install:/opt/Acrobat3/bin:.
- export PATH
-
- # To get the native Solaris cc
- OS_TEST=`uname -m`
- export OS_TEST
-
- case $OS_TEST in
-
- i86pc)
- PATH=/h/solx86/export/home/opt/SUNWspro/SC3.0.1/bin:$PATH
- export PATH
- ;;
-
- *)
- PATH=/tools/ns/workshop/bin:/tools/ns/soft/gcc-2.6.3/run/default/sparc_sun_solaris2.4/bin:$PATH
- export PATH
- ;;
- esac
-
- LD_LIBRARY_PATH=/share/builds/components/jdk/1.2.2_01/SunOS/lib/sparc/native_threads
- export LD_LIBRARY_PATH
-
- MANPATH=/usr/local/man:/usr/local/lib/mh/man:/usr/local/lib/rcscvs/man:/usr/local/lib/fvwm/man:/usr/local/lib/xscreensaver/man:/usr/share/man:/usr/openwin/man:/usr/opt/man
- export MANPATH
-
- # For Purify
- PURIFYHOME=/usr/local-sparc-solaris/pure/purify-4.0-solaris2
- export PURIFYHOME
- PATH=/usr/local-sparc-solaris/pure/purify-4.0-solaris2:$PATH
- export PATH
- MANPATH=$PURIFYHOME/man:$MANPATH
- export MANPATH
- LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local-sparc-solaris/pure/purify-4.0-solaris2
- export LD_LIBRARY_PATH
- PURIFYOPTIONS="-max_threads=1000 -follow-child-processes=yes"
- export PURIFYOPTIONS
- ;;
- esac
- ;;
-
- IRIX | IRIX64)
- #############
- # SGI Irix
- #
-
- PATH=/share/builds/components/jdk/1.2.1/IRIX:/tools/ns/bin:/tools/contrib/bin:/usr/local/bin:/usr/sbin:/usr/bsd:/usr/bin:/bin:/etc:/usr/etc:/usr/bin/X11:.
- export PATH
- ;;
-
- UNIX_SV)
- #################
- # UNIX_SV
- #
-
- PATH=/usr/local/bin:/tools/ns/bin:/bin:/usr/bin:/usr/bin/X11:/X11/bin:/usr/X/bin:/usr/ucb:/usr/sbin:/sbin:/usr/ccs/bin:.
- export PATH
- ;;
-
- AIX)
- #################
- # IBM AIX
- #
-
- PATH=/share/builds/components/jdk/1.2.2/AIX:/usr/ucb/:/tools/ns-arch/rs6000_ibm_aix4.1/bin:/tools/ns-arch/rs6000_ibm_aix3.2.5/bin:/share/tools/ns/soft/cvs-1.8/run/default/rs6000_ibm_aix3.2.5/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:/usr/local/bin:/usr/bin/X11:/usr/etc:/etc:/sbin:.
- export PATH
- ;;
-
- HP-UX)
- #################
- # HP UX
- #
-
- PATH=/share/builds/components/jdk/1.1.6/HP-UX:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/graphics/common/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/upgrade/bin:/opt/CC/bin:/opt/aCC/bin:/opt/langtools/bin:/opt/imake/bin:/etc:/usr/etc:/usr/local/bin:/tools/ns/bin:/tools/contrib/bin:/usr/sbin:/usr/local/bin:/tools/ns/bin:/tools/contrib/bin:/usr/sbin:/usr/include/X11R5:.
- export PATH
- ;;
-
- SCO_SV)
- #################
- # SCO
- #
-
- PATH=/bin:/usr/bin:/tools/ns/bin:/tools/contrib/bin:/usr/sco/bin:/usr/bin/X11:/usr/local/bin:.
- export PATH
- ;;
-
- FreeBSD)
-
- #################
- # FreeBSD
- #
-
- PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/local/bin:/usr/ucb:/usr/ccs/bin:/tools/contrib/bin:/tools/ns/bin:.
- export PATH
- ;;
-
- OSF1)
- #################
- # DEC OSF1
- #
-
- PATH=/share/builds/components/jdk/1.2.2_3/OSF1:/tools/ns-arch/alpha_dec_osf4.0/bin:/tools/ns-arch/soft/cvs-1.8.3/run/default/alpha_dec_osf2.0/bin:/usr/local-alpha-osf/bin:/usr3/local/bin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/bin/X11:/usr/ucb:.
- export PATH
- ;;
-
- Linux)
-
- #################
- # Linux
- #
-
- PATH=/share/builds/components/jdk/1.2.2/Linux:$PATH
- export PATH
- ;;
-esac
-
-###############################
-# Reset any "tracked" aliases #
-###############################
-
-hash -r
diff --git a/security/coreconf/AIX.mk b/security/coreconf/AIX.mk
deleted file mode 100644
index 1f62cb0a3..000000000
--- a/security/coreconf/AIX.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# 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.
-#
-# Config stuff for AIX.
-#
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-#
-# There are two implementation strategies available on AIX:
-# pthreads, and pthreads-user. The default is pthreads.
-# In both strategies, we need to use pthread_user.c, instead of
-# aix.c. The fact that aix.c is never used is somewhat strange.
-#
-# So we need to do the following:
-# - Default (PTHREADS_USER not defined in the environment or on
-# the command line):
-# Set PTHREADS_USER=1, USE_PTHREADS=1
-# - PTHREADS_USER=1 set in the environment or on the command line:
-# Do nothing.
-#
-ifeq ($(PTHREADS_USER),1)
- USE_PTHREADS = # just to be safe
- IMPL_STRATEGY = _PTH_USER
-else
- USE_PTHREADS = 1
- PTHREADS_USER = 1
-endif
-
-DEFAULT_COMPILER = xlC_r
-
-CC = xlC_r
-CCC = xlC_r
-
-CPU_ARCH = rs6000
-
-RANLIB = ranlib
-
-OS_CFLAGS = -DAIX -DSYSV
-ifeq ($(CC),xlC_r)
- OS_CFLAGS += -qarch=com
-endif
-
-AIX_WRAP = $(DIST)/lib/aixwrap.o
-AIX_TMP = $(OBJDIR)/_aix_tmp.o
-OS_LIBS += -lsvld
diff --git a/security/coreconf/AIX3.2.mk b/security/coreconf/AIX3.2.mk
deleted file mode 100644
index c93a00eef..000000000
--- a/security/coreconf/AIX3.2.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-# Config stuff for AIX3.2.5
-#
-include $(CORE_DEPTH)/coreconf/AIX.mk
diff --git a/security/coreconf/AIX4.1.mk b/security/coreconf/AIX4.1.mk
deleted file mode 100644
index ba93b4ce2..000000000
--- a/security/coreconf/AIX4.1.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# 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.
-#
-# Config stuff for AIX4.1
-#
-
-include $(CORE_DEPTH)/coreconf/AIX.mk
-
-
-AIX_LINK_OPTS += -bnso -berok
-#AIX_LINK_OPTS += -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
-
-# The AIX4.1 linker had a bug which always looked for a dynamic library
-# with an extension of .a. AIX4.2 fixed this problem
-DLL_SUFFIX = a
-
-OS_LIBS += -lsvld
diff --git a/security/coreconf/AIX4.2.mk b/security/coreconf/AIX4.2.mk
deleted file mode 100644
index 8be6ee6ce..000000000
--- a/security/coreconf/AIX4.2.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-
-#
-# Config stuff for AIX4.2
-#
-
-include $(CORE_DEPTH)/coreconf/AIX.mk
-
-OS_CFLAGS += -DAIX4_2
-DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
-MKSHLIB = $(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm
-
-OS_LIBS += -L/usr/lpp/xlC/lib -lc -lm
-
diff --git a/security/coreconf/AIX4.3.mk b/security/coreconf/AIX4.3.mk
deleted file mode 100644
index 11ad35267..000000000
--- a/security/coreconf/AIX4.3.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# 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.
-#
-# Config stuff for AIX4.3
-#
-
-include $(CORE_DEPTH)/coreconf/AIX.mk
-
-
-ifeq ($(USE_64), 1)
-# Next line replaced by generic name handling in arch.mk
-# COMPILER_TAG = _64
- OS_CFLAGS += -O2 -DAIX_64BIT
- OBJECT_MODE=64
- export OBJECT_MODE
-endif
-OS_CFLAGS += -DAIX4_3
-DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
-MKSHLIB = $(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm
-
-OS_LIBS += -L/usr/lpp/xlC/lib -lc -lm
-
diff --git a/security/coreconf/FreeBSD2.mk b/security/coreconf/FreeBSD2.mk
deleted file mode 100644
index 974ebe4fd..000000000
--- a/security/coreconf/FreeBSD2.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# 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.
-#
-# Config stuff for FreeBSD2
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = gcc
-CC = gcc
-CCC = g++
-RANLIB = ranlib
-
-OS_REL_CFLAGS = -mno-486 -Di386
-CPU_ARCH = x86
-
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-
-ifdef USE_PTHREADS
- OS_LIBS = -lc_r
- DEFINES += -D_PR_NEED_FAKE_POLL
-else
- OS_LIBS = -lc
-endif
-
-ARCH = freebsd
-
-DSO_CFLAGS = -fPIC
-DSO_LDOPTS = -Bshareable
-DSO_LDFLAGS =
-
-MKSHLIB = $(LD) $(DSO_LDOPTS)
-
-G++INCLUDES = -I/usr/include/g++
-
-INCLUDES += -I/usr/X11R6/include
diff --git a/security/coreconf/HP-UX.mk b/security/coreconf/HP-UX.mk
deleted file mode 100644
index 0c3d4440f..000000000
--- a/security/coreconf/HP-UX.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# 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.
-
-#
-# Config stuff for HP-UX
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-CPU_ARCH = hppa
-DLL_SUFFIX = sl
-CCC = CC
-OS_CFLAGS += -Ae $(DSO_CFLAGS) -DHPUX -D$(CPU_ARCH) -D_HPUX_SOURCE
-
-ifeq ($(DEFAULT_IMPL_STRATEGY),_PTH)
- USE_PTHREADS = 1
- ifeq ($(CLASSIC_NSPR),1)
- USE_PTHREADS =
- IMPL_STRATEGY = _CLASSIC
- endif
- ifeq ($(PTHREADS_USER),1)
- USE_PTHREADS =
- IMPL_STRATEGY = _PTH_USER
- endif
-endif
-
-ifdef PTHREADS_USER
- OS_CFLAGS += -D_POSIX_C_SOURCE=199506L
-endif
-
-MKSHLIB = $(LD) $(DSO_LDOPTS)
-
-DSO_LDOPTS = -b
-DSO_LDFLAGS =
-
-# +Z generates position independent code for use in shared libraries.
-DSO_CFLAGS = +Z
-
-HAVE_PURIFY = 1
diff --git a/security/coreconf/HP-UXA.09.03.mk b/security/coreconf/HP-UXA.09.03.mk
deleted file mode 100644
index 7ac02ae2a..000000000
--- a/security/coreconf/HP-UXA.09.03.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-
-#
-# On HP-UX 9, the default (and only) implementation strategy is
-# classic nspr.
-#
-ifeq ($(OS_RELEASE),A.09.03)
- DEFAULT_IMPL_STRATEGY = _CLASSIC
-endif
-
-#
-# Config stuff for HP-UXA.09.03
-#
-include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk
diff --git a/security/coreconf/HP-UXA.09.07.mk b/security/coreconf/HP-UXA.09.07.mk
deleted file mode 100644
index 9fcf4c826..000000000
--- a/security/coreconf/HP-UXA.09.07.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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.
-#
-# On HP-UX 9, the default (and only) implementation strategy is
-# classic nspr.
-#
-ifeq ($(OS_RELEASE),A.09.07)
- DEFAULT_IMPL_STRATEGY = _CLASSIC
-endif
-
-#
-# Config stuff for HP-UXA.09.07
-#
-include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk
diff --git a/security/coreconf/HP-UXA.09.mk b/security/coreconf/HP-UXA.09.mk
deleted file mode 100644
index 813a16f40..000000000
--- a/security/coreconf/HP-UXA.09.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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.
-
-#
-# Config stuff for HP-UXA.09
-#
-include $(CORE_DEPTH)/coreconf/HP-UX.mk
-
-OS_CFLAGS += -DHPUX9
diff --git a/security/coreconf/HP-UXB.10.01.mk b/security/coreconf/HP-UXB.10.01.mk
deleted file mode 100644
index 718ee1184..000000000
--- a/security/coreconf/HP-UXB.10.01.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# 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.
-#
-ifeq ($(OS_RELEASE),B.10.01)
- DEFAULT_IMPL_STRATEGY = _CLASSIC
-endif
-
-#
-# Config stuff for HP-UXB.10.01
-#
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
diff --git a/security/coreconf/HP-UXB.10.10.mk b/security/coreconf/HP-UXB.10.10.mk
deleted file mode 100644
index bb6f8cfb5..000000000
--- a/security/coreconf/HP-UXB.10.10.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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.
-#
-# On HP-UX 10.10 and 10.20, the default implementation strategy is
-# pthreads (actually DCE threads). Classic nspr is also available.
-#
-
-ifeq ($(OS_RELEASE),B.10.10)
- DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-#
-# Config stuff for HP-UXB.10.10
-#
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
-
-OS_CFLAGS += -DHPUX10_10
-
-ifeq ($(USE_PTHREADS),1)
- OS_CFLAGS += -D_REENTRANT -D_PR_DCETHREADS
-endif
diff --git a/security/coreconf/HP-UXB.10.20.mk b/security/coreconf/HP-UXB.10.20.mk
deleted file mode 100644
index eeae7cd3a..000000000
--- a/security/coreconf/HP-UXB.10.20.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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.
-#
-# On HP-UX 10.10 and 10.20, the default implementation strategy is
-# pthreads (actually DCE threads). Classic nspr is also available.
-#
-
-ifeq ($(OS_RELEASE),B.10.20)
- DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-#
-# Config stuff for HP-UXB.10.20
-#
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
-
-OS_CFLAGS += -DHPUX10_20
-
-ifeq ($(USE_PTHREADS),1)
- OS_CFLAGS += -D_REENTRANT -D_PR_DCETHREADS
-endif
diff --git a/security/coreconf/HP-UXB.10.30.mk b/security/coreconf/HP-UXB.10.30.mk
deleted file mode 100644
index ef52d1122..000000000
--- a/security/coreconf/HP-UXB.10.30.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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.
-#
-# On HP-UX 10.30 and 11.00, the default implementation strategy is
-# pthreads. Classic nspr and pthreads-user are also available.
-#
-
-ifeq ($(OS_RELEASE),B.10.30)
- DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-#
-# Config stuff for HP-UXB.10.30.
-#
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
-
-OS_CFLAGS += -DHPUX10_30
-
-#
-# To use the true pthread (kernel thread) library on 10.30 and
-# 11.00, we should define _POSIX_C_SOURCE to be 199506L.
-# The _REENTRANT macro is deprecated.
-#
-
-ifdef USE_PTHREADS
- OS_CFLAGS += -D_POSIX_C_SOURCE=199506L
-endif
diff --git a/security/coreconf/HP-UXB.10.mk b/security/coreconf/HP-UXB.10.mk
deleted file mode 100644
index 77ca9bce7..000000000
--- a/security/coreconf/HP-UXB.10.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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.
-#
-# Config stuff for HP-UXB.10
-#
-include $(CORE_DEPTH)/coreconf/HP-UX.mk
-
-OS_CFLAGS += -DHPUX10
-OS_LIBS += -lpthread -lm
diff --git a/security/coreconf/HP-UXB.11.00.mk b/security/coreconf/HP-UXB.11.00.mk
deleted file mode 100644
index 0732202ae..000000000
--- a/security/coreconf/HP-UXB.11.00.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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.
-#
-# On HP-UX 10.30 and 11.00, the default implementation strategy is
-# pthreads. Classic nspr and pthreads-user are also available.
-#
-
-ifeq ($(OS_RELEASE),B.11.00)
-OS_CFLAGS += -DHPUX10
-DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-#
-# To use the true pthread (kernel thread) library on 10.30 and
-# 11.00, we should define _POSIX_C_SOURCE to be 199506L.
-# The _REENTRANT macro is deprecated.
-#
-
-ifdef USE_PTHREADS
- OS_CFLAGS += -D_POSIX_C_SOURCE=199506L
-endif
-
-#
-# Config stuff for HP-UXB.11.00.
-#
-include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk
diff --git a/security/coreconf/HP-UXB.11.mk b/security/coreconf/HP-UXB.11.mk
deleted file mode 100644
index 7b5a631f4..000000000
--- a/security/coreconf/HP-UXB.11.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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.
-#
-# Config stuff for HP-UXB.11
-#
-include $(CORE_DEPTH)/coreconf/HP-UX.mk
-
-ifndef NS_USE_GCC
- CCC = /opt/aCC/bin/aCC -ext
- ifeq ($(USE_64), 1)
- OS_CFLAGS += -Aa +e +DA2.0W +DS2.0 +DChpux
-# Next line replaced by generic name handling in arch.mk
-# COMPILER_TAG = _64
- else
- ifdef USE_LONG_LONGS
- OS_CFLAGS += -Aa +e +DA2.0 +DS2.0
- else
- OS_CFLAGS += +DAportable +DS1.1
- endif
- endif
-else
- CCC = aCC
-endif
-
-OS_CFLAGS += -DHPUX11
-OS_LIBS += -lpthread -lm -lrt
-HPUX11 = 1
diff --git a/security/coreconf/IRIX.mk b/security/coreconf/IRIX.mk
deleted file mode 100644
index fe0f906b5..000000000
--- a/security/coreconf/IRIX.mk
+++ /dev/null
@@ -1,122 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-#
-# The default implementation strategy for Irix is classic nspr.
-#
-ifeq ($(USE_PTHREADS),1)
- ifeq ($(USE_N32),1)
- IMPL_STRATEGY = _n32_PTH
- else
- IMPL_STRATEGY = _PTH
- endif
-endif
-
-DEFAULT_COMPILER = cc
-
-ifdef NS_USE_GCC
- CC = gcc
- AS = $(CC) -x assembler-with-cpp
- ODD_CFLAGS = -Wall -Wno-format
- ifdef BUILD_OPT
- OPTIMIZER = -O6
- endif
-else
- CC = cc
- CCC = CC
- ODD_CFLAGS = -fullwarn -xansi
- ifdef BUILD_OPT
- ifeq ($(USE_N32),1)
- OPTIMIZER = -O -OPT:Olimit=4000
- else
- OPTIMIZER = -O -Olimit 4000
- endif
- endif
-
- # For 6.x machines, include this flag
- ifeq (6., $(findstring 6., $(OS_RELEASE)))
- ifeq ($(USE_N32),1)
- ODD_CFLAGS += -n32 -mips3 -exceptions
- else
- ODD_CFLAGS += -32 -multigot
- endif
- else
- ODD_CFLAGS += -xgot
- endif
- ifeq ($(USE_N32),1)
- OS_CFLAGS += -dollar
- endif
-endif
-
-ODD_CFLAGS += -DSVR4 -DIRIX
-
-CPU_ARCH = mips
-
-RANLIB = /bin/true
-# For purify
-# NOTE: should always define _SGI_MP_SOURCE
-NOMD_OS_CFLAGS += $(ODD_CFLAGS) -D_SGI_MP_SOURCE
-
-ifndef NO_MDUPDATE
- OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
-else
- OS_CFLAGS += $(NOMD_OS_CFLAGS)
-endif
-
-ifeq ($(USE_N32),1)
- SHLIB_LD_OPTS += -n32 -mips3
-endif
-
-MKSHLIB += $(LD) $(SHLIB_LD_OPTS) -shared -soname $(@:$(OBJDIR)/%.so=%.so)
-
-HAVE_PURIFY = 1
-
-DSO_LDOPTS = -elf -shared -all
-
-ifdef DSO_BACKEND
- DSO_LDOPTS += -soname $(DSO_NAME)
-endif
-
-#
-# Revision notes:
-#
-# In the IRIX compilers prior to version 7.2, -n32 implied -mips3.
-# Beginning in the 7.2 compilers, -n32 implies -mips4 when the compiler
-# is running on a system with a mips4 CPU (e.g. R8K, R10K).
-# We want our code to explicitly be mips3 code, so we now explicitly
-# set -mips3 whenever we set -n32.
-#
diff --git a/security/coreconf/IRIX5.2.mk b/security/coreconf/IRIX5.2.mk
deleted file mode 100644
index fbb4a137b..000000000
--- a/security/coreconf/IRIX5.2.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 5.2
-#
-include $(CORE_DEPTH)/coreconf/IRIX5.mk
diff --git a/security/coreconf/IRIX5.3.mk b/security/coreconf/IRIX5.3.mk
deleted file mode 100644
index b7134592b..000000000
--- a/security/coreconf/IRIX5.3.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 5.3
-#
-include $(CORE_DEPTH)/coreconf/IRIX5.mk
-
-OS_CFLAGS += -DIRIX5_3
diff --git a/security/coreconf/IRIX5.mk b/security/coreconf/IRIX5.mk
deleted file mode 100644
index 56bfb0ea5..000000000
--- a/security/coreconf/IRIX5.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 5
-#
-
-include $(CORE_DEPTH)/coreconf/IRIX.mk
-
-ifndef NS_USE_GCC
- ODD_CFLAGS += -xgot
-endif
diff --git a/security/coreconf/IRIX6.2.mk b/security/coreconf/IRIX6.2.mk
deleted file mode 100644
index e17a0c3b6..000000000
--- a/security/coreconf/IRIX6.2.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 6.2
-#
-
-
-# catch unresolved symbols
-
-SHLIB_LD_OPTS += -no_unresolved
-
-include $(CORE_DEPTH)/coreconf/IRIX6.mk
-
-OS_CFLAGS += -DIRIX6_2
diff --git a/security/coreconf/IRIX6.3.mk b/security/coreconf/IRIX6.3.mk
deleted file mode 100644
index a684a1e11..000000000
--- a/security/coreconf/IRIX6.3.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 6.3
-#
-
-# catch unresolved symbols
-
-SHLIB_LD_OPTS += -no_unresolved
-
-include $(CORE_DEPTH)/coreconf/IRIX6.mk
-
-OS_CFLAGS += -DIRIX6_3
diff --git a/security/coreconf/IRIX6.5.mk b/security/coreconf/IRIX6.5.mk
deleted file mode 100644
index 7f68d82cb..000000000
--- a/security/coreconf/IRIX6.5.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 6.5
-#
-
-# catch unresolved symbols
-
-SHLIB_LD_OPTS += -no_unresolved
-
-include $(CORE_DEPTH)/coreconf/IRIX6.mk
-
-OS_CFLAGS += -DIRIX6_5 -mips3
diff --git a/security/coreconf/IRIX6.mk b/security/coreconf/IRIX6.mk
deleted file mode 100644
index a401dc6f3..000000000
--- a/security/coreconf/IRIX6.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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.
-#
-# Config stuff for IRIX 6
-#
-
-include $(CORE_DEPTH)/coreconf/IRIX.mk
-
-ifndef NS_USE_GCC
- ifneq ($(USE_N32),1)
- OS_CFLAGS += -32
- endif
- ODD_CFLAGS += -multigot
-endif
-
-ifeq ($(USE_PTHREADS),1)
-OS_LIBS += -lpthread
-endif
diff --git a/security/coreconf/Linux.mk b/security/coreconf/Linux.mk
deleted file mode 100644
index 444f4b272..000000000
--- a/security/coreconf/Linux.mk
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Linux
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-#
-# The default implementation strategy for Linux is now pthreads
-#
-USE_PTHREADS = 1
-
-ifeq ($(USE_PTHREADS),1)
- IMPL_STRATEGY = _PTH
-endif
-
-CC = gcc
-CCC = g++
-RANLIB = ranlib
-
-DEFAULT_COMPILER = gcc
-
-ifeq ($(OS_TEST),ppc)
- OS_REL_CFLAGS = -DMACLINUX -DLINUX1_2
- CPU_ARCH = ppc
-else
-ifeq ($(OS_TEST),alpha)
- OS_REL_CFLAGS = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
- CPU_ARCH = alpha
-else
- OS_REL_CFLAGS = -mno-486 -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
- CPU_ARCH = x86
-endif
-endif
-
-
-LIBC_TAG = _glibc
-
-ifeq ($(OS_RELEASE),2.0)
- OS_REL_CFLAGS += -DLINUX2_0
- MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
- ifdef BUILD_OPT
- OPTIMIZER = -O2
- endif
-endif
-
-ifeq ($(USE_PTHREADS),1)
-OS_PTHREAD = -lpthread
-endif
-
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
-OS_LIBS = -L/lib $(OS_PTHREAD) -ldl -lc
-
-ifdef USE_PTHREADS
- DEFINES += -D_REENTRANT -D_PR_NEED_FAKE_POLL
-else
- DEFINES += -D_PR_LOCAL_THREADS_ONLY
-endif
-
-ARCH = linux
-
-DSO_CFLAGS = -fPIC
-DSO_LDOPTS = -shared
-DSO_LDFLAGS =
-
-# INCLUDES += -I/usr/include -Y/usr/include/linux
-G++INCLUDES = -I/usr/include/g++
diff --git a/security/coreconf/Linux2.1.mk b/security/coreconf/Linux2.1.mk
deleted file mode 100644
index bfbfe6b90..000000000
--- a/security/coreconf/Linux2.1.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Linux 2.1 (ELF)
-#
-
-include $(CORE_DEPTH)/coreconf/Linux.mk
-ifeq ($(OS_RELEASE),2.1)
- OS_REL_CFLAGS += -DLINUX2_1
- MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
- ifdef BUILD_OPT
- OPTIMIZER = -O2
- endif
-endif
-
diff --git a/security/coreconf/Linux2.2.mk b/security/coreconf/Linux2.2.mk
deleted file mode 100644
index c552c1d76..000000000
--- a/security/coreconf/Linux2.2.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Linux 2.2 (ELF)
-#
-
-include $(CORE_DEPTH)/coreconf/Linux.mk
-
-OS_REL_CFLAGS += -DLINUX2_1
-MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
-ifdef BUILD_OPT
- OPTIMIZER = -O2
-endif
-
diff --git a/security/coreconf/LinuxELF1.2.mk b/security/coreconf/LinuxELF1.2.mk
deleted file mode 100644
index 860787958..000000000
--- a/security/coreconf/LinuxELF1.2.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Linux 1.2 (ELF)
-#
-
-include $(CORE_DEPTH)/coreconf/Linux.mk
diff --git a/security/coreconf/LinuxELF2.0.mk b/security/coreconf/LinuxELF2.0.mk
deleted file mode 100644
index a85dfafa9..000000000
--- a/security/coreconf/LinuxELF2.0.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Linux 2.0 (ELF)
-#
-
-include $(CORE_DEPTH)/coreconf/Linux.mk
diff --git a/security/coreconf/Makefile b/security/coreconf/Makefile
deleted file mode 100644
index 9f6fd6078..000000000
--- a/security/coreconf/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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 = ..
-
-MODULE = coreconf
-
-DIRS = nsinstall mkdepend md
-
-include $(DEPTH)/coreconf/config.mk
-include $(DEPTH)/coreconf/rules.mk
-
-export:: libs
diff --git a/security/coreconf/NCR3.0.mk b/security/coreconf/NCR3.0.mk
deleted file mode 100644
index 8193bd1f5..000000000
--- a/security/coreconf/NCR3.0.mk
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# 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.
-#
-# Config stuff for NCR SysVr4 v 3.0
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-###
-NS_USE_NATIVE = 1
-
-# NS_USE_GCC = 1
-
-export PATH:=$(PATH):/opt/ncc/bin
-###
-
-RANLIB = true
-GCC_FLAGS_EXTRA += -pipe
-
-DEFINES += -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR
-
-OS_CFLAGS += -Hnocopyr -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -DPRFSTREAMS_BROKEN
-
-ifdef NS_USE_NATIVE
- CC = cc
- CCC = ncc
- CXX = ncc
-# OS_LIBS += -L/opt/ncc/lib
-else
-# OS_LIBS +=
-endif
-
-#OS_LIBS += -lsocket -lnsl -ldl -lc
-
-MKSHLIB += $(LD) $(DSO_LDOPTS)
-#DSO_LDOPTS += -G -z defs
-DSO_LDOPTS += -G
-
-CPU_ARCH = x86
-ARCH = ncr
-
-NOSUCHFILE = /solaris-rm-f-sucks
-
-# now take care of default GCC (rus@5/5/97)
-
-ifdef NS_USE_GCC
- # if gcc-settings are redefined already - don't touch it
- #
- ifeq (,$(findstring gcc, $(CC)))
- CC = gcc
- CCC = g++
- CXX = g++
- # always use -fPIC - some makefiles are still broken and don't distinguish
- # situation when they build shared and static libraries
- CFLAGS += -fPIC -Wall $(GCC_FLAGS_EXTRA)
-# OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc
- endif
-endif
-###
diff --git a/security/coreconf/NEC4.2.mk b/security/coreconf/NEC4.2.mk
deleted file mode 100644
index 8e635f1ca..000000000
--- a/security/coreconf/NEC4.2.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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.
-#
-# Config stuff for NEC Mips SYSV
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc
-
-CPU_ARCH = mips
-
-ifdef NS_USE_GCC
-CC = gcc
-CCC = g++
-else
-CC = $(CORE_DEPTH)/build/hcc
-OS_CFLAGS = -Xa -KGnum=0 -KOlimit=4000
-CCC = g++
-endif
-
-MKSHLIB = $(LD) $(DSO_LDOPTS)
-
-RANLIB = /bin/true
-
-OS_CFLAGS += $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
-OS_LIBS = -lsocket -lnsl -ldl $(LDOPTIONS)
-LDOPTIONS = -lc -L/usr/ucblib -lucb
-
-NOSUCHFILE = /nec-rm-f-sucks
-
-DSO_LDOPTS = -G
diff --git a/security/coreconf/OSF1.mk b/security/coreconf/OSF1.mk
deleted file mode 100644
index 3b7cdab5f..000000000
--- a/security/coreconf/OSF1.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# 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.
-#
-# Config stuff for DEC OSF/1
-#
-
-#
-# The Bourne shell (sh) on OSF1 doesn't handle "set -e" correctly,
-# which we use to stop LOOP_OVER_DIRS submakes as soon as any
-# submake fails. So we use the Korn shell instead.
-#
-SHELL = /usr/bin/ksh
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-CC = cc
-OS_CFLAGS += $(NON_LD_FLAGS) -std1
-CCC = cxx
-RANLIB = /bin/true
-CPU_ARCH = alpha
-
-ifdef BUILD_OPT
- OPTIMIZER += -Olimit 4000
-endif
-
-NON_LD_FLAGS += -ieee_with_inexact
-OS_CFLAGS += -DOSF1 -D_REENTRANT
-
-ifneq ($(USE_64), 1)
- LDFLAGS += -taso
-endif
-
-ifeq ($(USE_PTHREADS),1)
- OS_CFLAGS += -pthread
-endif
-
-ifeq ($(USE_IPV6),1)
- OS_CFLAGS += -D_PR_INET6
-endif
-
-# The command to build a shared library on OSF1.
-MKSHLIB += ld -shared -all -expect_unresolved "*"
-DSO_LDOPTS += -shared
diff --git a/security/coreconf/OSF1V2.0.mk b/security/coreconf/OSF1V2.0.mk
deleted file mode 100644
index de7dab643..000000000
--- a/security/coreconf/OSF1V2.0.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-# Config stuff for DEC OSF/1 V2.0
-#
-include $(CORE_DEPTH)/coreconf/OSF1.mk
diff --git a/security/coreconf/OSF1V3.0.mk b/security/coreconf/OSF1V3.0.mk
deleted file mode 100644
index 623b2f971..000000000
--- a/security/coreconf/OSF1V3.0.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-# Config stuff for DEC OSF/1 V3.0
-#
-include $(CORE_DEPTH)/coreconf/OSF1.mk
diff --git a/security/coreconf/OSF1V3.2.mk b/security/coreconf/OSF1V3.2.mk
deleted file mode 100644
index 9d584b37b..000000000
--- a/security/coreconf/OSF1V3.2.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-#
-# On OSF1 V3.2, classic nspr is the default (and only) implementation
-# strategy.
-#
-
-#
-# Config stuff for DEC OSF/1 V3.2
-#
-include $(CORE_DEPTH)/coreconf/OSF1.mk
-
-ifeq ($(OS_RELEASE),V3.2)
- OS_CFLAGS += -DOSF1V3
-endif
diff --git a/security/coreconf/OSF1V4.0.mk b/security/coreconf/OSF1V4.0.mk
deleted file mode 100644
index 164a6613a..000000000
--- a/security/coreconf/OSF1V4.0.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# 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.
-#
-# On OSF1 V4.0, pthreads is the default implementation strategy.
-# Classic nspr is also available.
-#
-ifneq ($(OS_RELEASE),V3.2)
- USE_PTHREADS = 1
- ifeq ($(CLASSIC_NSPR), 1)
- USE_PTHREADS =
- IMPL_STRATEGY := _CLASSIC
- endif
-endif
-
-#
-# Config stuff for DEC OSF/1 V4.0
-#
-include $(CORE_DEPTH)/coreconf/OSF1.mk
-
-ifeq ($(OS_RELEASE),V4.0)
- OS_CFLAGS += -DOSF1V4
-endif
diff --git a/security/coreconf/OSF1V4.0B.mk b/security/coreconf/OSF1V4.0B.mk
deleted file mode 100644
index 73f357d17..000000000
--- a/security/coreconf/OSF1V4.0B.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-# Config stuff for DEC OSF/1 V4.0B
-#
-include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
diff --git a/security/coreconf/OSF1V4.0D.mk b/security/coreconf/OSF1V4.0D.mk
deleted file mode 100644
index 515c76d5f..000000000
--- a/security/coreconf/OSF1V4.0D.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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.
-#
-# Config stuff for DEC OSF/1 V4.0D
-#
-include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
-DEFINES += -DOSF1V4D
-
-OS_LIBS += -lpthread -lrt
-
diff --git a/security/coreconf/README b/security/coreconf/README
deleted file mode 100644
index f769ee56d..000000000
--- a/security/coreconf/README
+++ /dev/null
@@ -1,568 +0,0 @@
-OVERVIEW of "ns/coreconf":
-
- This README file is an attempt to provide the reader with a simple
- synopsis of the "ns/coreconf" build system which was originally
- fundamentally designed and built to accomodate Netscape's binary
- release model. Wherever possible, an attempt has been made to
- comply with the NSPR 2.0 build system, including mimicing the
- compiler/linker flags, and directory naming structure. The reader
- should keep in mind that the system builds binary releases of
- header files, class files, libraries, and executables on numerous
- flavors of UNIX and Windows operating systems. Unfortunately,
- no serious attempt has ever been made to incorporate an ability to
- generate cross-platform binaries on an Apple MacIntosh platform.
-
- Note that this file will not attempt to redefine or document the
- architecture of this system. However, documents on this subject
- are available at the following URL:
-
- http://warp/hardcore/prj-ttools/specs/release/index.html
-
-
-
-DEPENDENCIES of "ns/coreconf":
-
- The "ns/coreconf" build system requires the specified versions of
- the following platform-dependent tools:
-
- UNIX Platforms:
- --------------
- gmake (version 3.74 or later)
- perl 4.0 (NOTE: perl 5.003 or later recommended)
- uname
-
- Windows Platforms:
- -----------------
- gmake 3.74 (must use hacked Netscape version)
- shmsdos.exe (contained in Netscape gmake.exe)
- nsinstall.exe (contained in Netscape gmake.exe)
- perl.exe (version 4.0 for everything except testing;
- NOTE: MKS toolkit perl 5.002 is broken)
- perl5.exe (for testing;
- NOTE: perl 5.003 or later recommended;
- MKS toolkit perl 5.002 is broken)
- uname.exe (use nstools version)
-
-ENHANCEMENTS to "ns/coreconf":
-
- With the advent of Certificate Server 4.0 using the ns/coreconf
- build system, several changes had to be made to enhance
- ns/coreconf support for building Java/JNI classes/programs, as
- well as libraries slated to be released as binaries. While the
- following may not represent an exhaustive list of these changes,
- it does attempt to be at least somewhat comprehensive:
-
- (1) During the course of these enhancements, a total of
- four files have been modified, and four new files have
- been added.
-
- The following files have been modified:
-
- - command.mk: removed old definition of JAR
-
- - config.mk: added include statement of new
- "jdk.mk" file
-
- - ruleset.mk: allowed the $(MKPROG) variable to be
- overridden by supplying it with a
- default value of $(CC); augmented
- numerous definitions to enhance
- ability of ns/coreconf to produce
- a more robust set of libraries;
- added some JNI definitions; PACKAGE
- definition may be overridden by new
- "jdk.mk" file
-
- - rules.mk: separated the compile phase of a
- program from the link phase of a
- program such that a developer can
- now strictly override program linkage
- by simply supplying a $(MKPROG)
- variable; augmented NETLIBDEPTH
- to use CORE_DEPTH but retain backward
- compatibility; added JNI section;
- modified .PRECIOUS rule;
-
- The following files have been added:
-
- - README: this file; an ASCII-based text
- document used to summarize the
- ns/coreconf build system and
- suitable (paginated) for printing
-
- - jdk.mk: a file comprising most (if not all)
- of the default Java related build
- information; the definitions in this
- file are only included if NS_USE_JDK
- has been defined
-
- - jniregen.pl: a perl script used to create a
- dependency for when JNI files should
- be regenerated (based upon any change
- to the ".class" file from which the
- ".h" file was originally generated)
-
- - outofdate.pl: a perl script used to create a
- dependency for when ".class" files
- should be regenerated (based upon
- any change to the ".java" file
- from which the ".class" file was
- originally generated)
-
- (2) As stated above, the ns/coreconf build system now separates
- the link phase of a program from its compilation phase.
- While ns/coreconf still works exactly as it used to because
- the $(MKPROG) variable is assigned $(CC) by default, a developer
- may now override this behavior by simply supplying their
- own unique value for $(MKPROG) on every platform. This allows
- a program compiled with $(CC) to link with external libraries
- that may contain "C++" linkage. Before this change, a
- programmer would need to reference their own local copy of
- rules.mk (see the ns/sectools/cmd/pk12util program for
- an example of how this used to be accomplished).
-
- (3) Currently, the ns/coreconf build system differs from the
- NSPR 2.0 build system which utilizes an "_s" to denote
- static libraries from import libraries. In fact, the
- ns/coreconf build system adds no prefixes or suffixes to
- distinguish one version of static libraries from another.
- Note that both the ns/coreconf build system as well as the
- NSPR 2.0 build system do nothing to provide a method of
- distinguishing 16-bit from 32-bit static libraries on the
- same machine, either, since:
-
- a) this might only provide difficulty during
- development, since static libraries always
- need to be embedded within a program
- (note this is highly unlikely, since libraries
- for different platforms are subdivided via
- a well-known subdirectory structure, and
- a developer may use multiple trees for
- development),
-
- b) this maintains backwards compatibility,
- something very important since no legacy
- programs will need to change their link phase, and
-
- c) Netscape as a company has dropped any plans
- of future development of 16-bit products.
-
- (4) Since several members of the Hardcore Security group did
- not favor NSPR 2.0's solution of adding an "_s" to static
- libraries on Windows platforms as a method to distinguish
- them from their import library cousins, a different solution
- was proposed and has been recently implemented for ns/coreconf:
-
- - a 16 has been added as a suffix to both dynamic and
- import libraries built on 16-bit Windows platforms
-
- - a 32 has been added as a suffix to both dynamic and
- import libraries built on 32-bit Windows platforms
-
- Since, the HCL release process currently only contains a
- single instance of building a dynamic library,
- ns/security/lib/fortcrypt/fort12.dll, the impact of this
- change should be relatively small.
-
- It should be noted that although this would additionally
- limit the 8.3 namespace on 16-bit platforms, it is highly
- unlikely that any future development will be performed on
- this platform.
-
- (5) The $(LIBRARY_VERSION) tag has been added to all non-static
- libraries created on UNIX operating systems to alleviate
- any future confusion for binary releases which utilize this
- tag. Again, it should be noted that this tag is only
- utilized on non-static libraries, since more than one
- version of the library may need to exist simultaneously
- if multiple products are utilized.
-
- Currently, only one HCL released library utilizes this tag:
-
- ns/security/lib/fortcrypt/fort12.a
- (e. g. - in this library, the tag has been set to '12')
-
- Again, it should be noted that although this would
- additionally limit the 8.3 namespace on 16-bit platforms,
- it is highly unlikely that any future development will be
- performed on this platform.
-
- (6) The $(JDK_DEBUG_SUFFIX) extension has been added to all
- library and program names to support debug versions of
- Java programs (e. g. - java_g, javac_g, etc).
-
- Once again, it should be noted that although this would
- additionally limit the 8.3 namespace on 16-bit platforms,
- it is highly unlikely that any future Java development
- will be performed on this platform.
-
- (7) Most (if not all) default definitions for java have been
- encapsulated within their own file, jdk.mk, which is
- always included by default in ns/coreconf/config.mk.
- However, the definitions within this file are only ever
- activated if NS_USE_JDK has been set to be 1.
-
-
- (8) Two perl scripts (jniregen.pl and outofdate.pl) have been
- added to the system to foster a more robust development
- environment for composing Java and JNI programs
- utilizing the ns/coreconf build system. Both of these
- perl scripts are related to resolving dependencies which
- can not be accomplished through normal makefile dependencies.
-
- (9) This file, README, was created in an attempt to allow
- developers who have familiarity with ns/coreconf a simple
- roadmap for what has changed, as well as a top-level view of
- what comprises ns/coreconf. This file was written in
- ASCII (rather than HTML) primarily to promote simple
- paginated printing.
-
-OVERVIEW of "config.mk":
-
- This file contains the configuration information necessary to
- build each "Core Components" source module:
-
- include file name Purpose
- =================== =======================================
- arch.mk source and release <architecture> tags
-
- command.mk default command macros
- (NOTE: may be overridden in $(OS_CONFIG).mk)
-
- $(OS_CONFIG).mk <architecture>-specific macros
- (dependent upon <architecture> tags)
-
- platform.mk source and release <platform> tags
- (dependent upon <architecture> tags)
-
- tree.mk release <tree> tags
- (dependent upon <architecture> tags)
-
- module.mk source and release <component> tags
- (NOTE: A component is also called a module
- or a subsystem. This file is dependent upon
- $(MODULE) being defined on the command
- line, as an environment variable, or in
- individual makefiles, or more
- appropriately, manifest.mn)
-
- version.mk release <version> tags
- (dependent upon $(MODULE) being defined on
- the command line, as an environment variable,
- or in individual makefiles, or more
- appropriately, manifest.mn)
-
- location.mk macros to figure out binary code location
- (dependent upon <platform> tags)
-
- source.mk <component>-specific source path
- (dependent upon <user_source_tree>,
- <source_component>, <version>, and
- <platform> tags)
-
- headers.mk include switch for support header files
- (dependent upon <tree>, <component>, <version>,
- and <platform> tags)
-
- prefix.mk compute program prefixes
-
- suffix.mk compute program suffixes
- (dependent upon <architecture> tags)
-
- jdk.mk define JDK
- (dependent upon <architecture>,
- <source>, and <suffix> tags)
-
- ruleset.mk Master "Core Components" rule set
- (should always be the last file
- included by config.mk)
-
-
-
-OVERVIEW of "rules.mk":
-
- The "rules.mk" file consists of four sections. The first section
- contains the "master" build rules for all binary releases. While
- this section can (and should) largely be thought of as "language"
- independent, it does utilize the "perl" scripting language to
- perform both the "import" and "release" of binary modules.
-
- The rules which dwell in this section and their purpose:
-
-
- CATEGORY/rule:: Purpose
- =================== =======================================
-
- GENERAL
- -------
- all:: "default" all-encompassing rule which
- performs "export libs program install"
-
- export:: recursively copy specified
- cross-platform header files to the
- $(SOURCE_XPHEADERS_DIR) directory;
- recursively copy specified
- machine-dependent header files to the
- $(SOURCE_MDHEADERS_DIR) directory;
- although all rules can be written to
- repetively "chain" into other sections,
- this rule is the most commonly used
- rule to "chain" into other sections
- such as Java providing a simple
- mechanism which allows no need for
- developers to memorize specialized
- rules
-
- libs:: recursively build
- static (archival) $(LIBRARY), shared
- (dynamic link) $(SHARED_LIBRARY),
- import $(IMPORT_LIBRARY), and/or
- "purified" $(PURE_LIBRARY)
- libraries
-
- program:: recursively build $(PROGRAM)
- executable
-
- install:: recursively copy all libraries to
- $(SOURCE_LIB_DIR) directory;
- recursively copy all executables to
- $(SOURCE_BIN_DIR) directory
-
- clean:: remove all files specified in the
- $(ALL_TRASH) variable
-
- clobber:: synonym for "clean::" rule
-
- realclean:: remove all files specified by
- $(wildcard *.OBJ), dist, and in
- the $(ALL_TRASH) variable
-
- clobber_all:: synonym for "realclean::" rule
-
- private_export:: recursively copy specified
- cross-platform header files to the
- $(SOURCE_XPPRIVATE_DIR) directory
-
-
- IMPORT
- ------
- import:: uses perl script to retrieve specified
- VERSION of the binary release from
- $(RELEASE_TREE)
-
- RELEASE
- -------
- release_clean:: remove all files from the
- $(SOURCE_RELEASE_PREFIX) directory
-
- release:: place specified VERSION of the
- binary release in the appropriate
- $(RELEASE_TREE) directory
-
- release_export:: recursively copy specified
- cross-platform header files to the
- $(SOURCE_XPHEADERS_DIR)/include
- directory
-
- release_md:: recursively copy all libraries to
- $(SOURCE_RELEASE_PREFIX)/
- $(SOURCE_RELEASE_LIB_DIR) directory;
- recursively copy all executables to
- $(SOURCE_RELEASE_PREFIX)/
- $(SOURCE_RELEASE_BIN_DIR) directory
-
- release_jars:: use perl script to package appropriate
- files in the $(XPCLASS_JAR),
- $(XPHEADER_JAR), $(MDHEADER_JAR), and
- $(MDBINARY_JAR) jar files
-
- release_cpdistdir:: use perl script to copy the
- $(XPCLASS_JAR), $(XPHEADER_JAR),
- $(MDHEADER_JAR), and $(MDBINARY_JAR)
- jar files to the specified VERSION
- of the $(RELEASE_TREE) directory
-
-
-
- TOOLS and AUTOMATION
- --------------------
- platform:: tool used to display the platform name
- as composed within the "arch.mk" file
-
- autobuild:: automation rule used by "Bonsai" and
- "Tinderbox" to automatically generate
- binary releases on various platforms
-
- tests:: automation tool used to run the
- "regress" and "reporter" tools
- on various regression test suites
-
- The second section of "rules.mk" primarily contains several
- "language" dependent build rules for binary releases. These are
- generally "computed" rules (created on the "fly"), and include
- rules used by "C", "C++", assembly, the preprocessor, perl, and
- the shell.
-
- The rules which dwell in this section and their purpose:
-
-
- CATEGORY/rule:: Purpose
- =================== =============================
-
- LIBRARIES
- ---------
- $(LIBRARY): build the static library
- specified by the $(LIBRARY)
- variable
-
- $(IMPORT_LIBRARY): build the import library
- specified by the
- $(IMPORT_LIBRARY) variable
-
- $(SHARED_LIBRARY): build the shared
- (dynamic link) library
- specified by the
- $(SHARED_LIBRARY) variable
-
- $(PURE_LIBRARY): build the "purified" library
- specified by the
- $(PURE_LIBRARY) variable
-
-
- PROGRAMS
- --------
- $(PROGRAM): build the binary executable
- specified by the $(PROGRAM)
- rule
-
- $(OBJDIR)/
- $(PROG_PREFIX)%.pure: build the "purified" binary
- executable specified by this
- rule
-
-
- OBJECTS
- -------
- $(OBJDIR)/
- $(PROG_PREFIX)%$(OBJ_SUFFIX): build the object file
- associated with the
- makefile rule dependency:
-
- %.c = C file
- %.cpp = C++ file
- %.cc = C++ file
- %.s = assembly file
- %.S = assembly file
-
- $(OBJDIR)/
- $(PROG_PREFIX)%: (NOTE: deprecated rule)
- build the object file
- associated with the
- makefile rule dependency:
-
- %.cpp = C++ file
-
- MISCELLANEOUS
- -------------
- $(DIRS):: specifies a helper method
- used by $(LOOP_THROUGH_DIRS)
- to recursively change
- directories and invoke
- $(MAKE)
-
- %.i: build the preprocessor file
- associated with the
- makefile rule dependency:
-
- %.c = C file
- %.cpp = C++ file
-
- %: process the specified file
- using the method associated
- with the makefile rule
- dependency:
-
- %.pl = perl script
- %.sh = shell script
-
- alltags: tool used to recursively
- create a "ctags"-style
- file for reference
-
- The third section of "rules.mk' primarily contains several JAVA
- "language" build rules for binary releases. These are also
- generally "computed" rules (created on the "fly").
-
- The rules which dwell in this section and their purpose:
-
-
- CATEGORY/rule:: Purpose
- =================== =============================
- $(JAVA_DESTPATH):: create directory specified
- as the Java destination path
- for where classes are
- deposited
-
- $(JAVA_DESTPATH)/$(PACKAGE):: create directories specified
- within the $(PACKAGE)
- variable
-
- $(JMCSRCDIR):: create directory specified
- as the JMC destination path
-
- $(JRI_HEADER_CFILES): used to generate/regenerate
- JRI header files for "C"
-
- $(JRI_STUB_CFILES): used to generate/regenerate
- JRI stub files for "C"
-
- $(JNI_HEADERS): used to generate/regenerate
- JNI header files for "C"
-
- The fourth section of "rules.mk" primarily contains miscellaneous
- build rules for binary releases. Many of these rules are here to
- create new subdirectories, manage dependencies, and/or override
- standard gmake "Makefile" rules.
-
- The rules which dwell in this section and their purpose:
-
-
- CATEGORY/rule:: Purpose
- =================== =============================
-
- $(PUBLIC_EXPORT_DIR):: create directory used to
- house public "C" header files
-
- $(PRIVATE_EXPORT_DIR):: create directory used to
- house private "C" header
- files
-
- $(SOURCE_XP_DIR)/
- release/include:: create directory used to
- house "C" header files
- contained in a release
-
- $(MKDEPENDENCIES):: for UNIX systems, create
- a directory used to house
- dependencies and utilize
- the $(MKDEPEND) rule to
- create them
-
- $(MKDEPEND):: cd to the dependency
- directory and create them
-
- depend:: if $(OBJS) exist, perform the
- $(MKDEPEND) rule followed by
- the $(MKDEPENDENCIES) rule
-
- dependclean:: remove all files contained
- in the dependency repository
-
- .DEFAULT: standard gmake rule
-
- .SUFFIXES: standard gmake rule
-
- .PRECIOUS: standard gmake rule
-
- .PHONY: standard gmake rule
-
diff --git a/security/coreconf/ReliantUNIX.mk b/security/coreconf/ReliantUNIX.mk
deleted file mode 100644
index 476dcabc1..000000000
--- a/security/coreconf/ReliantUNIX.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# 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.
-#
-# Config stuff for ReliantUNIX
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-ifdef NS_USE_GCC
- ## gcc-2.7.2 homebrewn
- CC = gcc
- CCC = g++
- AS = $(CC)
- ASFLAGS += -x assembler-with-cpp
- LD = gld
- ODD_CFLAGS = -pipe -Wall -Wno-format
- ifdef BUILD_OPT
- OPTIMIZER += -O6
- endif
- MKSHLIB = $(LD)
- MKSHLIB += -G -h $(@:$(OBJDIR)/%.so=%.so)
- DSO_LDOPTS += -G -Xlinker -Blargedynsym
-else
- ## native compiler (CDS++ 1.0)
-# CC = /usr/bin/cc
- CC = cc
- CCC = /usr/bin/CC
- AS = /usr/bin/cc
- ODD_CFLAGS =
- ifdef BUILD_OPT
- OPTIMIZER += -O -F Olimit,4000
- endif
- MKSHLIB = $(CC)
- MKSHLIB += -G -h $(@:$(OBJDIR)/%.so=%.so)
- DSO_LDOPTS += -G -W l,-Blargedynsym
-endif
-
-NOSUCHFILE = /sni-rm-f-sucks
-ODD_CFLAGS += -DSVR4 -DSNI -DRELIANTUNIX
-CPU_ARCH = mips
-RANLIB = /bin/true
-
-# For purify
-NOMD_OS_CFLAGS += $(ODD_CFLAGS)
-
-# we do not have -MDupdate ...
-OS_CFLAGS += $(NOMD_OS_CFLAGS)
-OS_LIBS += -lsocket -lnsl -lresolv -lgen -ldl -lc /usr/ucblib/libucb.a
-HAVE_PURIFY = 0
-
-ifdef DSO_BACKEND
- DSO_LDOPTS += -h $(DSO_NAME)
-endif
diff --git a/security/coreconf/ReliantUNIX5.4.mk b/security/coreconf/ReliantUNIX5.4.mk
deleted file mode 100644
index a5bca60a3..000000000
--- a/security/coreconf/ReliantUNIX5.4.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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.
-#
-# Config stuff for ReliantUNIX5.4
-#
-include $(CORE_DEPTH)/coreconf/ReliantUNIX.mk
diff --git a/security/coreconf/SCOOS5.0.mk b/security/coreconf/SCOOS5.0.mk
deleted file mode 100644
index b3370a1fd..000000000
--- a/security/coreconf/SCOOS5.0.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SCO OpenServer 5.0 for x86.
-#
-
-include $(CORE_DEPTH)/coreconf/SCO_SV3.2.mk
diff --git a/security/coreconf/SCO_SV3.2.mk b/security/coreconf/SCO_SV3.2.mk
deleted file mode 100644
index e9d13b30c..000000000
--- a/security/coreconf/SCO_SV3.2.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SCO Unix for x86.
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-CC = cc
-OS_CFLAGS += -b elf -KPIC
-CCC = g++
-CCC += -b elf -DPRFSTREAMS_BROKEN -I/usr/local/lib/g++-include
-# CCC = $(CORE_DEPTH)/build/hcpp
-# CCC += +.cpp +w
-RANLIB = /bin/true
-
-#
-# -DSCO_PM - Policy Manager AKA: SCO Licensing
-# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
-# -Dsco - Needed for /usr/include/X11/*
-#
-OS_CFLAGS += -DSCO_SV -DSYSV -D_SVID3 -DHAVE_STRERROR -DSW_THREADS -DSCO_PM -DSCO -Dsco
-#OS_LIBS += -lpmapi -lsocket -lc
-MKSHLIB = $(LD)
-MKSHLIB += $(DSO_LDOPTS)
-XINC = /usr/include/X11
-MOTIFLIB += -lXm
-INCLUDES += -I$(XINC)
-CPU_ARCH = x86
-GFX_ARCH = x
-ARCH = sco
-LOCALE_MAP = $(CORE_DEPTH)/cmd/xfe/intl/sco.lm
-EN_LOCALE = C
-DE_LOCALE = de_DE.ISO8859-1
-FR_LOCALE = fr_FR.ISO8859-1
-JP_LOCALE = ja
-SJIS_LOCALE = ja_JP.SJIS
-KR_LOCALE = ko_KR.EUC
-CN_LOCALE = zh
-TW_LOCALE = zh
-I2_LOCALE = i2
-LOC_LIB_DIR = /usr/lib/X11
-NOSUCHFILE = /solaris-rm-f-sucks
-BSDECHO = /bin/echo
-
-#
-# These defines are for building unix plugins
-#
-BUILD_UNIX_PLUGINS = 1
-#DSO_LDOPTS += -b elf -G -z defs
-DSO_LDOPTS += -b elf -G
-DSO_LDFLAGS += -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen
-
-# Used for Java compiler
-EXPORT_FLAGS += -W l,-Bexport
diff --git a/security/coreconf/SunOS4.1.3_U1.mk b/security/coreconf/SunOS4.1.3_U1.mk
deleted file mode 100644
index 94be22508..000000000
--- a/security/coreconf/SunOS4.1.3_U1.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS4.1
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-INCLUDES += -I/usr/dt/include -I/usr/openwin/include -I/home/motif/usr/include
-
-# SunOS 4 _requires_ that shared libs have a version number.
-# XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
-DLL_SUFFIX = so.1.0
-CC = gcc
-RANLIB = ranlib
-CPU_ARCH = sparc
-
-# Purify doesn't like -MDupdate
-NOMD_OS_CFLAGS += -Wall -Wno-format -DSUNOS4
-OS_CFLAGS += $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
-MKSHLIB = $(LD)
-MKSHLIB += $(DSO_LDOPTS)
-HAVE_PURIFY = 1
-NOSUCHFILE = /solaris-rm-f-sucks
-DSO_LDOPTS =
-
-# -fPIC generates position-independent code for use in a shared library.
-DSO_CFLAGS += -fPIC
diff --git a/security/coreconf/SunOS5.3.mk b/security/coreconf/SunOS5.3.mk
deleted file mode 100644
index e103d9f57..000000000
--- a/security/coreconf/SunOS5.3.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.3
-#
-
-SOL_CFLAGS =
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
diff --git a/security/coreconf/SunOS5.4.mk b/security/coreconf/SunOS5.4.mk
deleted file mode 100644
index fe24c33e0..000000000
--- a/security/coreconf/SunOS5.4.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.4
-#
-
-SOL_CFLAGS =
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
diff --git a/security/coreconf/SunOS5.4_i86pc.mk b/security/coreconf/SunOS5.4_i86pc.mk
deleted file mode 100644
index bed9893ed..000000000
--- a/security/coreconf/SunOS5.4_i86pc.mk
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Solaris 2.4 on x86
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = cc
-
-ifdef NS_USE_GCC
- CC = gcc
- OS_CFLAGS += -Wall -Wno-format
- CCC = g++
- CCC += -Wall -Wno-format
- ASFLAGS += -x assembler-with-cpp
- ifdef NO_MDUPDATE
- OS_CFLAGS += $(NOMD_OS_CFLAGS)
- else
- OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
- endif
-else
- CC = cc
- CCC = CC
- ASFLAGS += -Wa,-P
- OS_CFLAGS += $(NOMD_OS_CFLAGS)
-endif
-
-CPU_ARCH = x86
-
-MKSHLIB = $(LD)
-MKSHLIB += $(DSO_LDOPTS)
-NOSUCHFILE = /solx86-rm-f-sucks
-RANLIB = echo
-
-# for purify
-NOMD_OS_CFLAGS += -DSVR4 -DSYSV -D_REENTRANT -DSOLARIS -D__svr4__ -Di386
-
-DSO_LDOPTS += -G
diff --git a/security/coreconf/SunOS5.5.1.mk b/security/coreconf/SunOS5.5.1.mk
deleted file mode 100644
index f85932b59..000000000
--- a/security/coreconf/SunOS5.5.1.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.5.1
-#
-
-SOL_CFLAGS += -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-ifeq ($(OS_RELEASE),5.5.1)
- OS_DEFINES += -DSOLARIS2_5
-endif
-
-OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
diff --git a/security/coreconf/SunOS5.5.1_i86pc.mk b/security/coreconf/SunOS5.5.1_i86pc.mk
deleted file mode 100644
index 978286856..000000000
--- a/security/coreconf/SunOS5.5.1_i86pc.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Solaris 2.5.1 on x86
-#
-
-SOL_CFLAGS = -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-CPU_ARCH = x86
-OS_DEFINES += -Di386
-
-ifeq ($(OS_RELEASE),5.5.1_i86pc)
- OS_DEFINES += -DSOLARIS2_5
-endif
diff --git a/security/coreconf/SunOS5.5.mk b/security/coreconf/SunOS5.5.mk
deleted file mode 100644
index e83356f15..000000000
--- a/security/coreconf/SunOS5.5.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.5
-#
-
-SOL_CFLAGS += -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-ifeq ($(OS_RELEASE),5.5)
- OS_DEFINES += -DSOLARIS2_5
-endif
diff --git a/security/coreconf/SunOS5.6.mk b/security/coreconf/SunOS5.6.mk
deleted file mode 100644
index 774d2b7a6..000000000
--- a/security/coreconf/SunOS5.6.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.6
-#
-
-SOL_CFLAGS += -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-ifeq ($(OS_RELEASE),5.6)
- OS_DEFINES += -DSOLARIS2_6
-endif
-
-OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
diff --git a/security/coreconf/SunOS5.6_i86pc.mk b/security/coreconf/SunOS5.6_i86pc.mk
deleted file mode 100644
index 286ff3505..000000000
--- a/security/coreconf/SunOS5.6_i86pc.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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.
-#
-# Config stuff for Solaris 2.6 on x86
-#
-
-SOL_CFLAGS = -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-CPU_ARCH = x86
-OS_DEFINES += -Di386
-
-ifeq ($(OS_RELEASE),5.6_i86pc)
- OS_DEFINES += -DSOLARIS2_6
-endif
diff --git a/security/coreconf/SunOS5.7.mk b/security/coreconf/SunOS5.7.mk
deleted file mode 100644
index dd676e2a9..000000000
--- a/security/coreconf/SunOS5.7.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.7
-#
-
-SOL_CFLAGS += -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-ifeq ($(OS_RELEASE),5.7)
- OS_DEFINES += -DSOLARIS2_7
-endif
-
-OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
diff --git a/security/coreconf/SunOS5.8.mk b/security/coreconf/SunOS5.8.mk
deleted file mode 100644
index 95fc01090..000000000
--- a/security/coreconf/SunOS5.8.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.8
-#
-
-SOL_CFLAGS += -D_SVID_GETTOD
-
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
-
-ifeq ($(OS_RELEASE),5.8)
- OS_DEFINES += -DSOLARIS2_8
-endif
-
-OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
diff --git a/security/coreconf/SunOS5.mk b/security/coreconf/SunOS5.mk
deleted file mode 100644
index 388679d1c..000000000
--- a/security/coreconf/SunOS5.mk
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# 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.
-#
-# Config stuff for SunOS5.x
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-ifeq ($(USE_64), 1)
- ARCHFLAG=-xarch=v9
- LD=/usr/ccs/bin/ld
-else
- ARCHFLAG=-xarch=v8
-endif
-
-#
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
- LOCAL_THREADS_ONLY = 1
- ifndef NS_USE_NATIVE
- NS_USE_GCC = 1
- endif
-endif
-
-#
-# The default implementation strategy for Solaris is classic nspr.
-#
-ifeq ($(USE_PTHREADS),1)
- IMPL_STRATEGY = _PTH
-else
- ifeq ($(LOCAL_THREADS_ONLY),1)
- IMPL_STRATEGY = _LOCAL
- DEFINES += -D_PR_LOCAL_THREADS_ONLY
- else
- DEFINES += -D_PR_GLOBAL_THREADS_ONLY
- endif
-endif
-
-#
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
- IMPL_STRATEGY =
-endif
-
-DEFAULT_COMPILER = cc
-
-ifdef NS_USE_GCC
- CC = gcc
- OS_CFLAGS += -Wall -Wno-format
- CCC = g++
- CCC += -Wall -Wno-format
- ASFLAGS += -x assembler-with-cpp
- ifdef NO_MDUPDATE
- OS_CFLAGS += $(NOMD_OS_CFLAGS)
- else
- OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
- endif
-else
- CC = cc
- CCC = CC
- ASFLAGS += -Wa,-P
- OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
- ifndef BUILD_OPT
- OS_CFLAGS += -xs
-# else
-# OPTIMIZER += -fast
- endif
-
-endif
-
-INCLUDES += -I/usr/dt/include -I/usr/openwin/include
-
-RANLIB = echo
-CPU_ARCH = sparc
-OS_DEFINES += -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS
-
-ifneq ($(LOCAL_THREADS_ONLY),1)
- OS_DEFINES += -D_REENTRANT
-endif
-
-# Purify doesn't like -MDupdate
-NOMD_OS_CFLAGS += $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
-
-MKSHLIB = $(LD)
-MKSHLIB += $(DSO_LDOPTS)
-
-# ld options:
-# -G: produce a shared object
-# -z defs: no unresolved symbols allowed
-DSO_LDOPTS += -G
-
-# -KPIC generates position independent code for use in shared libraries.
-# (Similarly for -fPIC in case of gcc.)
-ifdef NS_USE_GCC
- DSO_CFLAGS += -fPIC
-else
- DSO_CFLAGS += -KPIC
-endif
-
-HAVE_PURIFY = 1
-NOSUCHFILE = /solaris-rm-f-sucks
-
diff --git a/security/coreconf/UNIX.mk b/security/coreconf/UNIX.mk
deleted file mode 100644
index cbeac85fd..000000000
--- a/security/coreconf/UNIX.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# 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.
-#
-
-XP_DEFINE += -DXP_UNIX
-LIB_SUFFIX = a
-DLL_SUFFIX = so
-AR = ar
-AR += cr $@
-LDOPTS += -L$(SOURCE_LIB_DIR)
-
-ifdef BUILD_OPT
- OPTIMIZER += -O
- DEFINES += -UDEBUG -DNDEBUG
-else
- OPTIMIZER += -g
- DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
-endif
-
-NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
-NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
-
-MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
-MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
-MKDEPENDENCIES = $(OBJDIR_NAME)/depend.mk
-
-####################################################################
-#
-# One can define the makefile variable NSDISTMODE to control
-# how files are published to the 'dist' directory. If not
-# defined, the default is "install using relative symbolic
-# links". The two possible values are "copy", which copies files
-# but preserves source mtime, and "absolute_symlink", which
-# installs using absolute symbolic links. The "absolute_symlink"
-# option requires NFSPWD.
-# - THIS IS NOT PART OF THE NEW BINARY RELEASE PLAN for 9/30/97
-# - WE'RE KEEPING IT ONLY FOR BACKWARDS COMPATIBILITY
-####################################################################
-
-ifeq ($(NSDISTMODE),copy)
- # copy files, but preserve source mtime
- INSTALL = $(NSINSTALL)
- INSTALL += -t
-else
- ifeq ($(NSDISTMODE),absolute_symlink)
- # install using absolute symbolic links
- INSTALL = $(NSINSTALL)
- INSTALL += -L `$(NFSPWD)`
- else
- # install using relative symbolic links
- INSTALL = $(NSINSTALL)
- INSTALL += -R
- endif
-endif
-
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
-endef
diff --git a/security/coreconf/UNIXWARE2.1.mk b/security/coreconf/UNIXWARE2.1.mk
deleted file mode 100644
index b9bd69900..000000000
--- a/security/coreconf/UNIXWARE2.1.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# 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.
-#
-
-#
-# Config stuff for SCO Unixware 2.1
-#
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc
-
-CC = $(CORE_DEPTH)/build/hcc
-CCC = $(CORE_DEPTH)/build/hcpp
-RANLIB = true
-OS_CFLAGS = -KPIC -DSVR4 -DSYSV -DUNIXWARE
-MKSHLIB = $(LD)
-MKSHLIB += $(DSO_LDOPTS)
-DSO_LDOPTS += -G
-CPU_ARCH = x86
-ARCH = sco
-NOSUCHFILE = /solaris-rm-f-sucks
diff --git a/security/coreconf/WIN16.mk b/security/coreconf/WIN16.mk
deleted file mode 100644
index 68832d21c..000000000
--- a/security/coreconf/WIN16.mk
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# 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.
-#
-
-#
-# win16_3.11.mk -- Make configuration for Win16
-#
-# This file configures gmake to build the Win16 variant of
-# NSPR 2.0. This file has the function of two files commonly
-# used on other platforms, for example: winnt.mk and
-# winnt4.0.mk. ... The packaging is easier and there is only
-# one variant of the Win16 target.
-#
-# Win16 is built using the Watcom C/C++ version 11.0
-# compiler. You gotta set up the compiler first.
-# The Watcom compiler depends on a few environment
-# variables; these environment variables define where the
-# compiler components are installed; they must be set before
-# running the make.
-#
-# Notes:
-# OS_CFLAGS is the command line options for the compiler when
-# building the .DLL object files.
-# OS_EXE_CFLAGS is the command line options for the compiler
-# when building the .EXE object files; this is for the test
-# programs.
-# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the
-# makefile for the pr/tests directory. ... Hack.
-#
-#
-#
-#
-
-# -- configuration -----------------------------------------
-
-DEFAULT_COMPILER = wcc
-
-CC = wcc
-CCC = wcl
-LINK = wlink
-AR = wlib
-AR += -q $@
-RC = wrc.exe
-RC += /r /dWIN16=1 /bt=windows
-RANLIB = echo
-BSDECHO = echo
-NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
-NSINSTALL = nsinstall
-INSTALL = $(NSINSTALL)
-MAKE_OBJDIR = mkdir
-MAKE_OBJDIR += $(OBJDIR)
-XP_DEFINE += -DXP_PC
-LIB_SUFFIX = lib
-DLL_SUFFIX = dll
-
-ifdef BUILD_OPT
- OPTIMIZER = -oneatx -oh -oi -ei -3 -fpi87 -fp3
-else
- OPTIMIZER += -d2 -hc -DDEBUG
-# OPTIMIZER += -d2 -hw -DDEBUG
-# LDFLAGS += -DEBUG -DEBUGTYPE:CV
-endif
-
-#
-# $(CPU_ARCH) has been commented out so that its contents
-# are not added to the WIN16_?.OBJ names thus expanding
-# them beyond the 8.3 character limit for this platform.
-#
-#CPU_ARCH = x386
-#
-# added "-s" to avoid dependency on watcom's libs (e.g. on _STK)
-# added "-zt3" for compatibility with MSVC's "/Gt3" option
-#
-OS_CFLAGS += -ml -3 -bd -zc -zu -bt=windows -s -zt3 -d_X86_ -dWIN16 -d_WINDLL
-#OS_EXE_CFLAGS += -ml -3 -bt=windows -d_X86_ -dWIN16
-OS_LIB_FLAGS = -c -iro
-
-# Name of the binary code directories
-OS_DLL_OPTION = CASEEXACT
-OS_DLLFLAGS =
-OS_LIBS =
-W16_EXPORTS = #
-
-#
-# The following is NOT needed for the NSPR 2.0 library.
-#
-
-OS_CFLAGS += -d_WINDOWS -d_MSC_VER=700
diff --git a/security/coreconf/WIN32.mk b/security/coreconf/WIN32.mk
deleted file mode 100644
index 61563e49a..000000000
--- a/security/coreconf/WIN32.mk
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# 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 NT
-# and Windows 95
-#
-
-DEFAULT_COMPILER = cl
-
-CC = cl
-CCC = cl
-LINK = link
-AR = lib
-AR += -NOLOGO -OUT:"$@"
-RANLIB = echo
-BSDECHO = echo
-
-NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
-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
-
-#
-# 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)
-
diff --git a/security/coreconf/WIN954.0.mk b/security/coreconf/WIN954.0.mk
deleted file mode 100644
index 68b3b7e4f..000000000
--- a/security/coreconf/WIN954.0.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# 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.
-#
-
-#
-# Config stuff for WIN95
-#
-# This makefile defines the following variables:
-# CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
-# PROCESSOR is an internal variable.
-
-include $(CORE_DEPTH)/coreconf/WIN32.mk
-
-PROCESSOR := $(shell uname -p)
-ifeq ($(PROCESSOR), I386)
- CPU_ARCH = x386
- OS_CFLAGS += -W3 -nologo -D_X86_
-else
- ifeq ($(PROCESSOR), MIPS)
- CPU_ARCH = MIPS
- #OS_CFLAGS += -W3 -nologo -D_MIPS_
- OS_CFLAGS += -W3 -nologo
- else
- ifeq ($(PROCESSOR), ALPHA)
- CPU_ARCH = ALPHA
- OS_CFLAGS += -W3 -nologo -D_ALPHA_=1
- else
- CPU_ARCH = processor_is_undefined
- endif
- endif
-endif
-
-OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
-DEFINES += -DWIN95
diff --git a/security/coreconf/WINNT3.51.mk b/security/coreconf/WINNT3.51.mk
deleted file mode 100644
index 606e7a3b1..000000000
--- a/security/coreconf/WINNT3.51.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# 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.
-#
-
-#
-# Config stuff for WINNT 3.51
-#
-# This makefile defines the following variables:
-# CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
-# It has the following internal variables:
-# OS_PROC_CFLAGS and OS_WIN_CFLAGS.
-
-include $(CORE_DEPTH)/coreconf/WIN32.mk
-
-PROCESSOR := $(shell uname -p)
-ifeq ($(PROCESSOR), I386)
- CPU_ARCH = x386
- OS_PROC_CFLAGS += -D_X86_
-else
- ifeq ($(PROCESSOR), MIPS)
- CPU_ARCH = MIPS
- OS_PROC_CFLAGS += -D_MIPS_
- else
- ifeq ($(PROCESSOR), ALPHA)
- CPU_ARCH = ALPHA
- OS_PROC_CFLAGS += -D_ALPHA_
- else
- CPU_ARCH = processor_is_undefined
- endif
- endif
-endif
-
-OS_WIN_CFLAGS += -W3
-OS_CFLAGS += -nologo $(OS_WIN_CFLAGS) $(OS_PROC_CFLAGS)
-#OS_DLLFLAGS += -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS
-OS_DLLFLAGS += -nologo -DLL -PDB:NONE -SUBSYSTEM:WINDOWS
-#
-# Win NT needs -GT so that fibers can work
-#
-OS_CFLAGS += -GT
-OS_CFLAGS += -DWINNT
diff --git a/security/coreconf/WINNT4.0.mk b/security/coreconf/WINNT4.0.mk
deleted file mode 100644
index 204b790a8..000000000
--- a/security/coreconf/WINNT4.0.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# 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.
-#
-
-#
-# Config stuff for WINNT 4.0
-#
-# This makefile defines the following variables:
-# CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
-# PROCESSOR is an internal variable.
-
-include $(CORE_DEPTH)/coreconf/WIN32.mk
-
-PROCESSOR := $(shell uname -p)
-ifeq ($(PROCESSOR), I386)
- CPU_ARCH = x386
- OS_CFLAGS += -W3 -nologo -D_X86_
-else
- ifeq ($(PROCESSOR), MIPS)
- CPU_ARCH = MIPS
- #OS_CFLAGS += -W3 -nologo -D_MIPS_
- OS_CFLAGS += -W3 -nologo
- else
- ifeq ($(PROCESSOR), ALPHA)
- CPU_ARCH = ALPHA
- OS_CFLAGS += -W3 -nologo -D_ALPHA_=1
- else
- CPU_ARCH = processor_is_undefined
- endif
- endif
-endif
-
-OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
-#
-# Win NT needs -GT so that fibers can work
-#
-OS_CFLAGS += -GT
-OS_CFLAGS += -DWINNT
-
-NSPR31_LIB_PREFIX = lib
diff --git a/security/coreconf/arch.mk b/security/coreconf/arch.mk
deleted file mode 100644
index 691acb856..000000000
--- a/security/coreconf/arch.mk
+++ /dev/null
@@ -1,292 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" macros for getting the OS architecture #
-#######################################################################
-
-#
-# Macros for getting the OS architecture
-#
-
-ifeq ($(USE_64), 1)
- 64BIT_TAG=_64
-else
- 64BIT_TAG=
-endif
-
-OS_ARCH := $(subst /,_,$(shell uname -s))
-
-#
-# Attempt to differentiate between sparc and x86 Solaris
-#
-
-OS_TEST := $(shell uname -m)
-ifeq ($(OS_TEST),i86pc)
- OS_RELEASE := $(shell uname -r)_$(OS_TEST)
-else
- OS_RELEASE := $(shell uname -r)
-endif
-
-#
-# Force the IRIX64 machines to use IRIX.
-#
-
-ifeq ($(OS_ARCH),IRIX64)
- OS_ARCH = IRIX
-endif
-
-#
-# Force the newer BSDI versions to use the old arch name.
-#
-
-ifeq ($(OS_ARCH),BSD_OS)
- OS_ARCH = BSD_386
-endif
-
-#
-# Catch Deterim if SVR4 is NCR or UNIXWARE
-#
-
-ifeq ($(OS_ARCH),UNIX_SV)
- ifneq ($(findstring NCR, $(shell grep NCR /etc/bcheckrc | head -1 )),)
- OS_ARCH = NCR
- else
- # Make UnixWare something human readable
- OS_ARCH = UNIXWARE
- endif
-
- # Get the OS release number, not 4.2
- OS_RELEASE := $(shell uname -v)
-endif
-
-ifeq ($(OS_ARCH),UNIX_System_V)
- OS_ARCH = NEC
-endif
-
-ifeq ($(OS_ARCH),AIX)
- OS_RELEASE := $(shell uname -v).$(shell uname -r)
-endif
-
-#
-# Distinguish between OSF1 V4.0B and V4.0D
-#
-
-ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0)
- OS_VERSION := $(shell uname -v)
- ifeq ($(OS_VERSION),564)
- OS_RELEASE := V4.0B
- endif
- ifeq ($(OS_VERSION),878)
- OS_RELEASE := V4.0D
- endif
-endif
-
-#
-# SINIX changes name to ReliantUNIX with 5.43
-#
-
-ifeq ($(OS_ARCH),ReliantUNIX-N)
- OS_ARCH = ReliantUNIX
- OS_RELEASE = 5.4
-endif
-
-ifeq ($(OS_ARCH),SINIX-N)
- OS_ARCH = ReliantUNIX
- OS_RELEASE = 5.4
-endif
-
-#
-# Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3
-#
-
-ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
-OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
-endif
-
-ifeq ($(OS_ARCH),Linux)
- OS_RELEASE := $(basename $(OS_RELEASE))
-endif
-
-#######################################################################
-# Master "Core Components" macros for getting the OS target #
-#######################################################################
-
-#
-# Note: OS_TARGET should be specified on the command line for gmake.
-# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
-# The difference between the Win95 target and the WinNT target is that
-# the WinNT target uses Windows NT specific features not available
-# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
-# at lesser performance (the Win95 target uses threads; the WinNT target
-# uses fibers).
-#
-# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
-# is built. See: win16_3.11.mk for lots more about the Win16 target.
-#
-# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
-# cross-compilation.
-#
-
-#
-# The following hack allows one to build on a WIN95 machine (as if
-# s/he were cross-compiling on a WINNT host for a WIN95 target).
-# It also accomodates for MKS's uname.exe. If you never intend
-# to do development on a WIN95 machine, you don't need this. It doesn't
-# work any more anyway.
-#
-ifeq ($(OS_ARCH),WIN95)
- OS_ARCH = WINNT
- OS_TARGET = WIN95
-endif
-ifeq ($(OS_ARCH),Windows_95)
- OS_ARCH = Windows_NT
- OS_TARGET = WIN95
-endif
-
-#
-# On WIN32, we also define the variable CPU_ARCH.
-#
-
-ifeq ($(OS_ARCH), WINNT)
- CPU_ARCH := $(shell uname -p)
- ifeq ($(CPU_ARCH),I386)
- CPU_ARCH = x386
- endif
-else
-#
-# If uname -s returns "Windows_NT", we assume that we are using
-# the uname.exe in MKS toolkit.
-#
-# The -r option of MKS uname only returns the major version number.
-# So we need to use its -v option to get the minor version number.
-# Moreover, it doesn't have the -p option, so we need to use uname -m.
-#
-ifeq ($(OS_ARCH), Windows_NT)
- OS_ARCH = WINNT
- OS_MINOR_RELEASE := $(shell uname -v)
- ifeq ($(OS_MINOR_RELEASE),00)
- OS_MINOR_RELEASE = 0
- endif
- OS_RELEASE = $(OS_RELEASE).$(OS_MINOR_RELEASE)
- CPU_ARCH := $(shell uname -m)
- #
- # MKS's uname -m returns "586" on a Pentium machine.
- #
- ifneq (,$(findstring 86,$(CPU_ARCH)))
- CPU_ARCH = x386
- endif
-endif
-endif
-
-ifndef OS_TARGET
- OS_TARGET = $(OS_ARCH)
-endif
-
-ifeq ($(OS_TARGET), WIN95)
- OS_RELEASE = 4.0
-endif
-
-ifeq ($(OS_TARGET), WIN16)
- OS_RELEASE =
-# OS_RELEASE = _3.11
-endif
-
-#
-# This variable is used to get OS_CONFIG.mk.
-#
-
-OS_CONFIG = $(OS_TARGET)$(OS_RELEASE)
-
-#
-# OBJDIR_TAG depends on the predefined variable BUILD_OPT,
-# to distinguish between debug and release builds.
-#
-
-ifdef BUILD_OPT
- ifeq ($(OS_TARGET),WIN16)
- OBJDIR_TAG = _O
- else
- OBJDIR_TAG = $(64BIT_TAG)_OPT
- endif
-else
- ifdef BUILD_IDG
- ifeq ($(OS_TARGET),WIN16)
- OBJDIR_TAG = _I
- else
- OBJDIR_TAG = $(64BIT_TAG)_IDG
- endif
- else
- ifeq ($(OS_TARGET),WIN16)
- OBJDIR_TAG = _D
- else
- OBJDIR_TAG = $(64BIT_TAG)_DBG
- endif
- endif
-endif
-
-#
-# The following flags are defined in the individual $(OS_CONFIG).mk
-# files.
-#
-# CPU_TAG is defined if the CPU is not the most common CPU.
-# COMPILER_TAG is defined if the compiler is not the native compiler.
-# IMPL_STRATEGY may be defined too.
-#
-
-# Name of the binary code directories
-ifeq ($(OS_ARCH), WINNT)
- ifeq ($(CPU_ARCH),x386)
- OBJDIR_NAME = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
- else
- OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH)$(OBJDIR_TAG).OBJ
- endif
-else
-endif
-
-OBJDIR_NAME = $(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
-
-ifeq ($(OS_ARCH), WINNT)
-ifneq ($(OS_TARGET),WIN16)
-ifndef BUILD_OPT
-#
-# Define USE_DEBUG_RTL if you want to use the debug runtime library
-# (RTL) in the debug build
-#
-ifdef USE_DEBUG_RTL
- OBJDIR_NAME = $(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJD
-endif
-endif
-endif
-endif
-
diff --git a/security/coreconf/command.mk b/security/coreconf/command.mk
deleted file mode 100644
index 488161461..000000000
--- a/security/coreconf/command.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" default command macros; #
-# can be overridden in <arch>.mk #
-#######################################################################
-
-AS = $(CC)
-ASFLAGS += $(CFLAGS)
-CCF = $(CC) $(CFLAGS)
-PURIFY = purify $(PURIFYOPTIONS)
-LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
-LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS)
-NFSPWD = $(NSINSTALL_DIR)/nfspwd
-CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
- $(XCFLAGS)
-RANLIB = echo
-TAR = /bin/tar
-#
-# For purify
-#
-NOMD_CFLAGS += $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
- $(XCFLAGS)
-
diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk
deleted file mode 100644
index 20a7dc126..000000000
--- a/security/coreconf/config.mk
+++ /dev/null
@@ -1,142 +0,0 @@
-#
-# 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 information for building in the "Core Components" source module
-#
-
-#######################################################################
-# [1.0] Master "Core Components" source and release <architecture> #
-# tags #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/arch.mk
-
-#######################################################################
-# [2.0] Master "Core Components" default command macros #
-# (NOTE: may be overridden in $(OS_CONFIG).mk) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/command.mk
-
-#######################################################################
-# [3.0] Master "Core Components" <architecture>-specific macros #
-# (dependent upon <architecture> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk
-
-#######################################################################
-# [4.0] Master "Core Components" source and release <platform> tags #
-# (dependent upon <architecture> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/platform.mk
-
-#######################################################################
-# [5.0] Master "Core Components" release <tree> tags #
-# (dependent upon <architecture> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/tree.mk
-
-#######################################################################
-# [6.0] Master "Core Components" source and release <component> tags #
-# NOTE: A component is also called a module or a subsystem. #
-# (dependent upon $(MODULE) being defined on the #
-# command line, as an environment variable, or in individual #
-# makefiles, or more appropriately, manifest.mn) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/module.mk
-
-#######################################################################
-# [7.0] Master "Core Components" release <version> tags #
-# (dependent upon $(MODULE) being defined on the #
-# command line, as an environment variable, or in individual #
-# makefiles, or more appropriately, manifest.mn) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/version.mk
-
-#######################################################################
-# [8.0] Master "Core Components" macros to figure out #
-# binary code location #
-# (dependent upon <platform> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/location.mk
-
-#######################################################################
-# [9.0] Master "Core Components" <component>-specific source path #
-# (dependent upon <user_source_tree>, <source_component>, #
-# <version>, and <platform> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/source.mk
-
-#######################################################################
-# [10.0] Master "Core Components" include switch for support header #
-# files #
-# (dependent upon <tree>, <component>, <version>, #
-# and <platform> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/headers.mk
-
-#######################################################################
-# [11.0] Master "Core Components" for computing program prefixes #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/prefix.mk
-
-#######################################################################
-# [12.0] Master "Core Components" for computing program suffixes #
-# (dependent upon <architecture> tags) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/suffix.mk
-
-#######################################################################
-# [13.0] Master "Core Components" for defining JDK #
-# (dependent upon <architecture>, <source>, and <suffix> tags)#
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/jdk.mk
-
-#######################################################################
-# [14.0] Master "Core Components" rule set #
-# (should always be the last file included by config.mk) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/ruleset.mk
--include $(MKDEPENDENCIES)
-
diff --git a/security/coreconf/coreconf.pl b/security/coreconf/coreconf.pl
deleted file mode 100644
index 8471b0ead..000000000
--- a/security/coreconf/coreconf.pl
+++ /dev/null
@@ -1,156 +0,0 @@
-#
-# 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.
-#
-sub recursive_copy {
- local($fromdir);
- local($todir);
- local(@dirlist);
- $fromdir = shift;
- $todir = shift;
-
- print STDERR "recursive copy called with $fromdir, $todir\n";
-
-#remove any trailing slashes.
- $fromdir =~ s/\/$//;
- $todir =~ s/\/$//;
-
- opendir(DIR, $fromdir);
- @dirlist = readdir DIR;
- close DIR;
-
-
- foreach $file (@dirlist) {
- if (! (($file eq "." ) || ($file eq "..") )) {
-
- if (-d "$fromdir/$file") {
- print STDERR "handling directory $todir/$file\n";
- &rec_mkdir("$todir/$file");
- &recursive_copy("$fromdir/$file","$todir/$file");
- }
- else {
- print STDERR "handling file $fromdir/$file\n";
- &my_copy("$fromdir/$file","$todir/$file");
- }
- }
- }
-}
-
-sub parse_argv {
-
-# print STDERR "Parsing Variables\n";
-
- foreach $q ( @ARGV ) {
- if (! ($q =~ /=/)) {
- $var{$lastassigned} .= " $q";
- }
- else {
- $q =~ /^([^=]*)=(.*)/;
- $left = $1;
- $right = $2;
-
- $right =~ s/ *$//;
- $var{$left} = $right;
-
- $lastassigned = $left;
-
- }
- print STDERR "Assigned $lastassigned = $var{$lastassigned}\n";
- }
-}
-
-
-# usage: &my_copy("dir/fromfile","dir2/tofile");
-# do a 'copy' - files only, 'to' MUST be a filename, not a directory.
-
-# fix this to be able to use copy on win nt.
-
-sub my_copy {
- local($from);
- local($to);
- local($cpcmd);
-
- $from = shift;
- $to = shift;
-
- if ( ! defined $var{OS_ARCH}) {
- die "OS_ARCH not defined!";
- }
- else {
- if ($var{OS_ARCH} eq 'WINNT') {
- $cpcmd = 'cp';
- }
- else {
- $cpcmd = 'cp';
- }
- print STDERR "COPYING: $cpcmd $from $to\n";
- system("$cpcmd $from $to");
- }
-}
-
-
-sub old_my_copy {
- local($from);
- local($to);
-
- $from = shift;
- $to = shift;
- open(FIN, "<$from") || die("Can't read from file $from\n");
- if ( ! open(FOUT,">$to")) {
- close FIN;
- die "Can't write to file $to\n";
- }
- while (read(FIN, $buf, 100000)) {
- print FOUT $buf;
- }
- close (FIN);
- close (FOUT);
-}
-
-sub rec_mkdir {
- local($arg);
- local($t);
- local($q);
-
- $arg = shift;
- $t = "";
- foreach $q (split(/\//,$arg)) {
- $t .= $q;
- if (! ($t =~ /\.\.$/)) {
- if ($t =~ /./) {
- mkdir($t,0775);
- }
- }
- $t.= '/';
- }
-}
-
-1;
diff --git a/security/coreconf/cpdist.pl b/security/coreconf/cpdist.pl
deleted file mode 100755
index cea077990..000000000
--- a/security/coreconf/cpdist.pl
+++ /dev/null
@@ -1,195 +0,0 @@
-#! /usr/local/bin/perl
-#
-# 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.
-#
-require('coreconf.pl');
-
-#######-- read in variables on command line into %var
-
-&parse_argv;
-
-### do the copy
-
-print STDERR "RELEASE TREE / MODULE = $var{RELEASE_TREE} $var{MODULE}\n";
-
-
-
-# 1
-if ($var{RELEASE} eq "") { exit; } # Can't do release here, so exit.
-
-# 2
-#if (! ($var{RELEASE} =~ /\//)) { # if no specific version is specified in RELEASE variable
-# $component = $var{RELEASE};
-#}
-#else { # if a subcomponent/version is given in the RELEASE variable
-# $var{RELEASE} =~ m|^([^/]*)/|;
-# $component = $1; # everything before the first slash;
-# }
-
-# 3
-$path = $var{RELEASE};
-
-
-# 4
-# find out what directory we would create for 'today'
-
-$year = (localtime)[5] + 1900;
-$month = (localtime)[4] + 1;
-$day = (localtime)[3];
-$today = sprintf( "%d%02d%02d", $year, $month, $day );
-
-# 5
-# if version is null, then set the version to today.
-if ($var{"RELEASE_VERSION"} eq "") {
- $var{"RELEASE_VERSION"} = $today;
-}
-
-#6
-$version = $var{"RELEASE_VERSION"}; # set RELEASE_VERSION to passed in variable
-
-#7
-# if version is today, then we will want to make a 'current' link.
-
-if ($version eq $today) {
- $create_current = 1;
-}
-
-#8
-# version can be a) passed in value from command line, b) value in manifest.mn
-# or c) computed value such as '19970909'
-
-
-$dir = "$var{'RELEASE_TREE'}/$path";
-
-#9
-if (! (-e "$dir/$version" && -d "$dir/$version")) {
- print "making dir $dir \n";
- &rec_mkdir("$dir/$version");
-}
-
-
-
-print "version = $version\n";
-print "path = $path\n";
-print "var{release_tree} = $var{'RELEASE_TREE'}\n";
-print "dir = $dir = RELEASE_TREE/path\n";
-
-
-#10
-if ($create_current == 1) {
-
-# unlinking and linking always occurs, even if the link is correct
- print "unlinking $dir/current\n";
- unlink("$dir/current");
-
- print "putting version number $today into 'current' file..";
-
- open(FILE,">$dir/current") || die " couldn't open current\n";
- print FILE "$today\n";
- close(FILE);
- print " ..done\n"
-
-}
-
-&rec_mkdir("$dir/$version/$var{'RELEASE_MD_DIR'}");
-&rec_mkdir("$dir/$version/$var{'RELEASE_XP_DIR'}");
-
-
-
-
-foreach $jarfile (split(/ /,$var{FILES}) ) {
- print STDERR "---------------------------------------------\n";
-
- $jarinfo = $var{$jarfile};
-
- ($jardir,$jaropts) = split(/\|/,$jarinfo);
-
- if ($jaropts =~ /f/) {
- print STDERR "Copying files $jardir....\n";
- }
- else {
- print STDERR "Copying jar file $jarfile....\n";
- }
-
- print "jaropts = $jaropts\n";
-
- if ($jaropts =~ /m/) {
- $destdir = $var{"RELEASE_MD_DIR"};
- print "found m, using MD dir $destdir\n";
- }
- elsif ($jaropts =~ /x/) {
- $destdir = $var{"RELEASE_XP_DIR"};
- print "found x, using XP dir $destdir\n";
- }
- else {
- die "Error: must specify m or x in jar options in $jarinfo line\n";
- }
-
-
- $distdir = "$dir/$version/$destdir";
-
-
-
- if ($jaropts =~ /f/) {
-
- print "splitting: \"$jardir\"\n";
- for $srcfile (split(/ /,$jardir)) {
-
-#if srcfile has a slash
- if ($srcfile =~ m|/|) {
-#pull out everything before the last slash into $1
- $srcfile =~ m|(.*)/|;
- $distsubdir = "/$1";
- print "making dir $distdir$distsubdir\n";
- &rec_mkdir("$distdir$distsubdir");
- }
- print "copy: from $srcfile\n";
- print " to $distdir$distsubdir\n";
- $srcprefix = "";
- if ($jaropts =~/m/) {
- $srcprefix = "$var{'PLATFORM'}/";
- }
- system("cp $srcprefix$srcfile $distdir$distsubdir");
- }
- }
- else {
- $srcfile = "$var{SOURCE_RELEASE_PREFIX}/$jardir/$jarfile";
-
- print "copy: from $srcfile\n";
- print " to $distdir\n";
-
- system("cp $srcfile $distdir");
-
- }
-
- }
-
diff --git a/security/coreconf/headers.mk b/security/coreconf/headers.mk
deleted file mode 100644
index f09d5f6ee..000000000
--- a/security/coreconf/headers.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" include switch for support header files #
-#######################################################################
-
-#
-# Always append source-side machine-dependent (md) and cross-platform
-# (xp) include paths
-#
-
-INCLUDES += -I$(SOURCE_MDHEADERS_DIR)
-
-ifneq ($(OS_TARGET),WIN16)
-INCLUDES += -I$(SOURCE_XPHEADERS_DIR)
-endif
-
-#
-# Only append source-side private cross-platform include paths for
-# sectools
-#
-
-INCLUDES += -I$(SOURCE_XPPRIVATE_DIR)
diff --git a/security/coreconf/import.pl b/security/coreconf/import.pl
deleted file mode 100755
index 0bba3c820..000000000
--- a/security/coreconf/import.pl
+++ /dev/null
@@ -1,218 +0,0 @@
-#! /usr/local/bin/perl
-#
-# 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.
-#
-
-print STDERR "import.pl\n";
-
-require('coreconf.pl');
-
-
-$returncode =0;
-
-
-#######-- read in variables on command line into %var
-
-$var{ZIP} = "zip";
-$var{UNZIP} = "unzip -o";
-
-&parse_argv;
-
-if (! ($var{IMPORTS} =~ /\w/)) {
- print STDERR "nothing to import\n";
-}
-
-######-- Do the import!
-
-foreach $import (split(/ /,$var{IMPORTS}) ) {
-
- print STDERR "\n\nIMPORTING .... $import\n-----------------------------\n";
-
-
-# if a specific version specified in IMPORT variable
-# (if $import has a slash in it)
-
- if ($import =~ /\//) {
- # $component=everything before the first slash of $import
-
- $import =~ m|^([^/]*)/|;
- $component = $1;
-
- $import =~ m|^(.*)/([^/]*)$|;
-
- # $path=everything before the last slash of $import
- $path = $1;
-
- # $version=everything after the last slash of $import
- $version = $2;
-
- if ($var{VERSION} ne "current") {
- $version = $var{VERSION};
- }
- }
- else {
- $component = $import;
- $path = $import;
- $version = $var{VERSION};
- }
-
- $releasejardir = "$var{RELEASE_TREE}/$path";
- if ($version eq "current") {
- print STDERR "Current version specified. Reading 'current' file ... \n";
-
- open(CURRENT,"$releasejardir/current") || die "NO CURRENT FILE\n";
- $version = <CURRENT>;
- $version =~ s/(\r?\n)*$//; # remove any trailing [CR/]LF's
- close(CURRENT);
- print STDERR "Using version $version\n";
- if ( $version eq "") {
- die "Current version file empty. Stopping\n";
- }
- }
-
- $releasejardir = "$releasejardir/$version";
- if ( ! -d $releasejardir) {
- die "$releasejardir doesn't exist (Invalid Version?)\n";
- }
- foreach $jarfile (split(/ /,$var{FILES})) {
-
- ($relpath,$distpath,$options) = split(/\|/, $var{$jarfile});
-
- if ($var{'OVERRIDE_IMPORT_CHECK'} eq 'YES') {
- $options =~ s/v//g;
- }
-
- if ( $relpath ne "") { $releasejarpathname = "$releasejardir/$relpath";}
- else { $releasejarpathname = $releasejardir; }
-
-# If a component doesn't have IDG versions, import the DBG ones
- if( ! -e "$releasejarpathname/$jarfile" ) {
- if( $relpath =~ /IDG\.OBJ$/ ) {
- $relpath =~ s/IDG.OBJ/DBG.OBJ/;
- $releasejarpathname = "$releasejardir/$relpath";
- } elsif( $relpath =~ /IDG\.OBJD$/ ) {
- $relpath =~ s/IDG.OBJD/DBG.OBJD/;
- $releasejarpathname = "$releasejardir/$relpath";
- }
- }
-
- if (-e "$releasejarpathname/$jarfile") {
- print STDERR "\nWorking on jarfile: $jarfile\n";
-
- if ($distpath =~ m|/$|) {
- $distpathname = "$distpath$component";
- }
- else {
- $distpathname = "$distpath";
- }
-
-
-#the block below is used to determine whether or not the xp headers have
-#already been imported for this component
-
- $doimport = 1;
- if ($options =~ /v/) { # if we should check the imported version
- print STDERR "Checking if version file exists $distpathname/version\n";
- if (-e "$distpathname/version") {
- open( VFILE, "<$distpathname/version") ||
- die "Cannot open $distpathname/version for reading. Permissions?\n";
- $importversion = <VFILE>;
- close (VFILE);
- $importversion =~ s/\r?\n$//; # Strip off any trailing CR/LF
- if ($version eq $importversion) {
- print STDERR "$distpathname version '$importversion' already imported. Skipping...\n";
- $doimport =0;
- }
- }
- }
-
- if ($doimport == 1) {
- if (! -d "$distpathname") {
- &rec_mkdir("$distpathname");
- }
- # delete the stuff in there already.
- # (this should really be recursive delete.)
-
- if ($options =~ /v/) {
- $remheader = "\nREMOVING files in '$distpathname/' :";
- opendir(DIR,"$distpathname") ||
- die ("Cannot read directory $distpathname\n");
- @filelist = readdir(DIR);
- closedir(DIR);
- foreach $file ( @filelist ) {
- if (! ($file =~ m!/.?.$!) ) {
- if (! (-d $file)) {
- $file =~ m!([^/]*)$!;
- print STDERR "$remheader $1";
- $remheader = " ";
- unlink "$distpathname/$file";
- }
- }
- }
- }
-
-
- print STDERR "\n\n";
-
- print STDERR "\nExtracting jarfile '$jarfile' to local directory $distpathname/\n";
-
- print STDERR "$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname\n";
- system("$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname");
-
- $r = $?;
-
- if ($options =~ /v/) {
- if ($r == 0) {
- unlink ("$distpathname/version");
- if (open(VFILE,">$distpathname/version")) {
- print VFILE "$version\n";
- close(VFILE);
- }
- }
- else {
- print STDERR "Could not create '$distpathname/version'. Permissions?\n";
- $returncode ++;
- }
- }
- } # if (doimport)
- } # if (-e releasejarpathname/jarfile)
- } # foreach jarfile)
-} # foreach IMPORT
-
-
-
-exit($returncode);
-
-
-
-
-
diff --git a/security/coreconf/jdk.mk b/security/coreconf/jdk.mk
deleted file mode 100644
index 31b402802..000000000
--- a/security/coreconf/jdk.mk
+++ /dev/null
@@ -1,652 +0,0 @@
-#
-# 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.
-#
-
-ifdef NS_USE_JDK
-#######################################################################
-# [1] Define preliminary JDK "Core Components" toolset options #
-#######################################################################
-
-# set default JDK java threading model
-ifeq ($(JDK_THREADING_MODEL),)
- JDK_THREADING_MODEL = native_threads
-# no such thing as -native flag
- JDK_THREADING_MODEL_OPT =
-endif
-
-#######################################################################
-# [2] Define platform-independent JDK "Core Components" options #
-#######################################################################
-
-# set default location of the java classes repository
-ifeq ($(JAVA_DESTPATH),)
-ifdef BUILD_OPT
- JAVA_DESTPATH = $(SOURCE_CLASSES_DIR)
-else
- JAVA_DESTPATH = $(SOURCE_CLASSES_DBG_DIR)
-endif
-endif
-
-# set default location of the package under the java classes repository
-# note that this overrides the default package value in ruleset.mk
-ifeq ($(PACKAGE),)
- PACKAGE = .
-endif
-
-# set default location of the java source code repository
-ifeq ($(JAVA_SOURCEPATH),)
- JAVA_SOURCEPATH = .
-endif
-
-# add JNI directory to default include search path
-ifneq ($(JNI_GEN),)
- ifdef NSBUILDROOT
- INCLUDES += -I$(JNI_GEN_DIR) -I$(SOURCE_XP_DIR)
- else
- INCLUDES += -I$(JNI_GEN_DIR)
- endif
-endif
-
-#######################################################################
-# [3] Define platform-dependent JDK "Core Components" options #
-#######################################################################
-
-# set [Microsoft Windows] platforms
-ifeq ($(OS_ARCH), WINNT)
- # (1) specify "location" information
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = //iridium/components/jdk/1.2.2_01/WINNT
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
- endif
- endif
-
- PATH_SEPARATOR = ;
-
- # (2) specify "header" information
- JAVA_ARCH = win32
-
- INCLUDES += -I$(JAVA_HOME)/include
- INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
-
- # (3) specify "linker" information
- JAVA_CPU =
-
- JAVA_LIBDIR = lib
-
- JAVA_CLIBS =
-
- JAVA_LIBS = -LIBPATH:$(JAVA_HOME)/$(JAVA_LIBDIR) jvm.lib
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # currently, disable JIT option on this platform
- JDK_JIT_OPT = -nojit
-endif
-
-# set [Sun Solaris] platforms
-ifeq ($(OS_ARCH), SunOS)
- # (1) specify "location" information
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = /share/builds/components/jdk/1.2.2_01/SunOS
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
- endif
- endif
-
- PATH_SEPARATOR = :
-
- # (2) specify "header" information
- JAVA_ARCH = solaris
-
- INCLUDES += -I$(JAVA_HOME)/include
- INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
-
- # (3) specify "linker" information
- JAVA_CPU = sparc
-
- JAVA_LIBDIR = jre/lib/$(JAVA_CPU)
-
- # ** IMPORTANT ** having -lthread before -lnspr is critical on solaris
- # when linking with -ljava as nspr redefines symbols in libthread that
- # cause JNI executables to fail with assert of bad thread stack values.
- JAVA_CLIBS = -lthread
-
- JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # currently, disable JIT option on this platform
- JDK_JIT_OPT =
-endif
-
-# set [Hewlett Packard HP-UX] platforms
-ifeq ($(OS_ARCH), HP-UX)
- # (1) specify "location" information (currently ONLY on "orville")
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = /opt/java1.2
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
- endif
- endif
-
- PATH_SEPARATOR = :
-
- # (2) specify "header" information
- JAVA_ARCH = hp-ux
-
- INCLUDES += -I$(JAVA_HOME)/include
- INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
-
- # (3) specify "linker" information
- JAVA_CPU = PA_RISC
-
- JAVA_LIBDIR = jre/lib/$(JAVA_CPU)
-
- JAVA_CLIBS =
-
- JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # no JIT option available on this platform
- JDK_JIT_OPT =
-endif
-
-# set [Redhat Linux] platforms
-ifeq ($(OS_ARCH), Linux)
- # (1) specify "location" information
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = /share/builds/components/jdk/1.2.2/Linux
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
- endif
- endif
-
- PATH_SEPARATOR = :
-
- # (2) specify "header" information
- JAVA_ARCH = linux
-
- INCLUDES += -I$(JAVA_HOME)/include
- INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
-
- # (3) specify "linker" information
- JAVA_CPU = i386
-
- JAVA_LIBDIR = jre/lib/$(JAVA_CPU)
-
- JAVA_CLIBS =
-
- JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # no JIT option available on this platform
- JDK_JIT_OPT =
-endif
-
-# set [IBM AIX] platforms
-ifeq ($(OS_ARCH), AIX)
- # (1) specify "location" information
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = /share/builds/components/jdk/1.2.2/AIX
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
- endif
- endif
-
- PATH_SEPARATOR = :
-
- # (2) specify "header" information
- JAVA_ARCH = aix
-
- INCLUDES += -I$(JAVA_HOME)/include
-
- # (3) specify "linker" information
- JAVA_CPU = aix
-
- JAVA_LIBDIR = jre/bin
-
- JAVA_CLIBS =
-
- JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR) -lhpi
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # no JIT option available on this platform
- JDK_JIT_OPT =
-endif
-
-# set [Digital UNIX] platforms
-ifeq ($(OS_ARCH), OSF1)
- # (1) specify "location" information
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = /share/builds/components/jdk/1.2.2_3/OSF1
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/classes.zip
- endif
- endif
-
- PATH_SEPARATOR = :
-
- # (2) specify "header" information
- JAVA_ARCH = alpha
-
- INCLUDES += -I$(JAVA_HOME)/include
- INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
-
- # (3) specify "linker" information
- JAVA_CPU = alpha
-
- JAVA_LIBDIR = jre/lib/$(JAVA_CPU)
-
- JAVA_CLIBS =
-
- JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # no JIT option available on this platform
- JDK_JIT_OPT =
-endif
-
-# set [Silicon Graphics IRIX] platforms
-ifeq ($(OS_ARCH), IRIX)
- # (1) specify "location" information
- ifeq ($(JAVA_HOME),)
- JAVA_HOME = /share/builds/components/jdk/1.2.1/IRIX
- endif
-
- JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar
-
- ifeq ($(JRE_HOME),)
- JRE_HOME = $(JAVA_HOME)
- JRE_CLASSES = $(JAVA_CLASSES)
- else
- ifeq ($(JRE_CLASSES),)
- JRE_CLASSES = $(JRE_HOME)/lib/dev.jar:$(JRE_HOME)/lib/rt.jar
- endif
- endif
-
- PATH_SEPARATOR = :
-
- # (2) specify "header" information
- JAVA_ARCH = irix
-
- INCLUDES += -I$(JAVA_HOME)/include
- INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
-
- # (3) specify "-n32 linker" information
- JAVA_CPU = sgi
-
- JAVA_LIBDIR = lib32/$(JAVA_CPU)
-
- JAVA_CLIBS =
-
- JAVA_LIBS = -L$(JAVA_HOME)/$(JAVA_LIBDIR)/$(JDK_THREADING_MODEL) -lhpi
- JAVA_LIBS += -lirixextra
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR)/classic -ljvm
- JAVA_LIBS += -L$(JAVA_HOME)/$(JAVA_LIBDIR) -ljava
- JAVA_LIBS += $(JAVA_CLIBS)
-
- LDFLAGS += $(JAVA_LIBS)
-
- # no JIT option available on this platform
- JDK_JIT_OPT =
-endif
-
-#######################################################################
-# [4] Define remaining JDK "Core Components" default toolset options #
-#######################################################################
-
-# set JDK optimization model
-ifeq ($(BUILD_OPT),1)
- JDK_OPTIMIZER_OPT = -O
-else
- JDK_OPTIMIZER_OPT = -g
-endif
-
-# set minimal JDK debugging model
-ifeq ($(JDK_DEBUG),1)
- JDK_DEBUG_OPT = -debug
-else
- JDK_DEBUG_OPT =
-endif
-
-# set default path to repository for JDK classes
-ifeq ($(JDK_CLASS_REPOSITORY_OPT),)
- JDK_CLASS_REPOSITORY_OPT = -d $(JAVA_DESTPATH)
-endif
-
-# initialize the JDK heap size option to a default value
-ifeq ($(JDK_INIT_HEAP_OPT),)
- JDK_INIT_HEAP_OPT = -ms8m
-endif
-
-# define a default JDK classpath
-ifeq ($(JDK_CLASSPATH),)
- JDK_CLASSPATH = "$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)"
-endif
-
-# by default, override CLASSPATH environment variable using the JDK classpath option with $(JDK_CLASSPATH)
-ifeq ($(JDK_CLASSPATH_OPT),)
- JDK_CLASSPATH_OPT = -classpath $(JDK_CLASSPATH)
-endif
-
-
-endif
-
-
-ifdef NS_USE_JDK_TOOLSET
-#######################################################################
-# [5] Define JDK "Core Components" toolset; #
-# (always allow a user to override these values) #
-#######################################################################
-
-#
-# (1) appletviewer
-#
-
-ifeq ($(APPLETVIEWER),)
- APPLETVIEWER_PROG = $(JAVA_HOME)/bin/appletviewer$(PROG_SUFFIX)
- APPLETVIEWER_FLAGS = $(JDK_THREADING_MODEL_OPT)
- APPLETVIEWER_FLAGS += $(JDK_DEBUG_OPT)
- APPLETVIEWER_FLAGS += $(JDK_JIT_OPT)
- APPLETVIEWER = $(APPLETVIEWER_PROG) $(APPLETVIEWER_FLAGS)
-endif
-
-#
-# (2) jar
-#
-
-ifeq ($(JAR),)
- JAR_PROG = $(JAVA_HOME)/bin/jar$(PROG_SUFFIX)
- JAR_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAR = $(JAR_PROG) $(JAR_FLAGS)
-endif
-
-#
-# (3) java
-#
-
-ifeq ($(JAVA),)
- JAVA_PROG = $(JAVA_HOME)/bin/java$(PROG_SUFFIX)
- JAVA_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVA_FLAGS += $(JDK_DEBUG_OPT)
- JAVA_FLAGS += $(JDK_CLASSPATH_OPT)
- JAVA_FLAGS += $(JDK_INIT_HEAP_OPT)
- JAVA_FLAGS += $(JDK_JIT_OPT)
- JAVA = $(JAVA_PROG) $(JAVA_FLAGS)
-endif
-
-#
-# (4) javac
-#
-
-ifeq ($(JAVAC),)
- JAVAC_PROG = $(JAVA_HOME)/bin/javac$(PROG_SUFFIX)
- JAVAC_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVAC_FLAGS += $(JDK_OPTIMIZER_OPT)
- JAVAC_FLAGS += $(JDK_DEBUG_OPT)
- JAVAC_FLAGS += $(JDK_CLASSPATH_OPT)
- JAVAC_FLAGS += -J$(JDK_INIT_HEAP_OPT)
- JAVAC_FLAGS += $(JDK_CLASS_REPOSITORY_OPT)
- JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS)
-endif
-
-#
-# (5) javadoc
-#
-
-ifeq ($(JAVADOC),)
- JAVADOC_PROG = $(JAVA_HOME)/bin/javadoc$(PROG_SUFFIX)
- JAVADOC_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVADOC_FLAGS += $(JDK_CLASSPATH_OPT)
- JAVADOC_FLAGS += -J$(JDK_INIT_HEAP_OPT)
- JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS)
-endif
-
-#
-# (6) javah
-#
-
-ifeq ($(JAVAH),)
- JAVAH_PROG = $(JAVA_HOME)/bin/javah$(PROG_SUFFIX)
- JAVAH_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVAH_FLAGS += $(JDK_CLASSPATH_OPT)
- JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS)
-endif
-
-#
-# (7) javakey
-#
-
-ifeq ($(JAVAKEY),)
- JAVAKEY_PROG = $(JAVA_HOME)/bin/javakey$(PROG_SUFFIX)
- JAVAKEY_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVAKEY = $(JAVAKEY_PROG) $(JAVAKEY_FLAGS)
-endif
-
-#
-# (8) javap
-#
-
-ifeq ($(JAVAP),)
- JAVAP_PROG = $(JAVA_HOME)/bin/javap$(PROG_SUFFIX)
- JAVAP_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVAP_FLAGS += $(JDK_CLASSPATH_OPT)
- JAVAP_FLAGS += -J$(JDK_INIT_HEAP_OPT)
- JAVAP = $(JAVAP_PROG) $(JAVAP_FLAGS)
-endif
-
-#
-# (9) javat
-#
-
-ifeq ($(JAVAT),)
- JAVAT_PROG = $(JAVA_HOME)/bin/javat$(PROG_SUFFIX)
- JAVAT_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVAT = $(JAVAT_PROG) $(JAVAT_FLAGS)
-endif
-
-#
-# (10) javaverify
-#
-
-ifeq ($(JAVAVERIFY),)
- JAVAVERIFY_PROG = $(JAVA_HOME)/bin/javaverify$(PROG_SUFFIX)
- JAVAVERIFY_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JAVAVERIFY = $(JAVAVERIFY_PROG) $(JAVAVERIFY_FLAGS)
-endif
-
-#
-# (11) javaw
-#
-
-ifeq ($(JAVAW),)
- jJAVAW_PROG = $(JAVA_HOME)/bin/javaw$(PROG_SUFFIX)
- jJAVAW_FLAGS = $(JDK_THREADING_MODEL_OPT)
- jJAVAW_FLAGS += $(JDK_DEBUG_OPT)
- jJAVAW_FLAGS += $(JDK_CLASSPATH_OPT)
- jJAVAW_FLAGS += $(JDK_INIT_HEAP_OPT)
- jJAVAW_FLAGS += $(JDK_JIT_OPT)
- jJAVAW = $(JAVAW_PROG) $(JAVAW_FLAGS)
-endif
-
-#
-# (12) jdb
-#
-
-ifeq ($(JDB),)
- JDB_PROG = $(JAVA_HOME)/bin/jdb$(PROG_SUFFIX)
- JDB_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JDB_FLAGS += $(JDK_DEBUG_OPT)
- JDB_FLAGS += $(JDK_CLASSPATH_OPT)
- JDB_FLAGS += $(JDK_INIT_HEAP_OPT)
- JDB_FLAGS += $(JDK_JIT_OPT)
- JDB = $(JDB_PROG) $(JDB_FLAGS)
-endif
-
-#
-# (13) jre
-#
-
-ifeq ($(JRE),)
- JRE_PROG = $(JAVA_HOME)/bin/jre$(PROG_SUFFIX)
- JRE_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JRE_FLAGS += $(JDK_CLASSPATH_OPT)
- JRE_FLAGS += $(JDK_INIT_HEAP_OPT)
- JRE_FLAGS += $(JDK_JIT_OPT)
- JRE = $(JRE_PROG) $(JRE_FLAGS)
-endif
-
-#
-# (14) jrew
-#
-
-ifeq ($(JREW),)
- JREW_PROG = $(JAVA_HOME)/bin/jrew$(PROG_SUFFIX)
- JREW_FLAGS = $(JDK_THREADING_MODEL_OPT)
- JREW_FLAGS += $(JDK_CLASSPATH_OPT)
- JREW_FLAGS += $(JDK_INIT_HEAP_OPT)
- JREW_FLAGS += $(JDK_JIT_OPT)
- JREW = $(JREW_PROG) $(JREW_FLAGS)
-endif
-
-#
-# (15) native2ascii
-#
-
-ifeq ($(NATIVE2ASCII),)
- NATIVE2ASCII_PROG = $(JAVA_HOME)/bin/native2ascii$(PROG_SUFFIX)
- NATIVE2ASCII_FLAGS = $(JDK_THREADING_MODEL_OPT)
- NATIVE2ASCII = $(NATIVE2ASCII_PROG) $(NATIVE2ASCII_FLAGS)
-endif
-
-#
-# (16) rmic
-#
-
-ifeq ($(RMIC),)
- RMIC_PROG = $(JAVA_HOME)/bin/rmic$(PROG_SUFFIX)
- RMIC_FLAGS = $(JDK_THREADING_MODEL_OPT)
- RMIC_FLAGS += $(JDK_OPTIMIZER_OPT)
- RMIC_FLAGS += $(JDK_CLASSPATH_OPT)
- RMIC = $(RMIC_PROG) $(RMIC_FLAGS)
-endif
-
-#
-# (17) rmiregistry
-#
-
-ifeq ($(RMIREGISTRY),)
- RMIREGISTRY_PROG = $(JAVA_HOME)/bin/rmiregistry$(PROG_SUFFIX)
- RMIREGISTRY_FLAGS = $(JDK_THREADING_MODEL_OPT)
- RMIREGISTRY = $(RMIREGISTRY_PROG) $(RMIREGISTRY_FLAGS)
-endif
-
-#
-# (18) serialver
-#
-
-ifeq ($(SERIALVER),)
- SERIALVER_PROG = $(JAVA_HOME)/bin/serialver$(PROG_SUFFIX)
- SERIALVER_FLAGS = $(JDK_THREADING_MODEL_OPT)
- SERIALVER = $(SERIALVER_PROG) $(SERIALVER_FLAGS)
-endif
-
-endif
diff --git a/security/coreconf/jniregen.pl b/security/coreconf/jniregen.pl
deleted file mode 100755
index 607eaf68b..000000000
--- a/security/coreconf/jniregen.pl
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/local/bin/perl
-#
-# 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.
-#
-
-# Input: -d dir foo1 foo2 . . .
-# Compares generated "_jni/foo1.h" file with "foo1.class", and
-# generated "_jni/foo2.h" file with "foo2.class", etc.
-# (NOTE: unlike its closely related cousin, outofdate.pl,
-# the "-d dir" must always be specified)
-#
-# Returns: list of headers which are OLDER than corresponding class
-# files (non-existant class files are considered to be real old :-)
-
-$found = 1;
-
-if ($ARGV[0] eq '-d')
-{
- $classdir = $ARGV[1];
- $classdir .= "/";
- shift;
- shift;
-}
-else
-{
- print STDERR "Usage: perl ", $0, " -d dir foo1 foo2 . . .\n";
- exit -1;
-}
-
-foreach $filename (@ARGV)
-{
- $headerfilename = "_jni/";
- $headerfilename .= $filename;
- $headerfilename =~ s/\./_/g;
- $headerfilename .= ".h";
-
- $classfilename = $filename;
- $classfilename =~ s|\.|/|g;
- $classfilename .= ".class";
-
- $classfilename = $classdir . $classfilename;
-
-
- ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $headermtime,
- $ctime, $blksize, $blocks ) = stat( $headerfilename );
-
- ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $classmtime,
- $ctime, $blksize, $blocks ) = stat( $classfilename );
-
- if( $headermtime < $classmtime )
- {
- # NOTE: Since this is used by "javah", and "javah" refuses to overwrite
- # an existing file, we force an unlink from this script, since
- # we actually want to regenerate the header file at this time.
- unlink $headerfilename;
- print $filename, " ";
- $found = 0;
- }
-}
-
-print "\n";
-exit 0;
-
diff --git a/security/coreconf/location.mk b/security/coreconf/location.mk
deleted file mode 100644
index a0b25f74c..000000000
--- a/security/coreconf/location.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" macros to figure out binary code location #
-#######################################################################
-
-#
-# Figure out where the binary code lives.
-#
-
-BUILD = $(PLATFORM)
-OBJDIR = $(PLATFORM)
-ifdef MOZILLA_SECURITY_BUILD
-DIST = $(CORE_DEPTH)/../dist/$(PLATFORM)
-else
-ifdef MOZILLA_CLIENT
-DIST = $(CORE_DEPTH)/../mozilla/dist/$(PLATFORM)
-else
-DIST = $(CORE_DEPTH)/dist/$(PLATFORM)
-endif
-endif
-VPATH = $(NSINSTALL_DIR)/$(PLATFORM)
-DEPENDENCIES = $(PLATFORM)/.md
-
-ifdef BUILD_DEBUG_GC
- DEFINES += -DDEBUG_GC
-endif
-
-GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
diff --git a/security/coreconf/makefile.win b/security/coreconf/makefile.win
deleted file mode 100644
index c3abce76b..000000000
--- a/security/coreconf/makefile.win
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# 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.
-#
-
-#
-# An NMAKE file to set up and adjust coreconf's build system for
-# Client build. Client build should invoke NMAKE on this file
-# instead of invoking gmake directly.
-#
-
-NS_DEPTH = ..
-include <$(NS_DEPTH)\config\config.mak>
-#include <$(NS_DEPTH)\config\rules.mak>
-
-#
-# Backslashes are escape characters to gmake, so flip all backslashes
-# in $(MOZ_TOOLS) to forward slashes and pass that to gmake.
-#
-
-GMAKE = $(MOZ_TOOLS)\bin\gmake.exe MOZ_TOOLS_FLIPPED=$(MOZ_TOOLS:\=/)
-
-GMAKE = $(GMAKE) PR_CLIENT_BUILD=1 PR_CLIENT_BUILD_WINDOWS=1
-
-#
-# The Client's debug build uses MSVC's debug runtime library (/MDd).
-#
-
-!ifdef MOZ_DEBUG
-GMAKE = $(GMAKE) USE_DEBUG_RTL=1
-!else
-GMAKE = $(GMAKE) BUILD_OPT=1
-!endif
-
-!if "$(MOZ_BITS)" == "16"
-GMAKE = $(GMAKE) OS_TARGET=WIN16
-!else
-
-GMAKE = $(GMAKE) OS_TARGET=WIN95
-!ifdef MOZ_DEBUG
-PR_OBJDIR = WIN954.0_DBG.OBJD
-!else
-PR_OBJDIR = WIN954.0_OPT.OBJ
-!endif
-
-!endif
-
-#
-# The rules. Simply invoke gmake with the same target
-# for Win16, use the watcom compiler with the MSVC headers and libs
-#
-
-# this rule is needed so that nmake with no explicit target will only build
-# all, and not build all the targets named below in succession!
-default:: all
-
-# a rule like this one must only be used for explicitly named targets!
-all depend export libs install clobber clobber_all clean::
-!if "$(MOZ_BITS)" == "16"
- set PATH=%WATCPATH%
- set INCLUDE=%MSVC_INC%
- set LIB=%MSVC_LIB%
-!endif
- $(GMAKE) $@
-!if "$(MOZ_BITS)" == "16"
- set PATH=%MSVCPATH%
- set INCLUDE=%MSVC_INC%
- set LIB=%MSVC_LIB%
-!endif
-
-show:
- @echo "MAKEFLAGS = $(MAKEFLAGS)"
diff --git a/security/coreconf/module.mk b/security/coreconf/module.mk
deleted file mode 100644
index 55f7f8691..000000000
--- a/security/coreconf/module.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# The master "Core Components" source and release component directory #
-# names are ALWAYS identical and are the value of $(MODULE). #
-# NOTE: A component is also called a module or a subsystem. #
-#######################################################################
-
-#
-# All "Core Components" <component>-specific source-side tags must
-# always be identified for compiling/linking purposes
-#
-
-ifndef JAVA_SOURCE_COMPONENT
- JAVA_SOURCE_COMPONENT = java
-endif
-
-ifndef NETLIB_SOURCE_COMPONENT
- NETLIB_SOURCE_COMPONENT = netlib
-endif
-
-ifndef NSPR_SOURCE_COMPONENT
- NSPR_SOURCE_COMPONENT = nspr20
-endif
-
-ifndef SECTOOLS_SOURCE_COMPONENT
- SECTOOLS_SOURCE_COMPONENT = sectools
-endif
-
-ifndef SECURITY_SOURCE_COMPONENT
- SECURITY_SOURCE_COMPONENT = security
-endif
-
diff --git a/security/coreconf/nsinstall/Makefile b/security/coreconf/nsinstall/Makefile
deleted file mode 100644
index 2175b2d87..000000000
--- a/security/coreconf/nsinstall/Makefile
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# 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 = ../..
-
-MODULE = coreconf
-
-CSRCS = nsinstall.c pathsub.c
-
-PLSRCS = nfspwd.pl
-
-PROGRAM = nsinstall
-
-include $(DEPTH)/coreconf/config.mk
-
-ifeq ($(OS_ARCH),WINNT)
-PROGRAM =
-else
-TARGETS = $(PROGRAM) $(PLSRCS:.pl=)
-endif
-
-include $(DEPTH)/coreconf/rules.mk
-
-# Redefine MAKE_OBJDIR for just this directory
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); fi
-endef
-
diff --git a/security/coreconf/nsinstall/nfspwd b/security/coreconf/nsinstall/nfspwd
deleted file mode 100755
index 339abead3..000000000
--- a/security/coreconf/nsinstall/nfspwd
+++ /dev/null
@@ -1,46 +0,0 @@
-#! perl
-#
-# 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.
-#
-
-require "fastcwd.pl";
-
-$_ = &fastcwd;
-if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
- print("$_\n");
-} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
- && readlink("/u/$user") eq "/usr/people/$user") {
- print("/u/$user/$rest\n");
-} else {
- chop($host = `hostname`);
- print("/h/$host$_\n");
-}
diff --git a/security/coreconf/nsinstall/nfspwd.pl b/security/coreconf/nsinstall/nfspwd.pl
deleted file mode 100644
index 339abead3..000000000
--- a/security/coreconf/nsinstall/nfspwd.pl
+++ /dev/null
@@ -1,46 +0,0 @@
-#! perl
-#
-# 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.
-#
-
-require "fastcwd.pl";
-
-$_ = &fastcwd;
-if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
- print("$_\n");
-} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
- && readlink("/u/$user") eq "/usr/people/$user") {
- print("/u/$user/$rest\n");
-} else {
- chop($host = `hostname`);
- print("/h/$host$_\n");
-}
diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c
deleted file mode 100644
index b404fdd73..000000000
--- a/security/coreconf/nsinstall/nsinstall.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * 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.
- */
-
-/*
-** Netscape portable install command.
-*/
-#include <stdio.h> /* OSF/1 requires this before grp.h, so put it first */
-#include <assert.h>
-#include <fcntl.h>
-#include <string.h>
-#if defined(_WINDOWS)
-#include <windows.h>
-typedef unsigned int mode_t;
-#else
-#include <grp.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <utime.h>
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "pathsub.h"
-
-#define HAVE_LCHOWN
-
-#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE)
-#undef HAVE_LCHOWN
-#endif
-
-#ifdef LINUX
-#include <getopt.h>
-#endif
-
-#if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC)
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(a) (((a) & S_IFMT) == S_IFLNK)
-#endif
-#endif
-
-#if defined(SNI)
-extern int fchmod(int fildes, mode_t mode);
-#endif
-
-static void
-usage(void)
-{
- fprintf(stderr,
- "usage: %s [-C cwd] [-L linkprefix] [-m mode] [-o owner] [-g group]\n"
- " %*s [-DdltR] file [file ...] directory\n",
- program, strlen(program), "");
- exit(2);
-}
-
-/* this is more-or-less equivalent to mkdir -p */
-static int
-mkdirs(char *path, mode_t mode)
-{
- char * cp;
- int rv;
- struct stat sb;
-
- if (!path || !path[0])
- fail("Null pointer or empty string passed to mkdirs()");
- while (*path == '/' && path[1] == '/')
- path++;
- while ((cp = strrchr(path, '/')) && cp[1] == '\0')
- *cp = '\0';
- if (cp && cp != path) {
- *cp = '\0';
- if ((stat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
- mkdirs(path, mode) < 0) {
- return -1;
- }
- *cp = '/';
- }
- rv = mkdir(path, mode);
- if (rv) {
- if (errno != EEXIST)
- fail("mkdirs cannot make %s", path);
- fprintf(stderr, "directory creation race: %s\n", path);
- if (!stat(path, &sb) && S_ISDIR(sb.st_mode))
- rv = 0;
- }
- return rv;
-}
-
-static uid_t
-touid(char *owner)
-{
- struct passwd *pw;
- uid_t uid;
- char *cp;
-
- if (!owner || !owner[0])
- fail("Null pointer or empty string passed to touid()");
- pw = getpwnam(owner);
- if (pw)
- return pw->pw_uid;
- uid = strtol(owner, &cp, 0);
- if (uid == 0 && cp == owner)
- fail("cannot find uid for %s", owner);
- return uid;
-}
-
-static gid_t
-togid(char *group)
-{
- struct group *gr;
- gid_t gid;
- char *cp;
-
- if (!group || !group[0])
- fail("Null pointer or empty string passed to togid()");
- gr = getgrnam(group);
- if (gr)
- return gr->gr_gid;
- gid = strtol(group, &cp, 0);
- if (gid == 0 && cp == group)
- fail("cannot find gid for %s", group);
- return gid;
-}
-
-void * const uninit = (void *)0xdeadbeef;
-
-int
-main(int argc, char **argv)
-{
- char * base = uninit;
- char * bp = uninit;
- char * cp = uninit;
- char * cwd = 0;
- char * group = 0;
- char * linkname = 0;
- char * linkprefix = 0;
- char * name = uninit;
- char * owner = 0;
- char * todir = uninit;
- char * toname = uninit;
-
- int bnlen = -1;
- int cc = 0;
- int dodir = 0;
- int dolink = 0;
- int dorelsymlink = 0;
- int dotimes = 0;
- int exists = 0;
- int fromfd = -1;
- int len = -1;
- int lplen = 0;
- int onlydir = 0;
- int opt = -1;
- int tdlen = -1;
- int tofd = -1;
- int wc = -1;
-
- mode_t mode = 0755;
-
- uid_t uid = -1;
- gid_t gid = -1;
-
- struct stat sb;
- struct stat tosb;
- struct utimbuf utb;
- char buf[BUFSIZ];
-
- program = strrchr(argv[0], '/');
- if (!program)
- program = strrchr(argv[0], '\\');
- program = program ? program+1 : argv[0];
-
-
- while ((opt = getopt(argc, argv, "C:DdlL:Rm:o:g:t")) != EOF) {
- switch (opt) {
- case 'C': cwd = optarg; break;
- case 'D': onlydir = 1; break;
- case 'd': dodir = 1; break;
- case 'l': dolink = 1; break;
- case 'L':
- linkprefix = optarg;
- lplen = strlen(linkprefix);
- dolink = 1;
- break;
- case 'R': dolink = dorelsymlink = 1; break;
- case 'm':
- mode = strtoul(optarg, &cp, 8);
- if (mode == 0 && cp == optarg)
- usage();
- break;
- case 'o': owner = optarg; break;
- case 'g': group = optarg; break;
- case 't': dotimes = 1; break;
- default: usage();
- }
- }
-
- argc -= optind;
- argv += optind;
- if (argc < 2 - onlydir)
- usage();
-
- todir = argv[argc-1];
- if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
- mkdirs(todir, 0777) < 0) {
- fail("cannot mkdir -p %s", todir);
- }
- if (onlydir)
- return 0;
-
- if (!cwd) {
- cwd = getcwd(0, PATH_MAX);
- if (!cwd)
- fail("could not get CWD");
- }
-
- /* make sure we can get into todir. */
- xchdir(todir);
- todir = getcwd(0, PATH_MAX);
- if (!todir)
- fail("could not get CWD in todir");
- tdlen = strlen(todir);
-
- /* back to original directory. */
- xchdir(cwd);
-
- uid = owner ? touid(owner) : -1;
- gid = group ? togid(group) : -1;
-
- while (--argc > 0) {
- name = *argv++;
- len = strlen(name);
- base = xbasename(name);
- bnlen = strlen(base);
- toname = (char*)xmalloc(tdlen + 1 + bnlen + 1);
- sprintf(toname, "%s/%s", todir, base);
-retry:
- exists = (lstat(toname, &tosb) == 0);
-
- if (dodir) {
- /* -d means create a directory, always */
- if (exists && !S_ISDIR(tosb.st_mode)) {
- int rv = unlink(toname);
- if (rv)
- fail("cannot unlink %s", toname);
- exists = 0;
- }
- if (!exists && mkdir(toname, mode) < 0) {
- /* we probably have two nsinstall programs in a race here. */
- if (errno == EEXIST && !stat(toname, &sb) &&
- S_ISDIR(sb.st_mode)) {
- fprintf(stderr, "directory creation race: %s\n", toname);
- goto retry;
- }
- fail("cannot make directory %s", toname);
- }
- if ((owner || group) && chown(toname, uid, gid) < 0)
- fail("cannot change owner of %s", toname);
- } else if (dolink) {
- if (*name == '/') {
- /* source is absolute pathname, link to it directly */
- linkname = 0;
- } else {
- if (linkprefix) {
- /* -L implies -l and prefixes names with a $cwd arg. */
- len += lplen + 1;
- linkname = (char*)xmalloc(len + 1);
- sprintf(linkname, "%s/%s", linkprefix, name);
- } else if (dorelsymlink) {
- /* Symlink the relative path from todir to source name. */
- linkname = (char*)xmalloc(PATH_MAX);
-
- if (*todir == '/') {
- /* todir is absolute: skip over common prefix. */
- lplen = relatepaths(todir, cwd, linkname);
- strcpy(linkname + lplen, name);
- } else {
- /* todir is named by a relative path: reverse it. */
- reversepath(todir, name, len, linkname);
- xchdir(cwd);
- }
-
- len = strlen(linkname);
- }
- name = linkname;
- }
-
- /* Check for a pre-existing symlink with identical content. */
- if (exists &&
- (!S_ISLNK(tosb.st_mode) ||
- readlink(toname, buf, sizeof buf) != len ||
- strncmp(buf, name, len) != 0)) {
- int rmrv;
- rmrv = (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
- if (rmrv < 0) {
- fail("destination exists, cannot remove %s", toname);
- }
- exists = 0;
- }
- if (!exists && symlink(name, toname) < 0) {
- if (errno == EEXIST) {
- fprintf(stderr, "symlink creation race: %s\n", toname);
- goto retry;
- }
- diagnosePath(toname);
- fail("cannot make symbolic link %s", toname);
- }
-#ifdef HAVE_LCHOWN
- if ((owner || group) && lchown(toname, uid, gid) < 0)
- fail("cannot change owner of %s", toname);
-#endif
-
- if (linkname) {
- free(linkname);
- linkname = 0;
- }
- } else {
- /* Copy from name to toname, which might be the same file. */
- fromfd = open(name, O_RDONLY);
- if (fromfd < 0 || fstat(fromfd, &sb) < 0)
- fail("cannot access %s", name);
- if (exists &&
- (!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0)) {
- int rmrv;
- rmrv = (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
- if (rmrv < 0) {
- fail("destination exists, cannot remove %s", toname);
- }
- }
- tofd = open(toname, O_CREAT | O_WRONLY, 0666);
- if (tofd < 0)
- fail("cannot create %s", toname);
-
- bp = buf;
- while ((cc = read(fromfd, bp, sizeof buf)) > 0) {
- while ((wc = write(tofd, bp, cc)) > 0) {
- if ((cc -= wc) == 0)
- break;
- bp += wc;
- }
- if (wc < 0)
- fail("cannot write to %s", toname);
- }
- if (cc < 0)
- fail("cannot read from %s", name);
-
- if (ftruncate(tofd, sb.st_size) < 0)
- fail("cannot truncate %s", toname);
- if (dotimes) {
- utb.actime = sb.st_atime;
- utb.modtime = sb.st_mtime;
- if (utime(toname, &utb) < 0)
- fail("cannot set times of %s", toname);
- }
- if (fchmod(tofd, mode) < 0)
- fail("cannot change mode of %s", toname);
- if ((owner || group) && fchown(tofd, uid, gid) < 0)
- fail("cannot change owner of %s", toname);
-
- /* Must check for delayed (NFS) write errors on close. */
- if (close(tofd) < 0)
- fail("close reports write error on %s", toname);
- close(fromfd);
- }
-
- free(toname);
- }
-
- free(cwd);
- free(todir);
- return 0;
-}
-
diff --git a/security/coreconf/nsinstall/pathsub.c b/security/coreconf/nsinstall/pathsub.c
deleted file mode 100644
index 4d5728833..000000000
--- a/security/coreconf/nsinstall/pathsub.c
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * 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.
- */
-
-/*
-** Pathname subroutines.
-*/
-#include <assert.h>
-#ifdef FREEBSD
-#include <sys/types.h>
-#endif /* FREEBSD */
-#include <dirent.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "pathsub.h"
-#ifdef USE_REENTRANT_LIBC
-#include "libc_r.h"
-#endif /* USE_REENTRANT_LIBC */
-
-char *program;
-
-void
-fail(char *format, ...)
-{
- int error;
- va_list ap;
-
-#ifdef USE_REENTRANT_LIBC
- R_STRERROR_INIT_R();
-#endif
-
- error = errno;
- fprintf(stderr, "%s: ", program);
- va_start(ap, format);
- vfprintf(stderr, format, ap);
- va_end(ap);
- if (error)
-
-#ifdef USE_REENTRANT_LIBC
- R_STRERROR_R(errno);
- fprintf(stderr, ": %s", r_strerror_r);
-#else
- fprintf(stderr, ": %s", strerror(errno));
-#endif
-
- putc('\n', stderr);
- abort();
- exit(1);
-}
-
-char *
-getcomponent(char *path, char *name)
-{
- if (*path == '\0')
- return 0;
- if (*path == '/') {
- *name++ = '/';
- } else {
- do {
- *name++ = *path++;
- } while (*path != '/' && *path != '\0');
- }
- *name = '\0';
- while (*path == '/')
- path++;
- return path;
-}
-
-#ifdef UNIXWARE
-/* The static buffer in Unixware's readdir is too small. */
-struct dirent * readdir(DIR *d)
-{
- static struct dirent *buf = NULL;
-#define MAX_PATH_LEN 1024
-
- if (buf == NULL)
- buf = (struct dirent *)xmalloc(sizeof(struct dirent) + MAX_PATH_LEN) ;
- return readdir_r(d, buf);
-}
-#endif
-
-/* APPARENT BUG - ignores argument "dir", uses ".." instead. */
-char *
-ino2name(ino_t ino, char *dir)
-{
- DIR *dp;
- struct dirent *ep;
- char *name;
-
- dp = opendir(".."); /* XXX */
- if (!dp)
- fail("cannot read parent directory");
- for (;;) {
- if (!(ep = readdir(dp)))
- fail("cannot find current directory");
- if (ep->d_ino == ino)
- break;
- }
- name = xstrdup(ep->d_name);
- closedir(dp);
- return name;
-}
-
-void *
-xmalloc(size_t size)
-{
- void *p;
-
- if (size <= 0)
- fail("attempted to allocate %u bytes", size);
- p = malloc(size);
- if (!p)
- fail("cannot allocate %u bytes", size);
- return p;
-}
-
-char *
-xstrdup(char *s)
-{
- if (!s || !s[0])
- fail("Null pointer or empty string passed to xstrdup()");
- return strcpy((char*)xmalloc(strlen(s) + 1), s);
-}
-
-char *
-xbasename(char *path)
-{
- char *cp;
-
- if (!path || !path[0])
- fail("Null pointer or empty string passed to xbasename()");
- while ((cp = strrchr(path, '/')) && cp[1] == '\0')
- *cp = '\0';
- if (!cp) return path;
- return cp + 1;
-}
-
-void
-xchdir(char *dir)
-{
- if (!dir || !dir[0])
- fail("Null pointer or empty string passed to xchdir()");
- if (chdir(dir) < 0)
- fail("cannot change directory to %s", dir);
-}
-
-int
-relatepaths(char *from, char *to, char *outpath)
-{
- char *cp, *cp2;
- int len;
- char buf[NAME_MAX];
-
- assert(*from == '/' && *to == '/');
- if (!from || *from != '/')
- fail("relatepaths: from path does not start with /");
- if (!to || *to != '/')
- fail("relatepaths: to path does not start with /");
-
- for (cp = to, cp2 = from; *cp == *cp2; cp++, cp2++)
- if (*cp == '\0')
- break;
- while (cp[-1] != '/')
- cp--, cp2--;
- if (cp - 1 == to) {
- /* closest common ancestor is /, so use full pathname */
- len = strlen(strcpy(outpath, to));
- if (outpath[len] != '/') {
- outpath[len++] = '/';
- outpath[len] = '\0';
- }
- } else {
- len = 0;
- while ((cp2 = getcomponent(cp2, buf)) != 0) {
- strcpy(outpath + len, "../");
- len += 3;
- }
- while ((cp = getcomponent(cp, buf)) != 0) {
- sprintf(outpath + len, "%s/", buf);
- len += strlen(outpath + len);
- }
- }
- return len;
-}
-
-void
-reversepath(char *inpath, char *name, int len, char *outpath)
-{
- char *cp, *cp2;
- char buf[NAME_MAX];
- struct stat sb;
-
- cp = strcpy(outpath + PATH_MAX - (len + 1), name);
- cp2 = inpath;
- while ((cp2 = getcomponent(cp2, buf)) != 0) {
- if (strcmp(buf, ".") == 0)
- continue;
- if (strcmp(buf, "..") == 0) {
- if (stat(".", &sb) < 0)
- fail("cannot stat current directory");
- name = ino2name(sb.st_ino, "..");
- len = strlen(name);
- cp -= len + 1;
- strcpy(cp, name);
- cp[len] = '/';
- free(name);
- xchdir("..");
- } else {
- cp -= 3;
- strncpy(cp, "../", 3);
- xchdir(buf);
- }
- }
- strcpy(outpath, cp);
-}
-
-void
-diagnosePath(const char * path)
-{
- char * myPath;
- char * slash;
- int rv;
- struct stat sb;
- char buf[BUFSIZ];
-
- if (!path || !path[0])
- fail("Null pointer or empty string passed to mkdirs()");
- myPath = strdup(path);
- if (!myPath)
- fail("strdup() failed!");
- do {
- rv = lstat(myPath, &sb);
- if (rv < 0) {
- perror(myPath);
- } else if (S_ISLNK(sb.st_mode)) {
- rv = readlink(myPath, buf, sizeof buf);
- if (rv < 0) {
- perror("readlink");
- buf[0] = 0;
- } else {
- buf[rv] = 0;
- }
- fprintf(stderr, "%s is a link to %s\n", myPath, buf);
- } else if (S_ISDIR(sb.st_mode)) {
- fprintf(stderr, "%s is a directory\n", myPath);
- rv = access(myPath, X_OK);
- if (rv < 0) {
- fprintf(stderr, "%s: no search permission\n", myPath);
- }
- } else {
- fprintf(stderr, "%s is a file !?!\n", myPath);
- rv = access(myPath, F_OK);
- if (rv < 0) {
- fprintf(stderr, "%s does not exist\n", myPath);
- }
- }
-
- /* chop path off one level. */
- slash = strrchr(myPath, '/');
- if (!slash)
- slash = strrchr(myPath, '\\');
- if (!slash)
- slash = myPath;
- *slash = 0;
- } while (myPath[0]);
- free(myPath);
-}
diff --git a/security/coreconf/nsinstall/pathsub.h b/security/coreconf/nsinstall/pathsub.h
deleted file mode 100644
index 718c2206f..000000000
--- a/security/coreconf/nsinstall/pathsub.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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 pathsub_h___
-#define pathsub_h___
-/*
-** Pathname subroutines.
-**
-** Brendan Eich, 8/29/95
-*/
-#include <limits.h>
-#include <sys/types.h>
-
-#if SUNOS4
-#include "sunos4.h"
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/*
- * Just keep sane lengths
- */
-#undef NAME_MAX
-#define NAME_MAX 256
-
-extern char *program;
-
-extern void fail(char *format, ...);
-extern char *getcomponent(char *path, char *name);
-extern char *ino2name(ino_t ino, char *dir);
-extern void *xmalloc(size_t size);
-extern char *xstrdup(char *s);
-extern char *xbasename(char *path);
-extern void xchdir(char *dir);
-
-/* Relate absolute pathnames from and to returning the result in outpath. */
-extern int relatepaths(char *from, char *to, char *outpath);
-
-/* NOTE: changes current working directory -- caveat emptor */
-extern void reversepath(char *inpath, char *name, int len, char *outpath);
-
-/* stats every directory in path, reports results. */
-extern void diagnosePath(const char * path);
-
-#endif /* pathsub_h___ */
diff --git a/security/coreconf/nsinstall/sunos4.h b/security/coreconf/nsinstall/sunos4.h
deleted file mode 100644
index 9bdae872c..000000000
--- a/security/coreconf/nsinstall/sunos4.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-# 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 pr_sunos4_h___
-#define pr_sunos4_h___
-
-#ifndef SVR4
-
-/*
-** Hodge podge of random missing prototypes for the Sunos4 system
-*/
-#include <stdio.h>
-#include <stdarg.h>
-#include <time.h>
-#include <limits.h>
-#include <sys/types.h>
-
-#define PATH_MAX _POSIX_PATH_MAX
-
-struct timeval;
-struct timezone;
-struct itimerval;
-struct sockaddr;
-struct stat;
-struct tm;
-
-/* ctype.h */
-extern int tolower(int);
-extern int toupper(int);
-
-/* errno.h */
-extern char *sys_errlist[];
-extern int sys_nerr;
-
-#define strerror(e) sys_errlist[((unsigned)(e) < sys_nerr) ? e : 0]
-
-extern void perror(const char *);
-
-/* getopt */
-extern char *optarg;
-extern int optind;
-extern int getopt(int argc, char **argv, char *spec);
-
-/* math.h */
-extern int srandom(long val);
-extern long random(void);
-
-/* memory.h */
-#define memmove(to,from,len) bcopy((char*)(from),(char*)(to),len)
-
-extern void bcopy(const char *, char *, int);
-
-/* signal.h */
-/*
-** SunOS4 sigaction hides interrupts by default, so we can safely define
-** SA_RESTART to 0 (HP-UX is a counter-example -- its sigaction does not
-** hide interrupts but lacks an SA_RESTART option; you must use sigvector
-** and tweak the sigcontext from within each signal handler!).
-*/
-#define SA_RESTART 0
-#define SA_SIGINFO 0
-
-/* stdio.h */
-extern int printf(const char *, ...);
-extern int fprintf(FILE *, const char *, ...);
-extern int vprintf(const char *, va_list);
-extern int vfprintf(FILE *, const char *, va_list);
-extern char *vsprintf(char *, const char *, va_list);
-extern int scanf(const char *, ...);
-extern int sscanf(const char *, const char *, ...);
-extern int fscanf(FILE *, const char *, ...);
-extern int fgetc(FILE *);
-extern int fputc(int, FILE *);
-extern int fputs(const char *, FILE *);
-extern int puts(const char *);
-extern int fread(void *, size_t, size_t, FILE *);
-extern int fwrite(const char *, int, int, FILE *);
-extern int fseek(FILE *, long, int);
-extern long ftell(FILE *);
-extern int rewind(FILE *);
-extern int fflush(FILE *);
-extern int _flsbuf(unsigned char, FILE *);
-extern int fclose(FILE *);
-extern int remove(const char *);
-extern int setvbuf(FILE *, char *, int, size_t);
-extern int system(const char *);
-extern FILE *popen(const char *, const char *);
-extern int pclose(FILE *);
-
-/* stdlib.h */
-#define strtoul strtol
-
-extern int isatty(int fildes);
-extern long strtol(const char *, char **, int);
-extern int putenv(const char *);
-extern void srand48(long);
-extern long lrand48(void);
-extern double drand48(void);
-
-/* string.h */
-extern int strcasecmp(const char *, const char *);
-extern int strncasecmp(const char *, const char *, size_t);
-extern int strcoll(const char *, const char *);
-
-/* time.h */
-extern time_t mktime(struct tm *);
-extern size_t strftime(char *, size_t, const char *, const struct tm *);
-extern int gettimeofday(struct timeval *, struct timezone *);
-extern int setitimer(int, struct itimerval *, struct itimerval *);
-extern time_t time(time_t *);
-extern time_t timegm(struct tm *);
-extern struct tm *localtime(const time_t *);
-extern struct tm *gmtime(const time_t *);
-
-/* unistd.h */
-extern int rename(const char *, const char *);
-extern int ioctl(int, int, int *arg);
-extern int connect(int, struct sockaddr *, int);
-extern int readlink(const char *, char *, int);
-extern int symlink(const char *, const char *);
-extern int ftruncate(int, off_t);
-extern int fchmod(int, mode_t);
-extern int fchown(int, uid_t, gid_t);
-extern int lstat(const char *, struct stat *);
-extern int fstat(int, struct stat *);
-extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-extern int gethostname(char *, int);
-extern char *getwd(char *);
-extern int getpagesize(void);
-
-#endif /* SVR4 */
-
-#endif /* pr_sunos4_h___ */
diff --git a/security/coreconf/outofdate.pl b/security/coreconf/outofdate.pl
deleted file mode 100755
index 1044639e8..000000000
--- a/security/coreconf/outofdate.pl
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/local/bin/perl
-#
-# 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.
-#
-
-#Input: [-d dir] foo1.java foo2.java
-#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir',
-# otherwise assumes .class files in same directory as .java files)
-#Returns: list of input arguments which are newer than corresponding class
-#files (non-existant class files are considered to be real old :-)
-
-$found = 1;
-
-if ($ARGV[0] eq '-d') {
- $classdir = $ARGV[1];
- $classdir .= "/";
- shift;
- shift;
-} else {
- $classdir = "./";
-}
-
-foreach $filename (@ARGV) {
- $classfilename = $classdir;
- $classfilename .= $filename;
- $classfilename =~ s/.java$/.class/;
- ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
- $ctime,$blksize,$blocks) = stat($filename);
- ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime,
- $ctime,$blksize,$blocks) = stat($classfilename);
-# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n";
- if ($mtime > $classmtime) {
- print $filename, " ";
- $found = 0;
- }
-}
-
-print "\n";
diff --git a/security/coreconf/platform.mk b/security/coreconf/platform.mk
deleted file mode 100644
index a4826d315..000000000
--- a/security/coreconf/platform.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" <platform> tag #
-#######################################################################
-
-PLATFORM = $(OBJDIR_NAME)
diff --git a/security/coreconf/prefix.mk b/security/coreconf/prefix.mk
deleted file mode 100644
index af1142afd..000000000
--- a/security/coreconf/prefix.mk
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" for computing program prefixes #
-#######################################################################
-
-#
-# Object prefixes
-#
-
-ifndef OBJ_PREFIX
- OBJ_PREFIX =
-endif
-
-#
-# Library suffixes
-#
-
-ifndef LIB_PREFIX
- ifeq ($(OS_ARCH), WINNT)
- LIB_PREFIX =
- else
- LIB_PREFIX = lib
- endif
-endif
-
-
-ifndef DLL_PREFIX
- ifeq ($(OS_ARCH), WINNT)
- DLL_PREFIX =
- else
- DLL_PREFIX = lib
- endif
-endif
-
-
-ifndef IMPORT_LIB_PREFIX
- IMPORT_LIB_PREFIX =
-endif
-
-
-ifndef PURE_LIB_PREFIX
- ifeq ($(OS_ARCH), WINNT)
- PURE_LIB_PREFIX =
- else
- PURE_LIB_PREFIX = purelib
- endif
-endif
-
-#
-# Program prefixes
-#
-
-ifndef PROG_PREFIX
- PROG_PREFIX =
-endif
-
diff --git a/security/coreconf/release.pl b/security/coreconf/release.pl
deleted file mode 100755
index 0a16727e1..000000000
--- a/security/coreconf/release.pl
+++ /dev/null
@@ -1,136 +0,0 @@
-#! /usr/local/bin/perl
-#
-# 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.
-#
-
-
-require('coreconf.pl');
-
-#######-- read in variables on command line into %var
-
-$var{ZIP} = "zip";
-
-&parse_argv;
-
-
-######-- Do the packaging of jars.
-
-foreach $jarfile (split(/ /,$var{FILES}) ) {
- print STDERR "---------------------------------------------\n";
- print STDERR "Packaging jar file $jarfile....\n";
-
- $jarinfo = $var{$jarfile};
-
- ($jardir,$jaropts) = split(/\|/,$jarinfo);
-
- $zipoptions = "-T";
- if ($jaropts =~ /a/) {
- if ($var{OS_ARCH} eq 'WINNT') {
- $zipoptions .= ' -ll';
- }
- }
-
-# don't compress jar files containing classes since some java
-# implementations do not implement decompression correctly
- if ( ($jarfile eq 'xpclass.jar') || ($jarfile eq 'xpclass_dbg.jar') ) {
- $zipoptions .= ' -0';
- }
-
-
-# just in case the directory ends in a /, remove it
- if ($jardir =~ /\/$/) {
- chop $jardir;
- }
-
- $dirdepth --;
-
- print STDERR "jardir = $jardir\n";
- system("ls $jardir");
-
- if (-d $jardir) {
-
-
-# count the number of slashes
-
- $slashes =0;
-
- foreach $i (split(//,$jardir)) {
- if ($i =~ /\//) {
- $slashes++;
- }
- }
-
- $dotdots =0;
-
- foreach $i (split(m|/|,$jardir)) {
- if ($i eq '..') {
- $dotdots ++;
- }
- }
-
- $dirdepth = ($slashes +1) - (2*$dotdots);
-
- print STDERR "changing dir $jardir\n";
- chdir($jardir);
- print STDERR "making dir META-INF\n";
- mkdir("META-INF",0755);
-
- $filelist = "";
- opendir(DIR,".");
- while ($_ = readdir(DIR)) {
- if (! ( ($_ eq '.') || ($_ eq '..'))) {
- if ( $jaropts =~ /i/) {
- if (! /^include$/) {
- $filelist .= "$_ ";
- }
- }
- else {
- $filelist .= "$_ ";
- }
- }
- }
- closedir(DIR);
-
- print STDERR "zip $zipoptions -r $jarfile $filelist\n";
- system("zip $zipoptions -r $jarfile $filelist");
- rmdir("META-INF");
- for $i (1 .. $dirdepth) {
- chdir("..");
- print STDERR "chdir ..\n";
- }
- }
- else {
- print STDERR "Directory $jardir doesn't exist\n";
- }
-
-}
-
diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk
deleted file mode 100644
index 9900c4702..000000000
--- a/security/coreconf/rules.mk
+++ /dev/null
@@ -1,971 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-### ###
-### R U L E S O F E N G A G E M E N T ###
-### ###
-#######################################################################
-
-#######################################################################
-# Double-Colon rules for utilizing the binary release model. #
-#######################################################################
-
-all:: export libs program install
-
-ifeq ($(AUTOCLEAN),1)
-autobuild:: clean export private_export libs program install
-else
-autobuild:: export private_export libs program install
-endif
-
-platform::
- @echo $(OBJDIR_NAME)
-
-
-#
-# IMPORTS will always be associated with a component. Therefore,
-# the "import" rule will always change directory to the top-level
-# of a component, and traverse the IMPORTS keyword from the
-# "manifest.mn" file located at this level only.
-#
-# note: if there is a trailing slash, the component will be appended
-# (see import.pl - only used for xpheader.jar)
-
-import::
- @echo "== import.pl =="
- @perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/import.pl \
- "RELEASE_TREE=$(RELEASE_TREE)" \
- "IMPORTS=$(IMPORTS)" \
- "VERSION=$(VERSION)" \
- "OS_ARCH=$(OS_ARCH)" \
- "PLATFORM=$(PLATFORM)" \
- "OVERRIDE_IMPORT_CHECK=$(OVERRIDE_IMPORT_CHECK)" \
- "ALLOW_VERSION_OVERRIDE=$(ALLOW_VERSION_OVERRIDE)" \
- "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \
- "SOURCE_MD_DIR=$(SOURCE_MD_DIR)" \
- "SOURCE_XP_DIR=$(SOURCE_XP_DIR)" \
- "FILES=$(IMPORT_XPCLASS_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \
- "$(IMPORT_XPCLASS_JAR)=$(IMPORT_XP_DIR)|$(IMPORT_XPCLASS_DIR)|" \
- "$(XPHEADER_JAR)=$(IMPORT_XP_DIR)|$(SOURCE_XP_DIR)/public/|v" \
- "$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|" \
- "$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|"
-
-export::
- +$(LOOP_OVER_DIRS)
-
-private_export::
- +$(LOOP_OVER_DIRS)
-
-release_export::
- +$(LOOP_OVER_DIRS)
-
-release_classes::
- +$(LOOP_OVER_DIRS)
-
-libs program install:: $(TARGETS)
-ifdef LIBRARY
- $(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR)
-endif
-ifdef SHARED_LIBRARY
- $(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR)
-endif
-ifdef IMPORT_LIBRARY
- $(INSTALL) -m 775 $(IMPORT_LIBRARY) $(SOURCE_LIB_DIR)
-endif
-ifdef PURE_LIBRARY
- $(INSTALL) -m 775 $(PURE_LIBRARY) $(SOURCE_LIB_DIR)
-endif
-ifdef PROGRAM
- $(INSTALL) -m 775 $(PROGRAM) $(SOURCE_BIN_DIR)
-endif
-ifdef PROGRAMS
- $(INSTALL) -m 775 $(PROGRAMS) $(SOURCE_BIN_DIR)
-endif
- +$(LOOP_OVER_DIRS)
-
-tests::
- +$(LOOP_OVER_DIRS)
-
-clean clobber::
- rm -rf $(ALL_TRASH)
- +$(LOOP_OVER_DIRS)
-
-realclean clobber_all::
- rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
- +$(LOOP_OVER_DIRS)
-
-#ifdef ALL_PLATFORMS
-#all_platforms:: $(NFSPWD)
-# @d=`$(NFSPWD)`; \
-# if test ! -d LOGS; then rm -rf LOGS; mkdir LOGS; fi; \
-# for h in $(PLATFORM_HOSTS); do \
-# echo "On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
-# rsh $$h -n "(chdir $$d; \
-# $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \
-# echo DONE) &" 2>&1 > LOGS/$$h.pid & \
-# sleep 1; \
-# done
-#
-#$(NFSPWD):
-# cd $(@D); $(MAKE) $(@F)
-#endif
-
-#######################################################################
-# Double-Colon rules for populating the binary release model. #
-#######################################################################
-
-
-release_clean::
- rm -rf $(SOURCE_XP_DIR)/release/$(RELEASE_MD_DIR)
-
-release:: release_clean release_export release_classes release_policy release_md release_jars release_cpdistdir
-
-release_cpdistdir::
- @echo "== cpdist.pl =="
- @perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/cpdist.pl \
- "RELEASE_TREE=$(RELEASE_TREE)" \
- "CORE_DEPTH=$(CORE_DEPTH)" \
- "MODULE=${MODULE}" \
- "OS_ARCH=$(OS_ARCH)" \
- "RELEASE=$(RELEASE)" \
- "PLATFORM=$(PLATFORM)" \
- "RELEASE_VERSION=$(RELEASE_VERSION)" \
- "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \
- "RELEASE_XP_DIR=$(RELEASE_XP_DIR)" \
- "RELEASE_MD_DIR=$(RELEASE_MD_DIR)" \
- "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR) XP_FILES MD_FILES" \
- "$(XPCLASS_JAR)=$(SOURCE_RELEASE_CLASSES_DIR)|x"\
- "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_CLASSES_DBG_DIR)|x"\
- "$(XPHEADER_JAR)=$(SOURCE_RELEASE_XPHEADERS_DIR)|x" \
- "$(MDHEADER_JAR)=$(SOURCE_RELEASE_MDHEADERS_DIR)|m" \
- "$(MDBINARY_JAR)=$(SOURCE_RELEASE_MD_DIR)|m" \
- "XP_FILES=$(XP_FILES)|xf" \
- "MD_FILES=$(MD_FILES)|mf"
-
-
-# $(SOURCE_RELEASE_xxx_JAR) is a name like yyy.jar
-# $(SOURCE_RELEASE_xx_DIR) is a name like
-
-release_jars::
- @echo "== release.pl =="
- @perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/release.pl \
- "RELEASE_TREE=$(RELEASE_TREE)" \
- "PLATFORM=$(PLATFORM)" \
- "OS_ARCH=$(OS_ARCH)" \
- "RELEASE_VERSION=$(RELEASE_VERSION)" \
- "SOURCE_RELEASE_DIR=$(SOURCE_RELEASE_DIR)" \
- "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \
- "$(XPCLASS_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)|b"\
- "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)|b"\
- "$(XPHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_XPHEADERS_DIR)|a" \
- "$(MDHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MDHEADERS_DIR)|a" \
- "$(MDBINARY_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MD_DIR)|bi"
-
-# Rules for releasing classes.
-# We have to do some REALLY gross stuff to deal with multiple classes in one
-# file, as well as nested classes, which have a filename of the form
-# ContainingClass$NestedClass.class.
-# RELEASE_CLASSES simply performs a required patsubst on CLASSES
-# RELEASE_CLASS_PATH is RELEASE_CLASSES with the path (in ns/dist) prepended
-# RELEASE_NESTED is all the nested classes in RELEASE_CLASS_PATH. We use a
-# foreach and wildcard to get all the files that start out like one of the
-# class files, then have a $. So, for each class file, we look for file$*
-# RELEASE_FILES is the combination of RELEASE_NESTED and the class files
-# specified by RELEASE_CLASSES which have .class appended to them. Note that
-# the RELEASE_NESTED don't need to have .class appended because they were
-# read in from the wildcard as complete filenames.
-#
-# The _DBG versions are the debuggable ones.
-ifneq ($(CLASSES),)
-
-RELEASE_CLASSES := $(patsubst %,%,$(CLASSES))
-
-ifdef BUILD_OPT
- RELEASE_CLASS_PATH := $(patsubst %,$(SOURCE_CLASSES_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES))
- RELEASE_NESTED := $(foreach file,$(RELEASE_CLASS_PATH),$(wildcard $(file)$$*))
- RELEASE_FILES := $(patsubst %,%.class,$(RELEASE_CLASS_PATH)) $(RELEASE_NESTED)
-else
- RELEASE_DBG_CLASS_PATH:= $(patsubst %,$(SOURCE_CLASSES_DBG_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES))
- RELEASE_DBG_NESTED := $(foreach file,$(RELEASE_DBG_CLASS_PATH),$(wildcard $(file)$$*))
- RELEASE_DBG_FILES := $(patsubst %,%.class,$(RELEASE_DBG_CLASS_PATH)) $(RELEASE_DBG_NESTED)
-endif
-
-# Substitute \$ for $ so the shell doesn't choke
-ifdef BUILD_OPT
-release_classes::
- $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)/$(PACKAGE)
-else
-release_classes::
- $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_DBG_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)/$(PACKAGE)
-endif
-
-endif
-
-ifneq ($(POLICY),)
-release_policy::
-ifdef LIBRARY
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $(LIBRARY)
-endif
-ifdef SHARED_LIBRARY
-ifdef COMPRESS_TARGET
- if test -f $(SHARED_LIBRARY).bak; then \
- cp $(SHARED_LIBRARY).bak $(SHARED_LIBRARY); \
- fi;
-endif
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $(SHARED_LIBRARY)
-ifdef COMPRESS_TARGET
- $(COMPRESS_TARGET) $(SHARED_LIBRARY)
-endif
-endif
-ifdef IMPORT_LIBRARY
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $(IMPORT_LIBRARY)
-endif
-ifdef PURE_LIBRARY
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PURE_LIBRARY)
-endif
-ifdef PROGRAM
-ifdef COMPRESS_TARGET
- if test -f $(PROGRAM).bak; then \
- cp $(PROGRAM).bak $(PROGRAM); \
- fi;
-endif
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PROGRAM)
-ifdef COMPRESS_TARGET
- $(COMPRESS_TARGET) $(PROGRAM)
-endif
-endif
-ifdef PROGRAMS
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PROGRAMS)
-endif
- +$(LOOP_OVER_DIRS)
-else
-release_policy::
- +$(LOOP_OVER_DIRS)
-endif
-
-release_md::
-ifdef LIBRARY
- $(INSTALL) -m 444 $(LIBRARY) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
-endif
-ifdef SHARED_LIBRARY
- $(INSTALL) -m 555 $(SHARED_LIBRARY) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
-endif
-ifdef IMPORT_LIBRARY
- $(INSTALL) -m 555 $(IMPORT_LIBRARY) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
-endif
-ifdef PURE_LIBRARY
- $(INSTALL) -m 555 $(PURE_LIBRARY) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
-endif
-ifdef PROGRAM
- $(INSTALL) -m 555 $(PROGRAM) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)
-endif
-ifdef PROGRAMS
- $(INSTALL) -m 555 $(PROGRAMS) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)
-endif
- +$(LOOP_OVER_DIRS)
-
-
-alltags:
- rm -f TAGS
- find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
- find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
-
-$(PROGRAM): $(OBJS) $(EXTRA_LIBS)
- @$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH),WINNT)
-ifeq ($(OS_TARGET),WIN16)
- echo system windows >w16link
- echo option map >>w16link
- echo option oneautodata >>w16link
- echo option heapsize=32K >>w16link
- echo debug watcom all >>w16link
- echo name $@ >>w16link
- echo file >>w16link
- echo $(W16OBJS) , >>w16link
- echo $(W16LDFLAGS) >> w16link
- echo library >>w16link
- echo winsock.lib >>w16link
- $(LINK) @w16link.
- rm w16link
-else
- $(MKPROG) $(OBJS) -Fe$@ -link $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-endif
-else
- $(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-endif
-ifneq ($(POLICY),)
-#ifdef COMPRESS_TARGET
-# $(COMPRESS_TARGET)
-# We're going to cache a copy to keep around
-# cp $(PROGRAM) $(PROGRAM).org
-#endif
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $@
-endif
-
-$(LIBRARY): $(OBJS)
- @$(MAKE_OBJDIR)
- rm -f $@
- $(AR) $(OBJS)
- $(RANLIB) $@
-
-ifeq ($(OS_TARGET), WIN16)
-$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
- wlib +$(SHARED_LIBRARY)
-endif
-
-$(SHARED_LIBRARY): $(OBJS)
- @$(MAKE_OBJDIR)
- rm -f $@
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
- echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
- nm -B -C -g $(OBJS) \
- | awk '/ [T,D] / {print $$3}' \
- | sed -e 's/^\.//' \
- | sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
- $(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
- -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
-else
-ifeq ($(OS_ARCH), WINNT)
-ifeq ($(OS_TARGET), WIN16)
- echo system windows dll initinstance >w16link
- echo option map >>w16link
- echo option oneautodata >>w16link
- echo option heapsize=32K >>w16link
- echo debug watcom all >>w16link
- echo name $@ >>w16link
- echo file >>w16link
- echo $(W16OBJS) >>w16link
- echo $(W16LIBS) >>w16link
- echo libfile libentry >>w16link
- $(LINK) @w16link.
- rm w16link
-else
- $(LINK_DLL) -MAP $(DLLBASE) $(OBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS)
-endif
-else
- $(MKSHLIB) -o $@ $(OBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
- chmod +x $@
-endif
-endif
-ifneq ($(POLICY),)
-#ifdef COMPRESS_TARGET
-# $(COMPRESS_TARGET)
-# cp $@ $@.org
-#endif
- -$(PLCYPATCH) $(PLCYPATCH_ARGS) $@
-endif
-
-$(PURE_LIBRARY):
- rm -f $@
-ifneq ($(OS_ARCH), WINNT)
- $(AR) $(OBJS)
-endif
- $(RANLIB) $@
-
-ifeq ($(OS_ARCH), WINNT)
-$(RES): $(RESNAME)
- @$(MAKE_OBJDIR)
- $(RC) -Fo$(RES) $(RESNAME)
- @echo $(RES) finished
-endif
-
-$(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX)
- @$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH),WINNT)
- $(MKPROG) $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) -Fe$@ -link \
- $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-else
- $(MKPROG) -o $@ $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) \
- $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-endif
-
-ifdef HAVE_PURIFY
-$(OBJDIR)/$(PROG_PREFIX)%.pure: $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX)
- @$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH),WINNT)
- $(PURIFY) $(CC) -Fo$@ -c $(CFLAGS) $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) $(PURELDFLAGS)
-else
- $(PURIFY) $(CC) -o $@ $(CFLAGS) $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) $(PURELDFLAGS)
-endif
-endif
-
-WCCFLAGS1 := $(subst /,\\,$(CFLAGS))
-WCCFLAGS2 := $(subst -I,-i=,$(WCCFLAGS1))
-WCCFLAGS3 := $(subst -D,-d,$(WCCFLAGS2))
-
-$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c
- @$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH), WINNT)
-ifeq ($(OS_TARGET), WIN16)
- echo $(WCCFLAGS3) >w16wccf
- $(CC) -zq -fo$(OBJDIR)\\$(PROG_PREFIX)$*$(OBJ_SUFFIX) @w16wccf $*.c
- rm w16wccf
-else
- $(CC) -Fo$@ -c $(CFLAGS) $*.c
-endif
-else
- $(CC) -o $@ -c $(CFLAGS) $*.c
-endif
-
-ifneq ($(OS_ARCH), WINNT)
-$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s
- @$(MAKE_OBJDIR)
- $(AS) -o $@ $(ASFLAGS) -c $*.s
-endif
-
-$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.asm
- @$(MAKE_OBJDIR)
- $(AS) -Fo$@ $(ASFLAGS) -c $*.asm
-
-$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.S
- @$(MAKE_OBJDIR)
- $(AS) -o $@ $(ASFLAGS) -c $*.S
-
-$(OBJDIR)/$(PROG_PREFIX)%: %.cpp
- @$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH), WINNT)
- $(CCC) -Fo$@ -c $(CFLAGS) $<
-else
- $(CCC) -o $@ -c $(CFLAGS) $<
-endif
-
-#
-# Please keep the next two rules in sync.
-#
-$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cc
- @$(MAKE_OBJDIR)
- $(CCC) -o $@ -c $(CFLAGS) $*.cc
-
-$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cpp
- @$(MAKE_OBJDIR)
-ifdef STRICT_CPLUSPLUS_SUFFIX
- echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > $(OBJDIR)/t_$*.cc
- $(CCC) -o $@ -c $(CFLAGS) $(OBJDIR)/t_$*.cc
- rm -f $(OBJDIR)/t_$*.cc
-else
-ifeq ($(OS_ARCH),WINNT)
- $(CCC) -Fo$@ -c $(CFLAGS) $*.cpp
-else
- $(CCC) -o $@ -c $(CFLAGS) $*.cpp
-endif
-endif #STRICT_CPLUSPLUS_SUFFIX
-
-%.i: %.cpp
-ifeq ($(OS_TARGET), WIN16)
- echo $(WCCFLAGS3) >w16wccf
- $(CCC) -pl -fo=$* @w16wccf $*.cpp
- rm w16wccf
-else
- $(CCC) -C -E $(CFLAGS) $< > $*.i
-endif
-
-%.i: %.c
-ifeq ($(OS_TARGET), WIN16)
- echo $(WCCFLAGS3) >w16wccf
- $(CC) -pl -fo=$* @w16wccf $*.c
- rm w16wccf
-else
-ifeq ($(OS_ARCH),WINNT)
- $(CC) -C /P $(CFLAGS) $<
-else
- $(CC) -C -E $(CFLAGS) $< > $*.i
-endif
-endif
-
-ifneq ($(OS_ARCH), WINNT)
-%.i: %.s
- $(CC) -C -E $(CFLAGS) $< > $*.i
-endif
-
-%: %.pl
- rm -f $@; cp $*.pl $@; chmod +x $@
-
-%: %.sh
- rm -f $@; cp $*.sh $@; chmod +x $@
-
-ifdef DIRS
-$(DIRS)::
- @if test -d $@; then \
- set $(EXIT_ON_ERROR); \
- echo "cd $@; $(MAKE)"; \
- cd $@; $(MAKE); \
- set +e; \
- else \
- echo "Skipping non-directory $@..."; \
- fi; \
- $(CLICK_STOPWATCH)
-endif
-
-################################################################################
-# Bunch of things that extend the 'export' rule (in order):
-################################################################################
-
-$(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR)::
- @if test ! -d $@; then \
- echo Creating $@; \
- rm -rf $@; \
- $(NSINSTALL) -D $@; \
- fi
-
-################################################################################
-## IDL_GEN
-
-ifneq ($(IDL_GEN),)
-
-#export::
-# $(IDL2JAVA) $(IDL_GEN)
-
-#all:: export
-
-#clobber::
-# rm -f $(IDL_GEN:.idl=.class) # XXX wrong!
-
-endif
-
-################################################################################
-### JSRCS -- for compiling java files
-###
-### NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined,
-### replace $(CORE_DEPTH) with $(NETLIBDEPTH).
-###
-
-ifneq ($(JSRCS),)
-ifneq ($(JAVAC),)
-ifdef NETLIBDEPTH
- CORE_DEPTH := $(NETLIBDEPTH)
-endif
-
-JAVA_EXPORT_SRCS=$(shell perl $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) -d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS))
-
-export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
-ifneq ($(JAVA_EXPORT_SRCS),)
- $(JAVAC) $(JAVA_EXPORT_SRCS)
-endif
-
-all:: export
-
-clobber::
- rm -f $(SOURCE_XP_DIR)/classes/$(PACKAGE)/*.class
-
-endif
-endif
-
-#
-# JDIRS -- like JSRCS, except you can give a list of directories and it will
-# compile all the out-of-date java files in those directories.
-#
-# NOTE: recursing through these can speed things up, but they also cause
-# some builds to run out of memory
-#
-# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined,
-# replace $(CORE_DEPTH) with $(NETLIBDEPTH).
-#
-ifdef JDIRS
-ifneq ($(JAVAC),)
-ifdef NETLIBDEPTH
- CORE_DEPTH := $(NETLIBDEPTH)
-endif
-
-export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
- @for d in $(JDIRS); do \
- if test -d $$d; then \
- set $(EXIT_ON_ERROR); \
- files=`echo $$d/*.java`; \
- list=`perl $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) \
- -d $(JAVA_DESTPATH)/$(PACKAGE) $$files`; \
- if test "$${list}x" != "x"; then \
- echo Building all java files in $$d; \
- echo $(JAVAC) $$list; \
- $(JAVAC) $$list; \
- fi; \
- set +e; \
- else \
- echo "Skipping non-directory $$d..."; \
- fi; \
- $(CLICK_STOPWATCH); \
- done
-endif
-endif
-
-#
-# JDK_GEN -- for generating "old style" native methods
-#
-# Generate JDK Headers and Stubs into the '_gen' and '_stubs' directory
-#
-# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined,
-# replace $(CORE_DEPTH) with $(NETLIBDEPTH).
-#
-ifneq ($(JDK_GEN),)
-ifneq ($(JAVAH),)
-ifdef NSBUILDROOT
- INCLUDES += -I$(JDK_GEN_DIR) -I$(SOURCE_XP_DIR)
-else
- INCLUDES += -I$(JDK_GEN_DIR)
-endif
-
-ifdef NETLIBDEPTH
- CORE_DEPTH := $(NETLIBDEPTH)
-endif
-
-JDK_PACKAGE_CLASSES := $(JDK_GEN)
-JDK_PATH_CLASSES := $(subst .,/,$(JDK_PACKAGE_CLASSES))
-JDK_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES))
-JDK_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES))
-JDK_HEADER_CFILES := $(patsubst %,$(JDK_GEN_DIR)/%.h,$(JDK_GEN))
-JDK_STUB_CFILES := $(patsubst %,$(JDK_STUB_DIR)/%.c,$(JDK_GEN))
-
-$(JDK_HEADER_CFILES): $(JDK_HEADER_CLASSFILES)
-$(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES)
-
-export::
- @echo Generating/Updating JDK headers
- $(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES)
- @echo Generating/Updating JDK stubs
- $(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES)
-ifndef NO_MAC_JAVA_SHIT
- @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \
- echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \
- echo "!!! This allows us to automatically update generated files for the mac."; \
- echo "!!! If you see any modified files there, please check them in."; \
- fi
- @echo Generating/Updating JDK headers for the Mac
- $(JAVAH) -mac -d $(CORE_DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES)
- @echo Generating/Updating JDK stubs for the Mac
- $(JAVAH) -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES)
-endif
-endif
-endif
-
-#
-# JRI_GEN -- for generating "old style" JRI native methods
-#
-# Generate JRI Headers and Stubs into the 'jri' directory
-#
-# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined,
-# replace $(CORE_DEPTH) with $(NETLIBDEPTH).
-#
-ifneq ($(JRI_GEN),)
-ifneq ($(JAVAH),)
-ifdef NSBUILDROOT
- INCLUDES += -I$(JRI_GEN_DIR) -I$(SOURCE_XP_DIR)
-else
- INCLUDES += -I$(JRI_GEN_DIR)
-endif
-
-ifdef NETLIBDEPTH
- CORE_DEPTH := $(NETLIBDEPTH)
-endif
-
-JRI_PACKAGE_CLASSES := $(JRI_GEN)
-JRI_PATH_CLASSES := $(subst .,/,$(JRI_PACKAGE_CLASSES))
-JRI_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES))
-JRI_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES))
-JRI_HEADER_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.h,$(JRI_GEN))
-JRI_STUB_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.c,$(JRI_GEN))
-
-$(JRI_HEADER_CFILES): $(JRI_HEADER_CLASSFILES)
-$(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES)
-
-export::
- @echo Generating/Updating JRI headers
- $(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
- @echo Generating/Updating JRI stubs
- $(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
-ifndef NO_MAC_JAVA_SHIT
- @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \
- echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \
- echo "!!! This allows us to automatically update generated files for the mac."; \
- echo "!!! If you see any modified files there, please check them in."; \
- fi
- @echo Generating/Updating JRI headers for the Mac
- $(JAVAH) -jri -mac -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
- @echo Generating/Updating JRI stubs for the Mac
- $(JAVAH) -jri -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
-endif
-endif
-endif
-
-#
-# JNI_GEN -- for generating JNI native methods
-#
-# Generate JNI Headers into the 'jni' directory
-#
-ifneq ($(JNI_GEN),)
-ifneq ($(JAVAH),)
-JNI_HEADERS := $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN))
-
-export::
- @if test ! -d $(JNI_GEN_DIR); then \
- echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \
- $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \
- else \
- echo "Checking for out of date header files" ; \
- cmd="perl $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG) \
- -d $(JAVA_DESTPATH) $(JNI_GEN)"; \
- echo $$cmd; \
- list=`$$cmd`; \
- if test "$${list}x" != "x"; then \
- echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $$list; \
- $(JAVAH) -jni -d $(JNI_GEN_DIR) $$list; \
- fi \
- fi
-endif
-endif
-
-#
-# JMC_EXPORT -- for declaring which java classes are to be exported for jmc
-#
-ifneq ($(JMC_EXPORT),)
-JMC_EXPORT_PATHS := $(subst .,/,$(JMC_EXPORT))
-JMC_EXPORT_FILES := $(patsubst %,$(JAVA_DESTPATH)/$(PACKAGE)/%.class,$(JMC_EXPORT_PATHS))
-
-#
-# We're doing NSINSTALL -t here (copy mode) because calling INSTALL will pick up
-# your NSDISTMODE and make links relative to the current directory. This is a
-# problem because the source isn't in the current directory:
-#
-export:: $(JMC_EXPORT_FILES) $(JMCSRCDIR)
- $(NSINSTALL) -t -m 444 $(JMC_EXPORT_FILES) $(JMCSRCDIR)
-endif
-
-#
-# JMC_GEN -- for generating java modules
-#
-# Provide default export & install rules when using JMC_GEN
-#
-ifneq ($(JMC_GEN),)
-ifneq ($(JMC),)
- INCLUDES += -I$(JMC_GEN_DIR) -I.
- JMC_HEADERS := $(patsubst %,$(JMC_GEN_DIR)/%.h,$(JMC_GEN))
- JMC_STUBS := $(patsubst %,$(JMC_GEN_DIR)/%.c,$(JMC_GEN))
- JMC_OBJS := $(patsubst %,$(OBJDIR)/%$(OBJ_SUFFIX),$(JMC_GEN))
-
-$(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class
- $(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=)
-
-$(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class
- $(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=)
-
-$(OBJDIR)/M%$(OBJ_SUFFIX): $(JMC_GEN_DIR)/M%.h $(JMC_GEN_DIR)/M%.c
- @$(MAKE_OBJDIR)
- $(CC) -o $@ -c $(CFLAGS) $(JMC_GEN_DIR)/M$*.c
-
-export:: $(JMC_HEADERS) $(JMC_STUBS)
-endif
-endif
-
-#
-# Copy each element of EXPORTS to $(SOURCE_XP_DIR)/public/$(MODULE)/
-#
-PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/$(MODULE)
-ifeq ($(OS_ARCH),WINNT)
-ifeq ($(OS_TARGET),WIN16)
-PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/win16
-endif
-endif
-
-ifneq ($(EXPORTS),)
-$(PUBLIC_EXPORT_DIR)::
- @if test ! -d $@; then \
- echo Creating $@; \
- $(NSINSTALL) -D $@; \
- fi
-
-export:: $(EXPORTS) $(PUBLIC_EXPORT_DIR)
- $(INSTALL) -m 444 $(EXPORTS) $(PUBLIC_EXPORT_DIR)
-endif
-
-# Duplicate export rule for private exports, with different directories
-
-PRIVATE_EXPORT_DIR = $(SOURCE_XP_DIR)/private/$(MODULE)
-ifeq ($(OS_ARCH),WINNT)
-ifeq ($(OS_TARGET),WIN16)
-PRIVATE_EXPORT_DIR = $(SOURCE_XP_DIR)/public/win16
-endif
-endif
-
-ifneq ($(PRIVATE_EXPORTS),)
-$(PRIVATE_EXPORT_DIR)::
- @if test ! -d $@; then \
- echo Creating $@; \
- $(NSINSTALL) -D $@; \
- fi
-
-private_export:: $(PRIVATE_EXPORTS) $(PRIVATE_EXPORT_DIR)
- $(INSTALL) -m 444 $(PRIVATE_EXPORTS) $(PRIVATE_EXPORT_DIR)
-else
-private_export::
- @echo There are no private exports.;
-endif
-
-##########################################################################
-### RULES FOR RUNNING REGRESSION SUITE TESTS
-### REQUIRES 'REGRESSION_SPEC' TO BE SET TO THE NAME OF A REGRESSION SPECFILE
-### AND RESULTS_SUBDIR TO BE SET TO SOMETHING LIKE SECURITY/PKCS5
-##########################################################################
-
-TESTS_DIR = $(RESULTS_DIR)/$(RESULTS_SUBDIR)/$(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)
-
-ifneq ($(REGRESSION_SPEC),)
-tests:: $(REGRESSION_SPEC)
- cd $(PLATFORM); \
- ../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS); \
- if test ! -d $(TESTS_DIR); then \
- echo Creating $(TESTS_DIR); \
- $(NSINSTALL) -D $(TESTS_DIR); \
- fi
-ifneq ($(BUILD_OPT),)
- $(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).sum $(TESTS_DIR); \
- $(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).htm $(TESTS_DIR); \
- echo "Please now make sure your results files are copied to $(TESTS_DIR), "; \
- echo "then run 'reporter specfile=$(RESULTS_DIR)/rptspec'"
-endif
-else
-tests::
- @echo Error: you didn't specify REGRESSION_SPEC in your manifest.mn file!;
-endif
-
-
-# Duplicate export rule for releases, with different directories
-
-ifneq ($(EXPORTS),)
-$(SOURCE_RELEASE_XP_DIR)/include::
- @if test ! -d $@; then \
- echo Creating $@; \
- $(NSINSTALL) -D $@; \
- fi
-
-release_export:: $(EXPORTS) $(SOURCE_RELEASE_XP_DIR)/include
- $(INSTALL) -m 444 $(EXPORTS) $(SOURCE_RELEASE_XP_DIR)/include
-endif
-
-
-
-
-################################################################################
-
--include $(DEPENDENCIES)
-
-ifneq ($(OS_ARCH),WINNT)
-# Can't use sed because of its 4000-char line length limit, so resort to perl
-.DEFAULT:
- @perl -e ' \
- open(MD, "< $(DEPENDENCIES)"); \
- while (<MD>) { \
- if (m@ \.*/*$< @) { \
- $$found = 1; \
- last; \
- } \
- } \
- if ($$found) { \
- print "Removing stale dependency $< from $(DEPENDENCIES)\n"; \
- seek(MD, 0, 0); \
- $$tmpname = "$(OBJDIR)/fix.md" . $$$$; \
- open(TMD, "> " . $$tmpname); \
- while (<MD>) { \
- s@ \.*/*$< @ @; \
- if (!print TMD "$$_") { \
- unlink(($$tmpname)); \
- exit(1); \
- } \
- } \
- close(TMD); \
- if (!rename($$tmpname, "$(DEPENDENCIES)")) { \
- unlink(($$tmpname)); \
- } \
- } elsif ("$<" ne "$(DEPENDENCIES)") { \
- print "$(MAKE): *** No rule to make target $<. Stop.\n"; \
- exit(1); \
- }'
-endif
-
-#############################################################################
-# X dependency system
-#############################################################################
-
-ifdef MKDEPENDENCIES
-
-# For Windows, $(MKDEPENDENCIES) must be -included before including rules.mk
-
-$(MKDEPENDENCIES)::
- @$(MAKE_OBJDIR)
- touch $(MKDEPENDENCIES)
- chmod u+w $(MKDEPENDENCIES)
-#on NT, the preceeding touch command creates a read-only file !?!?!
-#which is why we have to explicitly chmod it.
- $(MKDEPEND) -p$(OBJDIR_NAME)/ -o'$(OBJ_SUFFIX)' -f$(MKDEPENDENCIES) \
-$(NOMD_CFLAGS) $(YOPT) $(CSRCS) $(CPPSRCS) $(ASFILES)
-
-$(MKDEPEND):: $(MKDEPEND_DIR)/*.c $(MKDEPEND_DIR)/*.h
- cd $(MKDEPEND_DIR); $(MAKE)
-
-ifdef OBJS
-depend:: $(MKDEPEND) $(MKDEPENDENCIES)
-else
-depend::
-endif
- +$(LOOP_OVER_DIRS)
-
-dependclean::
- rm -f $(MKDEPENDENCIES)
- +$(LOOP_OVER_DIRS)
-
-#-include $(NSINSTALL_DIR)/$(OBJDIR)/depend.mk
-
-else
-depend::
-endif
-
-################################################################################
-# Special gmake rules.
-################################################################################
-
-#
-# Re-define the list of default suffixes, so gmake won't have to churn through
-# hundreds of built-in suffix rules for stuff we don't need.
-#
-.SUFFIXES:
-.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm
-
-#
-# Don't delete these files if we get killed.
-#
-.PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS) $(JNI_HEADERS)
-
-#
-# Fake targets. Always run these rules, even if a file/directory with that
-# name already exists.
-#
-.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs realclean release $(OBJDIR) $(DIRS)
-
diff --git a/security/coreconf/ruleset.mk b/security/coreconf/ruleset.mk
deleted file mode 100644
index 16c19bc7b..000000000
--- a/security/coreconf/ruleset.mk
+++ /dev/null
@@ -1,362 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# #
-# Parameters to this makefile (set these in this file): #
-# #
-# a) #
-# TARGETS -- the target to create #
-# (defaults to $LIBRARY $PROGRAM) #
-# b) #
-# DIRS -- subdirectories for make to recurse on #
-# (the 'all' rule builds $TARGETS $DIRS) #
-# c) #
-# CSRCS, CPPSRCS -- .c and .cpp files to compile #
-# (used to define $OBJS) #
-# d) #
-# PROGRAM -- the target program name to create from $OBJS #
-# ($OBJDIR automatically prepended to it) #
-# e) #
-# LIBRARY -- the target library name to create from $OBJS #
-# ($OBJDIR automatically prepended to it) #
-# f) #
-# JSRCS -- java source files to compile into class files #
-# (if you don't specify this it will default #
-# to *.java) #
-# g) #
-# PACKAGE -- the package to put the .class files into #
-# (e.g. netscape/applet) #
-# (NOTE: the default definition for this may be #
-# overridden if "jdk.mk" is included) #
-# h) #
-# JMC_EXPORT -- java files to be exported for use by JMC_GEN #
-# (this is a list of Class names) #
-# i) #
-# JRI_GEN -- files to run through javah to generate headers #
-# and stubs #
-# (output goes into the _jri sub-dir) #
-# j) #
-# JMC_GEN -- files to run through jmc to generate headers #
-# and stubs #
-# (output goes into the _jmc sub-dir) #
-# k) #
-# JNI_GEN -- files to run through javah to generate headers #
-# (output goes into the _jni sub-dir) #
-# #
-#######################################################################
-
-#
-# At this time, the CPU_TAG value is actually assigned.
-#
-
-CPU_TAG =
-
-#
-# When the processor is NOT 386-based on Windows NT, override the
-# value of $(CPU_TAG).
-#
-ifeq ($(OS_ARCH), WINNT)
- ifneq ($(CPU_ARCH),x386)
- CPU_TAG = _$(CPU_ARCH)
- endif
-endif
-
-#
-# Always set CPU_TAG on Linux.
-#
-ifeq ($(OS_ARCH), Linux)
- CPU_TAG = _$(CPU_ARCH)
-endif
-
-#
-# At this time, the COMPILER_TAG value is actually assigned.
-#
-
-ifndef COMPILER_TAG
-ifneq ($(DEFAULT_COMPILER), $(CC))
-#
-# Temporary define for the Client; to be removed when binary release is used
-#
- ifdef MOZILLA_CLIENT
- COMPILER_TAG =
- else
- COMPILER_TAG = _$(CC)
- endif
-else
- COMPILER_TAG =
-endif
-endif
-
-#
-# At this time, a default value of $(CC) is assigned to MKPROG.
-#
-
-ifeq ($(MKPROG),)
- MKPROG = $(CC)
-endif
-
-#
-# This makefile contains rules for building the following kinds of
-# objects:
-# - (1) LIBRARY: a static (archival) library
-# - (2) SHARED_LIBRARY: a shared (dynamic link) library
-# - (3) IMPORT_LIBRARY: an import library, used only on Windows
-# - (4) PURE_LIBRARY: a library for Purify
-# - (5) PROGRAM: an executable binary
-#
-# NOTE: The names of libraries can be generated by simply specifying
-# LIBRARY_NAME (and LIBRARY_VERSION in the case of non-static libraries).
-#
-
-ifdef LIBRARY_NAME
- ifeq ($(OS_ARCH), WINNT)
- #
- # Win16 requires library names conforming to the 8.3 rule.
- # other platforms do not.
- #
- LIBRARY = $(OBJDIR)/$(LIBRARY_NAME).lib
- ifeq ($(OS_TARGET), WIN16)
- SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)16$(JDK_DEBUG_SUFFIX).dll
- IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)16$(JDK_DEBUG_SUFFIX).lib
- else
- 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
- else
- LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME).$(LIB_SUFFIX)
- ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
- SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr$(JDK_DEBUG_SUFFIX).a
- else
- SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX)
- endif
-
- ifdef HAVE_PURIFY
- ifdef DSO_BACKEND
- PURE_LIBRARY = $(OBJDIR)/purelib$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX)
- else
- PURE_LIBRARY = $(OBJDIR)/purelib$(LIBRARY_NAME).$(LIB_SUFFIX)
- endif
- endif
- endif
-endif
-
-#
-# Common rules used by lots of makefiles...
-#
-
-ifdef PROGRAM
- PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))
-endif
-
-ifdef PROGRAMS
- PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)))
-endif
-
-ifndef TARGETS
- ifeq ($(OS_ARCH), WINNT)
- TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
- else
- TARGETS = $(LIBRARY) $(SHARED_LIBRARY)
- ifdef HAVE_PURIFY
- TARGETS += $(PURE_LIBRARY)
- endif
- TARGETS += $(PROGRAM)
- endif
-endif
-
-ifndef OBJS
- SIMPLE_OBJS = $(JRI_STUB_CFILES) \
- $(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \
- $(CSRCS:.c=$(OBJ_SUFFIX)) \
- $(CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
- $(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX))
- OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
-endif
-
-ifeq ($(OS_TARGET), WIN16)
- comma := ,
- empty :=
- space := $(empty) $(empty)
- W16OBJS := $(subst $(space),$(comma)$(space),$(strip $(OBJS)))
- W16TEMP = $(OS_LIBS) $(EXTRA_LIBS)
- ifeq ($(strip $(W16TEMP)),)
- W16LIBS =
- else
- W16LIBS := library $(subst $(space),$(comma)$(space),$(strip $(W16TEMP)))
- endif
-endif
-
-ifeq ($(OS_ARCH),WINNT)
- ifneq ($(OS_TARGET), WIN16)
- OBJS += $(RES)
- endif
- MAKE_OBJDIR = $(INSTALL) -D $(OBJDIR)
-else
- define MAKE_OBJDIR
- if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
- endef
-endif
-
-ifndef PACKAGE
- PACKAGE = .
-endif
-
-ALL_TRASH := $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
- $(NOSUCHFILE) $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \
- $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JNI_HEADERS) $(JMC_STUBS) \
- $(JMC_HEADERS) $(JMC_EXPORT_FILES) so_locations \
- _gen _jmc _jri _jni _stubs \
- $(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class)
-
-ifdef JDIRS
- ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
-endif
-
-ifdef NSBUILDROOT
- JDK_GEN_DIR = $(SOURCE_XP_DIR)/_gen
- JMC_GEN_DIR = $(SOURCE_XP_DIR)/_jmc
- JNI_GEN_DIR = $(SOURCE_XP_DIR)/_jni
- JRI_GEN_DIR = $(SOURCE_XP_DIR)/_jri
- JDK_STUB_DIR = $(SOURCE_XP_DIR)/_stubs
-else
- JDK_GEN_DIR = _gen
- JMC_GEN_DIR = _jmc
- JNI_GEN_DIR = _jni
- JRI_GEN_DIR = _jri
- JDK_STUB_DIR = _stubs
-endif
-
-#
-# If this is an "official" build, try to build everything.
-# I.e., don't exit on errors.
-#
-
-ifdef BUILD_OFFICIAL
- EXIT_ON_ERROR = +e
- CLICK_STOPWATCH = date
-else
- EXIT_ON_ERROR = -e
- CLICK_STOPWATCH = true
-endif
-
-ifdef REQUIRES
-ifeq ($(OS_TARGET),WIN16)
- INCLUDES += -I$(SOURCE_XP_DIR)/public/win16
-else
- MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES))
- INCLUDES += $(MODULE_INCLUDES)
- ifeq ($(MODULE), sectools)
- PRIVATE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/private/, $(REQUIRES))
- INCLUDES += $(PRIVATE_INCLUDES)
- endif
-endif
-endif
-
-ifdef SYSTEM_INCL_DIR
- YOPT = -Y$(SYSTEM_INCL_DIR)
-endif
-
-ifdef DIRS
- LOOP_OVER_DIRS = \
- @for directory in $(DIRS); do \
- if test -d $$directory; then \
- set $(EXIT_ON_ERROR); \
- echo "cd $$directory; $(MAKE) $@"; \
- $(MAKE) -C $$directory $@; \
- set +e; \
- else \
- echo "Skipping non-directory $$directory..."; \
- fi; \
- $(CLICK_STOPWATCH); \
- done
-endif
-
-
-
-# special stuff for tests rule in rules.mk
-
-ifneq ($(OS_ARCH),WINNT)
- REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now))
-else
- REGCOREDEPTH = $(subst \\,/,$(CORE_DEPTH))
- REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now))
-endif
-
-#
-# export control policy patcher program and arguments
-#
-
-PLCYPATCH = $(SOURCE_BIN_DIR)/plcypatch$(PROG_SUFFIX)
-
-DOMESTIC_POLICY = -us
-EXPORT_POLICY = -ex
-FRANCE_POLICY = -fr
-
-ifeq ($(POLICY), domestic)
- PLCYPATCH_ARGS = $(DOMESTIC_POLICY)
-else
- ifeq ($(POLICY), export)
- PLCYPATCH_ARGS = $(EXPORT_POLICY)
- else
- ifeq ($(POLICY), france)
- PLCYPATCH_ARGS = $(FRANCE_POLICY)
- else
- PLCYPATCH_ARGS =
- endif
- endif
-endif
-
-#
-# Compressor for executables and DLLs on Win32. Reduces download footprint
-# and helps solve some export control problem.
-#
-# PKLIT32C Program must be installed to be used. Path below is the default
-# installation path. No site license is available for this program.
-#
-ifeq ($(OS_ARCH), WINNT)
-ifdef BUILD_OPT
-
-PKLITE = $(shell which PKLIT32C.EXE)
-PKLITE_ARGS = -is.rdata
-
-#COMPRESS_TARGET = \
-# @if test -f $(PKLITE); then \
-# echo $(PKLITE) $(PKLITE_ARGS) $@; \
-# $(PKLITE) $(PKLITE_ARGS) $@; fi
-ifneq ($(PKLITE), )
-COMPRESS_TARGET = pklit32c.exe $(PKLITE_ARGS)
-endif
-
-endif
-endif
diff --git a/security/coreconf/source.mk b/security/coreconf/source.mk
deleted file mode 100644
index 17f9a530d..000000000
--- a/security/coreconf/source.mk
+++ /dev/null
@@ -1,174 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master <component>-specific source import/export directories #
-#######################################################################
-
-#
-# <user_source_tree> master import/export directory prefix
-#
-
-SOURCE_PREFIX = $(CORE_DEPTH)/dist
-ifdef MOZILLA_SECURITY_BUILD
-SOURCE_PREFIX = $(CORE_DEPTH)/../dist
-else
-ifdef MOZILLA_CLIENT
-SOURCE_PREFIX = $(CORE_DEPTH)/../mozilla/dist
-endif
-endif
-
-
-#
-# <user_source_tree> cross-platform (xp) master import/export directory
-#
-
-SOURCE_XP_DIR = $(SOURCE_PREFIX)
-
-#
-# <user_source_tree> cross-platform (xp) import/export directories
-#
-
-SOURCE_CLASSES_DIR = $(SOURCE_XP_DIR)/classes
-SOURCE_CLASSES_DBG_DIR = $(SOURCE_XP_DIR)/classes_DBG
-SOURCE_XPHEADERS_DIR = $(SOURCE_XP_DIR)/public/$(MODULE)
-SOURCE_XPPRIVATE_DIR = $(SOURCE_XP_DIR)/private/$(MODULE)
-
-ifdef BUILD_OPT
- IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DIR)
-else
- IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR)
-endif
-
-#
-# <user_source_tree> machine-dependent (md) master import/export directory
-#
-
-SOURCE_MD_DIR = $(SOURCE_PREFIX)/$(PLATFORM)
-
-#
-# <user_source_tree> machine-dependent (md) import/export directories
-#
-
-SOURCE_BIN_DIR = $(SOURCE_MD_DIR)/bin
-SOURCE_LIB_DIR = $(SOURCE_MD_DIR)/lib
-SOURCE_MDHEADERS_DIR = $(SOURCE_MD_DIR)/include
-
-#######################################################################
-# Master <component>-specific source release directories and files #
-#######################################################################
-
-#
-# <user_source_tree> source-side master release directory prefix
-# NOTE: export control policy enforced for XP and MD files released to
-# the staging area
-#
-
-ifeq ($(POLICY), domestic)
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/domestic
-else
- ifeq ($(POLICY), export)
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/export
- else
- ifeq ($(POLICY), france)
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/france
- else
-#We shouldn't have to put another directory under here, but without it the perl
-#script for releasing doesn't find the directory. It thinks it doesn't exist.
-#So we're adding this no-policy directory so that the script for releasing works
-#in all casese when policy is not set. This doesn't affect where the final jar
-#files land, only where they are placed in the local tree when building the jar
-#files. When there is no policy, the jar files will still land in
-#<dist>/<module>/<date>/<platform> like they used to.
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/no-policy
- endif
- endif
-endif
-
-#
-# <user_source_tree> cross-platform (xp) source-side master release directory
-#
-
-SOURCE_RELEASE_XP_DIR = $(SOURCE_RELEASE_PREFIX)
-
-#
-# <user_source_tree> cross-platform (xp) source-side release directories
-#
-
-SOURCE_RELEASE_CLASSES_DIR = classes
-SOURCE_RELEASE_CLASSES_DBG_DIR = classes_DBG
-SOURCE_RELEASE_XPHEADERS_DIR = include
-
-#
-# <user_source_tree> cross-platform (xp) JAR source-side release files
-#
-
-XPCLASS_JAR = xpclass.jar
-XPCLASS_DBG_JAR = xpclass_dbg.jar
-XPHEADER_JAR = xpheader.jar
-
-ifdef BUILD_OPT
- IMPORT_XPCLASS_JAR = $(XPCLASS_JAR)
-else
- IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR)
-endif
-
-#
-# <user_source_tree> machine-dependent (md) source-side master release directory
-#
-
-SOURCE_RELEASE_MD_DIR = $(PLATFORM)
-
-#
-# <user_source_tree> machine-dependent (md) source-side release directories
-#
-
-SOURCE_RELEASE_BIN_DIR = $(PLATFORM)/bin
-SOURCE_RELEASE_LIB_DIR = $(PLATFORM)/lib
-SOURCE_RELEASE_MDHEADERS_DIR = $(PLATFORM)/include
-SOURCE_RELEASE_SPEC_DIR = $(SOURCE_RELEASE_MD_DIR)
-
-#
-# <user_source_tree> machine-dependent (md) JAR/tar source-side release files
-#
-
-MDBINARY_JAR = mdbinary.jar
-MDHEADER_JAR = mdheader.jar
-
-
-# Where to put the results
-
-ifneq ($(RESULTS_DIR),)
- RESULTS_DIR = $(RELEASE_TREE)/sectools/results
-endif
-
diff --git a/security/coreconf/suffix.mk b/security/coreconf/suffix.mk
deleted file mode 100644
index e1db4ed7d..000000000
--- a/security/coreconf/suffix.mk
+++ /dev/null
@@ -1,132 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" suffixes #
-#######################################################################
-
-#
-# Object suffixes
-#
-
-ifndef OBJ_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- OBJ_SUFFIX = .obj
- else
- OBJ_SUFFIX = .o
- endif
-endif
-
-#
-# Assembler source suffixes
-#
-
-ifndef ASM_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- ASM_SUFFIX = .asm
- else
- ASM_SUFFIX = .s
- endif
-endif
-
-#
-# Library suffixes
-#
-
-STATIC_LIB_EXTENSION =
-
-ifndef DYNAMIC_LIB_EXTENSION
- ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
- DYNAMIC_LIB_EXTENSION = _shr
- else
- DYNAMIC_LIB_EXTENSION =
- endif
-endif
-
-
-ifndef STATIC_LIB_SUFFIX
- STATIC_LIB_SUFFIX = .$(LIB_SUFFIX)
-endif
-
-
-ifndef DYNAMIC_LIB_SUFFIX
- DYNAMIC_LIB_SUFFIX = .$(DLL_SUFFIX)
-endif
-
-
-ifndef IMPORT_LIB_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX)
- else
- IMPORT_LIB_SUFFIX =
- endif
-endif
-
-
-ifndef PURE_LIB_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- PURE_LIB_SUFFIX =
- else
- ifdef DSO_BACKEND
- PURE_LIB_SUFFIX = .$(DLL_SUFFIX)
- else
- PURE_LIB_SUFFIX = .$(LIB_SUFFIX)
- endif
- endif
-endif
-
-
-ifndef STATIC_LIB_SUFFIX_FOR_LINKING
- STATIC_LIB_SUFFIX_FOR_LINKING = $(STATIC_LIB_SUFFIX)
-endif
-
-
-ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING
- ifeq ($(OS_ARCH), WINNT)
- DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX)
- else
- DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(DYNAMIC_LIB_SUFFIX)
- endif
-endif
-
-#
-# Program suffixes
-#
-
-ifndef PROG_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- PROG_SUFFIX = .exe
- else
- PROG_SUFFIX =
- endif
-endif
diff --git a/security/coreconf/tree.mk b/security/coreconf/tree.mk
deleted file mode 100644
index 0517a6df3..000000000
--- a/security/coreconf/tree.mk
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Master "Core Components" file system "release" prefixes #
-#######################################################################
-
-# RELEASE_TREE = $(CORE_DEPTH)/../coredist
-
-
-ifndef RELEASE_TREE
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(BUILD_SHIP)
- else
- RELEASE_TREE = /m/dist
- endif
- else
- RELEASE_TREE = /m/dist
- endif
- ifeq ($(OS_TARGET), WINNT)
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(NTBUILD_SHIP)
- else
- RELEASE_TREE = //helium/dist
- endif
- else
- RELEASE_TREE = //helium/dist
- endif
- endif
-
- ifeq ($(OS_TARGET), WIN95)
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(NTBUILD_SHIP)
- else
- RELEASE_TREE = //helium/dist
- endif
- else
- RELEASE_TREE = //helium/dist
- endif
- endif
- ifeq ($(OS_TARGET), WIN16)
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(NTBUILD_SHIP)
- else
- RELEASE_TREE = //helium/dist
- endif
- else
- RELEASE_TREE = //helium/dist
- endif
- endif
-endif
-
-#
-# NOTE: export control policy enforced for XP and MD files
-# released to the binary release tree
-#
-
-ifeq ($(POLICY), domestic)
- RELEASE_XP_DIR = domestic
- RELEASE_MD_DIR = domestic/$(PLATFORM)
-else
- ifeq ($(POLICY), export)
- RELEASE_XP_DIR = export
- RELEASE_MD_DIR = export/$(PLATFORM)
- else
- ifeq ($(POLICY), france)
- RELEASE_XP_DIR = france
- RELEASE_MD_DIR = france/$(PLATFORM)
- else
- RELEASE_XP_DIR =
- RELEASE_MD_DIR = $(PLATFORM)
- endif
- endif
-endif
-
-
-REPORTER_TREE = $(subst \,\\,$(RELEASE_TREE))
-
-IMPORT_XP_DIR =
-IMPORT_MD_DIR = $(PLATFORM)
diff --git a/security/coreconf/version.mk b/security/coreconf/version.mk
deleted file mode 100644
index b2a55d180..000000000
--- a/security/coreconf/version.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-#
-# 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.
-#
-
-#######################################################################
-# Build master "Core Components" release version directory name #
-#######################################################################
-
-#
-# Always set CURRENT_VERSION_SYMLINK to the <current> symbolic link.
-#
-
-CURRENT_VERSION_SYMLINK = current
-
-
-#
-# For the sake of backwards compatibility (*sigh*) ...
-#
-
-ifndef VERSION
- ifdef BUILD_NUM
- VERSION = $(BUILD_NUM)
- endif
-endif
-
-ifndef RELEASE_VERSION
- ifdef BUILD_NUM
- RELEASE_VERSION = $(BUILD_NUM)
- endif
-endif
-
-#
-# If VERSION has still NOT been set on the command line,
-# as an environment variable, by the individual Makefile, or
-# by the <component>-specific "version.mk" file, set VERSION equal
-# to $(CURRENT_VERSION_SYMLINK).
-
-ifndef VERSION
- VERSION = $(CURRENT_VERSION_SYMLINK)
-endif
-
-# If RELEASE_VERSION has still NOT been set on the command line,
-# as an environment variable, by the individual Makefile, or
-# by the <component>-specific "version.mk" file, automatically
-# generate the next available version number via a perl script.
-#
-
-ifndef RELEASE_VERSION
- RELEASE_VERSION =
-endif
-
-#
-# Set <component>-specific versions for compiliation and linkage.
-#
-
-ifndef JAVA_VERSION
- JAVA_VERSION = $(CURRENT_VERSION_SYMLINK)
-endif
-
-ifndef NETLIB_VERSION
- NETLIB_VERSION = $(CURRENT_VERSION_SYMLINK)
-endif
-
-ifndef NSPR_VERSION
- NSPR_VERSION = $(CURRENT_VERSION_SYMLINK)
-endif
-
-ifndef SECTOOLS_VERSION
- SECTOOLS_VERSION = $(CURRENT_VERSION_SYMLINK)
-endif
-
-ifndef SECURITY_VERSION
- SECURITY_VERSION = $(CURRENT_VERSION_SYMLINK)
-endif
diff --git a/security/coreconf/version.pl b/security/coreconf/version.pl
deleted file mode 100644
index 47a71395b..000000000
--- a/security/coreconf/version.pl
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/sbin/perl
-#
-# 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.
-#
-
-# Compose lowercase alphabet
-@alphabet = ( "a", "b", "c", "d", "e", "f", "g", "h",
- "i", "j", "k", "l", "m", "n", "o", "p",
- "q", "r", "s", "t", "u", "v", "w", "x",
- "y", "z" );
-
-# Compute year
-$year = (localtime)[5] + 1900;
-
-# Compute month
-$month = (localtime)[4] + 1;
-
-# Compute day
-$day = (localtime)[3];
-
-# Compute base build number
-$version = sprintf( "%d%02d%02d", $year, $month, $day );
-$directory = sprintf( "%s\/%s\/%d%02d%02d", $ARGV[0], $ARGV[1], $year, $month, $day );
-
-# Print out the name of the first version directory which does not exist
-#if( ! -e $directory )
-#{
- print $version;
-#}
-#else
-#{
-# # Loop through combinations
-# foreach $ch1 (@alphabet)
-# {
-# foreach $ch2 (@alphabet)
-# {
-# $version = sprintf( "%d%02d%02d%s%s", $year, $month, $day, $ch1, $ch2 );
-# $directory = sprintf( "%s\/%s\/%d%02d%02d%s%s", $ARGV[0], $ARGV[1], $year, $month, $day, $ch1, $ch2 );
-# if( ! -e $directory )
-# {
-# print STDOUT $version;
-# exit;
-# }
-# }
-# }
-#}
-
diff --git a/security/nss/cmd/bltest/Makefile b/security/nss/cmd/bltest/Makefile
deleted file mode 100644
index c99a3c017..000000000
--- a/security/nss/cmd/bltest/Makefile
+++ /dev/null
@@ -1,82 +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
-#MKPROG = purify -cache-dir=/u/mcgreer/pcache -best-effort \
-# -always-use-cache-dir $(CC)
-
-#######################################################################
-# (2) Include "global" configuration information. (OPTIONAL) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/config.mk
-
-#######################################################################
-# (3) Include "component" configuration information. (OPTIONAL) #
-#######################################################################
-
-
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL). #
-#######################################################################
-
-include ../platlibs.mk
-
-#EXTRA_SHARED_LIBS += \
-# -L/usr/lib \
-# -lposix4 \
-# $(NULL)
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL) #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL) #
-#######################################################################
-
-
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL). #
-#######################################################################
-
-include ../platrules.mk
diff --git a/security/nss/cmd/bltest/blapitest.c b/security/nss/cmd/bltest/blapitest.c
deleted file mode 100644
index c5f770e4a..000000000
--- a/security/nss/cmd/bltest/blapitest.c
+++ /dev/null
@@ -1,1798 +0,0 @@
-/*
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "blapi.h"
-#include "prmem.h"
-#include "prprf.h"
-#include "prtime.h"
-#include "prsystem.h"
-#include "plstr.h"
-#include "nssb64.h"
-#include "secutil.h"
-#include "plgetopt.h"
-#include "softoken.h"
-
-char *progName;
-char *testdir = ".";
-
-#define CHECKERROR(rv, ln) \
- if (rv) { \
- char *errtxt = NULL; \
- if (PR_GetError() != 0) { \
- errtxt = PORT_Alloc(PR_GetErrorTextLength()); \
- PR_GetErrorText(errtxt); \
- } \
- PR_fprintf(PR_STDERR, "%s: ERR (%s) at line %d.\n", progName, \
- (errtxt) ? "" : errtxt, ln); \
- exit(-1); \
- }
-
-static void Usage()
-{
-#define PRINTUSAGE(subject, option, predicate) \
- fprintf(stderr, "%10s %s\t%s\n", subject, option, predicate);
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "[-DEHSV] -m", "List available cipher modes.");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-E -m mode ", "Encrypt a buffer.");
- PRINTUSAGE("", "", "[-i plaintext] [-o ciphertext] [-k key] [-v iv]");
- PRINTUSAGE("", "", "[-b bufsize] [-g keysize] [-erw]");
- PRINTUSAGE("", "", "[-p repetitions]");
- PRINTUSAGE("", "-m", "cipher mode to use.");
- PRINTUSAGE("", "-i", "file which contains input buffer.");
- PRINTUSAGE("", "-o", "file for output buffer.");
- PRINTUSAGE("", "-k", "file which contains key.");
- PRINTUSAGE("", "-v", "file which contains initialization vector.");
- PRINTUSAGE("", "-b", "size of input buffer.");
- PRINTUSAGE("", "-g", "key size (in bytes).");
- PRINTUSAGE("", "-p", "do performance test.");
- PRINTUSAGE("(rsa)", "-e", "rsa public exponent.");
- PRINTUSAGE("(rc5)", "-r", "number of rounds.");
- PRINTUSAGE("(rc5)", "-w", "wordsize (32 or 64).");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-D -m mode", "Decrypt a buffer.");
- PRINTUSAGE("", "", "[-i plaintext] [-o ciphertext] [-k key] [-v iv]");
- PRINTUSAGE("", "", "[-p repetitions]");
- PRINTUSAGE("", "-m", "cipher mode to use.");
- PRINTUSAGE("", "-i", "file which contains input buffer.");
- PRINTUSAGE("", "-o", "file for output buffer.");
- PRINTUSAGE("", "-k", "file which contains key.");
- PRINTUSAGE("", "-v", "file which contains initialization vector.");
- PRINTUSAGE("", "-p", "do performance test.");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-H -m mode", "Hash a buffer.");
- PRINTUSAGE("", "", "[-i plaintext] [-o hash]");
- PRINTUSAGE("", "", "[-b bufsize]");
- PRINTUSAGE("", "", "[-p repetitions]");
- PRINTUSAGE("", "-m", "cipher mode to use.");
- PRINTUSAGE("", "-i", "file which contains input buffer.");
- PRINTUSAGE("", "-o", "file for hash.");
- PRINTUSAGE("", "-b", "size of input buffer.");
- PRINTUSAGE("", "-p", "do performance test.");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-S -m mode", "Sign a buffer.");
- PRINTUSAGE("", "", "[-i plaintext] [-o signature] [-k key]");
- PRINTUSAGE("", "", "[-b bufsize]");
- PRINTUSAGE("", "", "[-p repetitions]");
- PRINTUSAGE("", "-m", "cipher mode to use.");
- PRINTUSAGE("", "-i", "file which contains input buffer.");
- PRINTUSAGE("", "-o", "file for signature.");
- PRINTUSAGE("", "-k", "file which contains key.");
- PRINTUSAGE("", "-p", "do performance test.");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-V -m mode", "Verify a signed buffer.");
- PRINTUSAGE("", "", "[-i plaintext] [-s signature] [-k key]");
- PRINTUSAGE("", "", "[-p repetitions]");
- PRINTUSAGE("", "-m", "cipher mode to use.");
- PRINTUSAGE("", "-i", "file which contains input buffer.");
- PRINTUSAGE("", "-s", "file which contains signature of input buffer.");
- PRINTUSAGE("", "-k", "file which contains key.");
- PRINTUSAGE("", "-p", "do performance test.");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-F", "Run the FIPS self-test.");
- fprintf(stderr, "\n");
- PRINTUSAGE(progName, "-T [mode1 mode2 ...]", "Run the BLAPI self-test.");
- fprintf(stderr, "\n");
- exit(1);
-}
-
-/* Helper functions for ascii<-->binary conversion/reading/writing */
-
-static PRInt32
-get_binary(void *arg, const unsigned char *ibuf, PRInt32 size)
-{
- SECItem *binary = arg;
- SECItem *tmp;
- int index;
- if (binary->data == NULL) {
- tmp = SECITEM_AllocItem(NULL, NULL, size);
- binary->data = tmp->data;
- binary->len = tmp->len;
- index = 0;
- } else {
- SECITEM_ReallocItem(NULL, binary, binary->len, binary->len + size);
- index = binary->len;
- }
- PORT_Memcpy(&binary->data[index], ibuf, size);
- return binary->len;
-}
-
-static PRInt32
-get_ascii(void *arg, const char *ibuf, PRInt32 size)
-{
- SECItem *ascii = arg;
- SECItem *tmp;
- int index;
- if (ascii->data == NULL) {
- tmp = SECITEM_AllocItem(NULL, NULL, size);
- ascii->data = tmp->data;
- ascii->len = tmp->len;
- index = 0;
- } else {
- SECITEM_ReallocItem(NULL, ascii, ascii->len, ascii->len + size);
- index = ascii->len;
- }
- PORT_Memcpy(&ascii->data[index], ibuf, size);
- return ascii->len;
-}
-
-static SECStatus
-atob(SECItem *ascii, SECItem *binary)
-{
- SECStatus status;
- NSSBase64Decoder *cx;
- int len;
- binary->data = NULL;
- binary->len = 0;
- len = (strcmp(&ascii->data[ascii->len-2],"\r\n"))?ascii->len:ascii->len-2;
- cx = NSSBase64Decoder_Create(get_binary, binary);
- status = NSSBase64Decoder_Update(cx, (const char *)ascii->data, len);
- status = NSSBase64Decoder_Destroy(cx, PR_FALSE);
- return status;
-}
-
-static PRInt32
-output_ascii(void *arg, const char *obuf, PRInt32 size)
-{
- PRFileDesc *outfile = arg;
- PRInt32 nb = PR_Write(outfile, obuf, size);
- if (nb != size) {
- PORT_SetError(SEC_ERROR_IO);
- return -1;
- }
- return nb;
-}
-
-static SECStatus
-btoa(SECItem *binary, SECItem *ascii)
-{
- SECStatus status;
- NSSBase64Encoder *cx;
- ascii->data = NULL;
- ascii->len = 0;
- cx = NSSBase64Encoder_Create(get_ascii, ascii);
- status = NSSBase64Encoder_Update(cx, binary->data, binary->len);
- status = NSSBase64Encoder_Destroy(cx, PR_FALSE);
- return status;
-}
-
-static SECStatus
-btoa_file(SECItem *binary, PRFileDesc *outfile)
-{
- SECStatus status;
- NSSBase64Encoder *cx;
- SECItem ascii;
- ascii.data = NULL;
- ascii.len = 0;
- if (binary->len == 0)
- return SECSuccess;
- cx = NSSBase64Encoder_Create(output_ascii, outfile);
- status = NSSBase64Encoder_Update(cx, binary->data, binary->len);
- status = NSSBase64Encoder_Destroy(cx, PR_FALSE);
- status = PR_Write(outfile, "\r\n", 2);
- return status;
-}
-
-static SECStatus
-get_and_write_random_bytes(SECItem *item, PRInt32 numbytes, char *filename)
-{
- SECStatus rv;
- PRFileDesc *file;
- item->len = numbytes;
- item->data = (unsigned char *)PORT_ZAlloc(numbytes);
- RNG_GenerateGlobalRandomBytes(item->data + 1, numbytes - 1);
- file = PR_Open(filename, PR_WRONLY|PR_CREATE_FILE, 00660);
- rv = btoa_file(item, file);
- CHECKERROR((rv < 0), __LINE__);
- return (rv < 0);
-}
-
-static RSAPrivateKey *
-rsakey_from_filedata(SECItem *filedata)
-{
- PRArenaPool *arena;
- RSAPrivateKey *key;
- unsigned char *buf = filedata->data;
- int fpos = 0;
- int i;
- SECItem *item;
- /* Allocate space for key structure. */
- arena = PORT_NewArena(2048);
- key = (RSAPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(RSAPrivateKey));
- key->arena = arena;
- item = &key->version;
- for (i=0; i<9; i++) {
- item->len = (buf[fpos++] & 0xff) << 24;
- item->len |= (buf[fpos++] & 0xff) << 16;
- item->len |= (buf[fpos++] & 0xff) << 8;
- item->len |= (buf[fpos++] & 0xff);
- if (item->len > 0) {
- item->data = PORT_ArenaAlloc(arena, item->len);
- PORT_Memcpy(item->data, &buf[fpos], item->len);
- } else {
- item->data = NULL;
- }
- fpos += item->len;
- item++;
- }
- return key;
-}
-
-static void
-rsakey_to_file(RSAPrivateKey *key, char *filename)
-{
- PRFileDesc *file;
- SECItem *item;
- unsigned char len[4];
- int i;
- SECStatus status;
- NSSBase64Encoder *cx;
- SECItem ascii;
- ascii.data = NULL;
- ascii.len = 0;
- file = PR_Open(filename, PR_WRONLY|PR_CREATE_FILE, 00660);
- cx = NSSBase64Encoder_Create(output_ascii, file);
- item = &key->version;
- for (i=0; i<9; i++) {
- len[0] = (item->len >> 24) & 0xff;
- len[1] = (item->len >> 16) & 0xff;
- len[2] = (item->len >> 8) & 0xff;
- len[3] = (item->len & 0xff);
- status = NSSBase64Encoder_Update(cx, len, 4);
- status = NSSBase64Encoder_Update(cx, item->data, item->len);
- item++;
- }
- status = NSSBase64Encoder_Destroy(cx, PR_FALSE);
- status = PR_Write(file, "\r\n", 2);
- PR_Close(file);
-}
-
-static PQGParams *
-pqg_from_filedata(SECItem *filedata)
-{
- PRArenaPool *arena;
- PQGParams *pqg;
- unsigned char *buf = filedata->data;
- int fpos = 0;
- int i;
- SECItem *item;
- /* Allocate space for key structure. */
- arena = PORT_NewArena(2048);
- pqg = (PQGParams *)PORT_ArenaZAlloc(arena, sizeof(PQGParams));
- pqg->arena = arena;
- item = &pqg->prime;
- for (i=0; i<3; i++) {
- item->len = (buf[fpos++] & 0xff) << 24;
- item->len |= (buf[fpos++] & 0xff) << 16;
- item->len |= (buf[fpos++] & 0xff) << 8;
- item->len |= (buf[fpos++] & 0xff);
- if (item->len > 0) {
- item->data = PORT_ArenaAlloc(arena, item->len);
- PORT_Memcpy(item->data, &buf[fpos], item->len);
- } else {
- item->data = NULL;
- }
- fpos += item->len;
- item++;
- }
- return pqg;
-}
-
-static DSAPrivateKey *
-dsakey_from_filedata(SECItem *filedata)
-{
- PRArenaPool *arena;
- DSAPrivateKey *key;
- unsigned char *buf = filedata->data;
- int fpos = 0;
- int i;
- SECItem *item;
- /* Allocate space for key structure. */
- arena = PORT_NewArena(2048);
- key = (DSAPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(DSAPrivateKey));
- key->params.arena = arena;
- item = &key->params.prime;
- for (i=0; i<5; i++) {
- item->len = (buf[fpos++] & 0xff) << 24;
- item->len |= (buf[fpos++] & 0xff) << 16;
- item->len |= (buf[fpos++] & 0xff) << 8;
- item->len |= (buf[fpos++] & 0xff);
- if (item->len > 0) {
- item->data = PORT_ArenaAlloc(arena, item->len);
- PORT_Memcpy(item->data, &buf[fpos], item->len);
- } else {
- item->data = NULL;
- }
- fpos += item->len;
- item++;
- }
- return key;
-}
-
-static void
-pqg_to_file(PQGParams *params, char *filename)
-{
- PRFileDesc *file;
- SECItem *item;
- unsigned char len[4];
- int i;
- SECStatus status;
- NSSBase64Encoder *cx;
- SECItem ascii;
- ascii.data = NULL;
- ascii.len = 0;
- file = PR_Open(filename, PR_WRONLY|PR_CREATE_FILE, 00660);
- cx = NSSBase64Encoder_Create(output_ascii, file);
- item = &params->prime;
- for (i=0; i<3; i++) {
- len[0] = (item->len >> 24) & 0xff;
- len[1] = (item->len >> 16) & 0xff;
- len[2] = (item->len >> 8) & 0xff;
- len[3] = (item->len & 0xff);
- status = NSSBase64Encoder_Update(cx, len, 4);
- status = NSSBase64Encoder_Update(cx, item->data, item->len);
- item++;
- }
- status = NSSBase64Encoder_Destroy(cx, PR_FALSE);
- status = PR_Write(file, "\r\n", 2);
-}
-
-static void
-dsakey_to_file(DSAPrivateKey *key, char *filename)
-{
- PRFileDesc *file;
- SECItem *item;
- unsigned char len[4];
- int i;
- SECStatus status;
- NSSBase64Encoder *cx;
- SECItem ascii;
- ascii.data = NULL;
- ascii.len = 0;
- file = PR_Open(filename, PR_WRONLY|PR_CREATE_FILE, 00660);
- cx = NSSBase64Encoder_Create(output_ascii, file);
- item = &key->params.prime;
- for (i=0; i<5; i++) {
- len[0] = (item->len >> 24) & 0xff;
- len[1] = (item->len >> 16) & 0xff;
- len[2] = (item->len >> 8) & 0xff;
- len[3] = (item->len & 0xff);
- status = NSSBase64Encoder_Update(cx, len, 4);
- status = NSSBase64Encoder_Update(cx, item->data, item->len);
- item++;
- }
- status = NSSBase64Encoder_Destroy(cx, PR_FALSE);
- status = PR_Write(file, "\r\n", 2);
-}
-
-static void
-dump_pqg(PQGParams *pqg)
-{
- SECU_PrintInteger(stdout, &pqg->prime, "PRIME:", 0);
- SECU_PrintInteger(stdout, &pqg->subPrime, "SUBPRIME:", 0);
- SECU_PrintInteger(stdout, &pqg->base, "BASE:", 0);
-}
-
-static void
-dump_dsakey(DSAPrivateKey *key)
-{
- dump_pqg(&key->params);
- SECU_PrintInteger(stdout, &key->publicValue, "PUBLIC VALUE:", 0);
- SECU_PrintInteger(stdout, &key->privateValue, "PRIVATE VALUE:", 0);
-}
-
-/* Multi-purpose crypto information */
-typedef struct
-{
- PRBool encrypt;
- PRBool decrypt;
- PRBool sign;
- PRBool verify;
- PRBool hash;
- SECItem seed;
- SECItem pqg;
- SECItem key;
- SECItem iv;
- SECItem in;
- SECItem out;
- SECItem sigseed;
- PRInt32 keysize;
- PRInt32 bufsize;
- PRBool useseed;
- PRBool usesigseed;
- PRBool performance;
- PRBool multihash;
- PQGParams *params; /* DSA only */
- unsigned int rounds; /* RC5 only */
- unsigned int wordsize; /* RC5 only */
- unsigned int rsapubexp; /* RSA only */
- unsigned int repetitions; /* performance tests only */
-} blapitestInfo;
-
-/* Macros for performance timing. */
-#define TIMESTART() \
- if (info->performance) \
- time1 = PR_IntervalNow();
-
-#define TIMEFINISH(mode, nb) \
- if (info->performance) { \
- time2 = (PRIntervalTime)(PR_IntervalNow() - time1); \
- time1 = PR_IntervalToMilliseconds(time2); \
- printf("%s,%d,%.3f\n", mode, nb, ((float)(time1))/info->repetitions); \
- }
-
-SECStatus
-fillitem(SECItem *item, int numbytes, char *filename)
-{
- if (item->len == 0)
- return get_and_write_random_bytes(item, numbytes, filename);
- return SECSuccess;
-}
-
-/************************
-** DES
-************************/
-
-/* encrypt/decrypt for all DES */
-static SECStatus
-des_common(DESContext *descx, blapitestInfo *info)
-{
- PRInt32 maxsize;
- SECStatus rv;
- PRIntervalTime time1, time2;
- int i, numiter;
- numiter = info->repetitions;
- maxsize = info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(maxsize);
- if (info->encrypt) {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = DES_Encrypt(descx, info->out.data, &info->out.len, maxsize,
- info->in.data, info->in.len);
- TIMEFINISH("DES ENCRYPT", maxsize);
- if (rv) {
- fprintf(stderr, "%s: Failed to encrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = DES_Decrypt(descx, info->out.data, &info->out.len, maxsize,
- info->in.data, info->in.len);
- TIMEFINISH("DES DECRYPT", maxsize);
- if (rv) {
- fprintf(stderr, "%s: Failed to decrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- }
- return rv;
-}
-
-/* DES codebook mode */
-static SECStatus
-des_ecb_test(blapitestInfo *info)
-{
- SECStatus rv;
- DESContext *descx;
- PRIntervalTime time1, time2;
- int i, numiter = info->repetitions;
- fillitem(&info->key, DES_KEY_LENGTH, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- descx = DES_CreateContext(info->key.data, NULL, NSS_DES, info->encrypt);
- DES_DestroyContext(descx, PR_TRUE);
- }
- descx = DES_CreateContext(info->key.data, NULL, NSS_DES, info->encrypt);
- TIMEFINISH("DES ECB CONTEXT CREATE", info->key.len);
- if (!descx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- rv = des_common(descx, info);
- CHECKERROR(rv, __LINE__);
- DES_DestroyContext(descx, PR_TRUE);
- return rv;
-}
-
-/* DES chaining mode */
-static SECStatus
-des_cbc_test(blapitestInfo *info)
-{
- SECStatus rv;
- DESContext *descx;
- PRIntervalTime time1, time2;
- int i, numiter = info->repetitions;
- fillitem(&info->key, DES_KEY_LENGTH, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- fillitem(&info->iv, DES_KEY_LENGTH, "tmp.iv");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- descx = DES_CreateContext(info->key.data, info->iv.data, NSS_DES_CBC,
- info->encrypt);
- DES_DestroyContext(descx, PR_TRUE);
- }
- descx = DES_CreateContext(info->key.data, info->iv.data, NSS_DES_CBC,
- info->encrypt);
- TIMEFINISH("DES CBC CONTEXT CREATE", info->key.len);
- if (!descx) {
- PR_fprintf(PR_STDERR,
- "%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- if (info->performance) {
- /* In chaining mode, repeated iterations of the encryption
- * function using the same context will alter the final output.
- * So, once the performance test is done, reset the context
- * and perform a single iteration to obtain the correct result.
- */
- int tmp = info->repetitions;
- rv = des_common(descx, info);
- DES_DestroyContext(descx, PR_TRUE);
- descx = DES_CreateContext(info->key.data, info->iv.data, NSS_DES_CBC,
- info->encrypt);
- info->performance = PR_FALSE;
- info->repetitions = 1;
- rv = des_common(descx, info);
- info->performance = PR_TRUE;
- info->repetitions = tmp;
- } else {
- rv = des_common(descx, info);
- }
- CHECKERROR(rv, __LINE__);
- DES_DestroyContext(descx, PR_TRUE);
- return rv;
-}
-
-/* 3-key Triple-DES codebook mode */
-static SECStatus
-des_ede_ecb_test(blapitestInfo *info)
-{
- SECStatus rv;
- DESContext *descx;
- PRIntervalTime time1, time2;
- int i, numiter = info->repetitions;
- fillitem(&info->key, 3*DES_KEY_LENGTH, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- descx = DES_CreateContext(info->key.data, NULL, NSS_DES_EDE3,
- info->encrypt);
- DES_DestroyContext(descx, PR_TRUE);
- }
- descx = DES_CreateContext(info->key.data, NULL, NSS_DES_EDE3,
- info->encrypt);
- TIMEFINISH("3DES ECB CONTEXT CREATE", info->key.len);
- if (!descx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- rv = des_common(descx, info);
- CHECKERROR(rv, __LINE__);
- DES_DestroyContext(descx, PR_TRUE);
- return rv;
-}
-
-/* 3-key Triple-DES chaining mode */
-static SECStatus
-des_ede_cbc_test(blapitestInfo *info)
-{
- SECStatus rv;
- DESContext *descx;
- PRIntervalTime time1, time2;
- int i, numiter = info->repetitions;
- fillitem(&info->key, 3*DES_KEY_LENGTH, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- fillitem(&info->iv, DES_KEY_LENGTH, "tmp.iv");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- descx = DES_CreateContext(info->key.data, info->iv.data,
- NSS_DES_EDE3_CBC, info->encrypt);
- DES_DestroyContext(descx, PR_TRUE);
- }
- descx = DES_CreateContext(info->key.data, info->iv.data, NSS_DES_EDE3_CBC,
- info->encrypt);
- TIMEFINISH("3DES CBC CONTEXT CREATE", info->key.len);
- if (!descx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- if (info->performance) {
- /* In chaining mode, repeated iterations of the encryption
- * function using the same context will alter the final output.
- * So, once the performance test is done, reset the context
- * and perform a single iteration to obtain the correct result.
- */
- int tmp = info->repetitions;
- rv = des_common(descx, info);
- DES_DestroyContext(descx, PR_TRUE);
- descx = DES_CreateContext(info->key.data, info->iv.data,
- NSS_DES_EDE3_CBC, info->encrypt);
- info->performance = PR_FALSE;
- info->repetitions = 1;
- rv = des_common(descx, info);
- info->performance = PR_TRUE;
- info->repetitions = tmp;
- } else {
- rv = des_common(descx, info);
- }
- CHECKERROR(rv, __LINE__);
- DES_DestroyContext(descx, PR_TRUE);
- return rv;
-}
-
-/************************
-** RC2
-************************/
-
-/* RC2 ECB */
-static SECStatus
-rc2_ecb_test(blapitestInfo *info)
-{
- SECStatus rv;
- RC2Context *rc2cx;
- PRIntervalTime time1, time2;
- int i, numiter = info->repetitions;
- fillitem(&info->key, info->keysize, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- rc2cx = RC2_CreateContext(info->key.data, info->key.len, NULL,
- NSS_RC2, info->key.len);
- RC2_DestroyContext(rc2cx, PR_TRUE);
- }
- rc2cx = RC2_CreateContext(info->key.data, info->key.len, NULL,
- NSS_RC2, info->key.len);
- TIMEFINISH("RC2 ECB CONTEXT CREATE", info->key.len);
- if (!rc2cx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- info->out.len = 2*info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->encrypt) {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC2_Encrypt(rc2cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC2 ECB ENCRYPT", info->in.len);
- CHECKERROR(rv, __LINE__);
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC2_Decrypt(rc2cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC2 ECB DECRYPT", info->in.len);
- CHECKERROR(rv, __LINE__);
- }
- RC2_DestroyContext(rc2cx, PR_TRUE);
- return rv;
-}
-
-/* RC2 CBC */
-static SECStatus
-rc2_cbc_test(blapitestInfo *info)
-{
- SECStatus rv;
- RC2Context *rc2cx;
- PRIntervalTime time1, time2;
- int i, numiter = info->repetitions;
- fillitem(&info->key, info->keysize, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- fillitem(&info->iv, info->bufsize, "tmp.iv");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- rc2cx = RC2_CreateContext(info->key.data, info->key.len, info->iv.data,
- NSS_RC2_CBC, info->key.len);
- RC2_DestroyContext(rc2cx, PR_TRUE);
- }
- rc2cx = RC2_CreateContext(info->key.data, info->key.len, info->iv.data,
- NSS_RC2_CBC, info->key.len);
- TIMEFINISH("RC2 CBC CONTEXT CREATE", info->key.len);
- if (!rc2cx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- info->out.len = 2*info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->encrypt) {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC2_Encrypt(rc2cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC2 CBC ENCRYPT", info->in.len);
- if (info->performance) {
- /* reset the context */
- RC2_DestroyContext(rc2cx, PR_TRUE);
- rc2cx = RC2_CreateContext(info->key.data, info->key.len,
- info->iv.data, NSS_RC2_CBC, info->key.len);
- rv = RC2_Encrypt(rc2cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- }
- CHECKERROR(rv, __LINE__);
- if (rv) {
- fprintf(stderr, "%s: Failed to encrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC2_Decrypt(rc2cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC2 CBC DECRYPT", info->in.len);
- if (info->performance) {
- /* reset the context */
- RC2_DestroyContext(rc2cx, PR_TRUE);
- rc2cx = RC2_CreateContext(info->key.data, info->key.len,
- info->iv.data, NSS_RC2_CBC, info->key.len);
- rv = RC2_Decrypt(rc2cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- }
- if (rv) {
- fprintf(stderr, "%s: Failed to decrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- }
- RC2_DestroyContext(rc2cx, PR_TRUE);
- return rv;
-}
-
-/************************
-** RC4
-************************/
-
-static SECStatus
-rc4_test(blapitestInfo *info)
-{
- SECStatus rv;
- RC4Context *rc4cx;
- PRIntervalTime time1, time2;
- int i, numiter;
- numiter = info->repetitions;
- fillitem(&info->key, info->keysize, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- rc4cx = RC4_CreateContext(info->key.data, info->key.len);
- RC4_DestroyContext(rc4cx, PR_TRUE);
- }
- rc4cx = RC4_CreateContext(info->key.data, info->key.len);
- TIMEFINISH("RC4 CONTEXT CREATE", info->key.len);
- if (!rc4cx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- info->out.len = 2*info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->encrypt) {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC4_Encrypt(rc4cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC4 ENCRYPT", info->in.len);
- if (info->performance) {
- /* reset the context */
- RC4_DestroyContext(rc4cx, PR_TRUE);
- rc4cx = RC4_CreateContext(info->key.data, info->key.len);
- rv = RC4_Encrypt(rc4cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- }
- if (rv) {
- fprintf(stderr, "%s: Failed to encrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC4_Decrypt(rc4cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC4 DECRYPT", info->in.len);
- if (info->performance) {
- /* reset the context */
- RC4_DestroyContext(rc4cx, PR_TRUE);
- rc4cx = RC4_CreateContext(info->key.data, info->key.len);
- rv = RC4_Decrypt(rc4cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- }
- if (rv) {
- fprintf(stderr, "%s: Failed to decrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- }
- RC4_DestroyContext(rc4cx, PR_TRUE);
- return rv;
-}
-
-/************************
-** RC5
-************************/
-
-/* RC5 ECB */
-static SECStatus
-rc5_ecb_test(blapitestInfo *info)
-{
- SECStatus rv;
- RC5Context *rc5cx;
- PRIntervalTime time1, time2;
- int i, numiter;
- numiter = info->repetitions;
- fillitem(&info->key, info->keysize, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- rc5cx = RC5_CreateContext(&info->key, info->rounds, info->wordsize,
- NULL, NSS_RC5);
- RC5_DestroyContext(rc5cx, PR_TRUE);
- }
- rc5cx = RC5_CreateContext(&info->key, info->rounds, info->wordsize,
- NULL, NSS_RC5);
- TIMEFINISH("RC5 ECB CONTEXT CREATE", info->key.len);
- if (!rc5cx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- info->out.len = 2*info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->encrypt) {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC5_Encrypt(rc5cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC5 ECB ENCRYPT", info->in.len);
- if (rv) {
- fprintf(stderr, "%s: Failed to encrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC5_Decrypt(rc5cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC5 ECB ENCRYPT", info->in.len);
- if (rv) {
- fprintf(stderr, "%s: Failed to decrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- }
- RC5_DestroyContext(rc5cx, PR_TRUE);
- return rv;
-}
-
-/* RC5 CBC */
-static SECStatus
-rc5_cbc_test(blapitestInfo *info)
-{
- SECStatus rv;
- RC5Context *rc5cx;
- PRIntervalTime time1, time2;
- int i, numiter;
- numiter = info->repetitions;
- fillitem(&info->key, info->keysize, "tmp.key");
- fillitem(&info->in, info->bufsize, "tmp.pt");
- fillitem(&info->iv, info->bufsize, "tmp.iv");
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- rc5cx = RC5_CreateContext(&info->key, info->rounds, info->wordsize,
- info->iv.data, NSS_RC5_CBC);
- RC5_DestroyContext(rc5cx, PR_TRUE);
- }
- rc5cx = RC5_CreateContext(&info->key, info->rounds, info->wordsize,
- info->iv.data, NSS_RC5_CBC);
- TIMEFINISH("RC5 CBC CONTEXT CREATE", info->key.len);
- if (!rc5cx) {
- fprintf(stderr,"%s: Failed to create encryption context!\n", progName);
- return SECFailure;
- }
- info->out.len = 2*info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->encrypt) {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC5_Encrypt(rc5cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC5 CBC ENCRYPT", info->in.len);
- if (info->performance) {
- /* reset the context */
- RC5_DestroyContext(rc5cx, PR_TRUE);
- rc5cx = RC5_CreateContext(&info->key, info->rounds, info->wordsize,
- info->iv.data, NSS_RC5_CBC);
- rv = RC5_Encrypt(rc5cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- }
- if (rv) {
- fprintf(stderr, "%s: Failed to encrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = RC5_Decrypt(rc5cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- TIMEFINISH("RC5 CBC DECRYPT", info->in.len);
- if (info->performance) {
- /* reset the context */
- RC5_DestroyContext(rc5cx, PR_TRUE);
- rc5cx = RC5_CreateContext(&info->key, info->rounds, info->wordsize,
- info->iv.data, NSS_RC5_CBC);
- rv = RC5_Decrypt(rc5cx, info->out.data, &info->out.len,
- info->out.len, info->in.data, info->in.len);
- }
- if (rv) {
- fprintf(stderr, "%s: Failed to decrypt!\n", progName);
- CHECKERROR(rv, __LINE__);
- }
- }
- RC5_DestroyContext(rc5cx, PR_TRUE);
- return rv;
-}
-
-static SECStatus
-rsa_test(blapitestInfo *info)
-{
- RSAPrivateKey *key;
- SECItem expitem;
- SECStatus rv;
- PRIntervalTime time1, time2;
- int i, j, numiter;
- unsigned int modLen;
- numiter = info->repetitions;
- fillitem(&info->in, info->bufsize, "tmp.pt");
- if (info->key.len > 0) {
- key = rsakey_from_filedata(&info->key);
- } else {
- expitem.len = 4;
- expitem.data = (unsigned char *)PORT_ZAlloc(4);
- expitem.data[0] = (info->rsapubexp >> 24) & 0xff;
- expitem.data[1] = (info->rsapubexp >> 16) & 0xff;
- expitem.data[2] = (info->rsapubexp >> 8) & 0xff;
- expitem.data[3] = (info->rsapubexp & 0xff);
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- key = RSA_NewKey(info->keysize*8, &expitem);
- PORT_FreeArena(key->arena, PR_TRUE);
- }
- key = RSA_NewKey(info->keysize*8, &expitem);
- TIMEFINISH("RSA KEY GEN", info->keysize);
- rsakey_to_file(key, "tmp.key");
- }
- if (key->modulus.data[0] == 0) {
- /* integer value of input must be less than modulus */
- if (info->in.data[0] >= key->modulus.data[1])
- return SECFailure;
- } else {
- if (info->in.data[0] >= key->modulus.data[0])
- return SECFailure;
- }
- modLen = key->modulus.len - !key->modulus.data[0];
- if (info->in.len % modLen != 0) {
- fprintf(stderr, "Input buffer must be a multiple of modulus length!\n");
- return SECFailure;
- }
- info->out.len = info->in.len;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->encrypt) {
- RSAPublicKey pubkey;
- SECITEM_CopyItem(key->arena, &pubkey.modulus, &key->modulus);
- SECITEM_CopyItem(key->arena, &pubkey.publicExponent,
- &key->publicExponent);
- TIMESTART();
- for (i=0; i<numiter; i++) {
- for (j=0; j<info->in.len; j+=pubkey.modulus.len) {
- rv = RSA_PublicKeyOp(&pubkey, &info->out.data[j],
- &info->in.data[j]);
- }
- }
- TIMEFINISH("RSA ENCRYPT", info->in.len);
- CHECKERROR(rv, __LINE__);
- } else {
- TIMESTART();
- for (i=info->repetitions; i>0; i--) {
- for (j=0; j<info->in.len; j+=key->modulus.len) {
- rv = RSA_PrivateKeyOp(key, &info->out.data[j],
- &info->in.data[j]);
- }
- }
- TIMEFINISH("RSA DECRYPT", info->in.len);
- CHECKERROR(rv, __LINE__);
- }
- PORT_FreeArena(key->arena, PR_TRUE);
- return SECSuccess;
-}
-
-static SECStatus
-pqg_test(blapitestInfo *info)
-{
- SECStatus rv = SECSuccess;
- PQGVerify *verify;
- PRIntervalTime time1, time2;
- int i, numiter;
- numiter = info->repetitions;
- if (info->pqg.len > 0) {
- info->params = pqg_from_filedata(&info->pqg);
- } else {
- TIMESTART();
- for (i=0; i<numiter-1; i++) {
- rv = PQG_ParamGen(info->keysize, &info->params, &verify);
- PORT_FreeArena(info->params->arena, PR_TRUE);
- }
- rv = PQG_ParamGen(info->keysize, &info->params, &verify);
- TIMEFINISH("PQG PARAM GEN", info->keysize);
- pqg_to_file(info->params, "tmp.pqg");
- }
- CHECKERROR(rv, __LINE__);
- return rv;
-}
-
-static SECStatus
-dsa_test(blapitestInfo *info)
-{
- DSAPrivateKey *key;
- SECStatus rv = SECSuccess;
- PRIntervalTime time1, time2;
- int i, numiter;
- numiter = info->repetitions;
- fillitem(&info->in, info->bufsize, "tmp.pt");
- if (info->key.len > 0) {
- key = dsakey_from_filedata(&info->key);
- } else {
- pqg_test(info);
- if (info->useseed) {
- if (info->seed.len == 0)
- get_and_write_random_bytes(&info->seed, DSA_SUBPRIME_LEN,
- "tmp.seed");
- rv = DSA_NewKeyFromSeed(info->params, info->seed.data, &key);
- } else {
- rv = DSA_NewKey(info->params, &key);
- }
- CHECKERROR(rv, __LINE__);
- dsakey_to_file(key, "tmp.key");
- }
- if (info->sign) {
- info->out.len = 48;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- if (info->usesigseed) {
- if (info->sigseed.len == 0)
- get_and_write_random_bytes(&info->sigseed, DSA_SUBPRIME_LEN,
- "tmp.sigseed");
- TIMESTART();
- rv = DSA_SignDigestWithSeed(key, &info->out, &info->in,
- info->sigseed.data);
- TIMEFINISH("DSA SIGN", info->in.len);
- } else {
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = DSA_SignDigest(key, &info->out, &info->in);
- TIMEFINISH("DSA SIGN", info->in.len);
- }
- CHECKERROR(rv, __LINE__);
- } else {
- DSAPublicKey pubkey;
- PRArenaPool *arena;
- arena = key->params.arena;
- SECITEM_CopyItem(arena, &pubkey.params.prime, &key->params.prime);
- SECITEM_CopyItem(arena, &pubkey.params.subPrime, &key->params.subPrime);
- SECITEM_CopyItem(arena, &pubkey.params.base, &key->params.base);
- SECITEM_CopyItem(arena, &pubkey.publicValue, &key->publicValue);
- TIMESTART();
- for (i=0; i<numiter; i++)
- rv = DSA_VerifyDigest(&pubkey, &info->out, &info->in);
- TIMEFINISH("DSA VERIFY", info->in.len);
- if (rv == SECSuccess) {
- PR_fprintf(PR_STDOUT, "Signature verified.\n");
- } else {
- PR_fprintf(PR_STDOUT, "Signature failed verification!\n");
- CHECKERROR(rv, __LINE__);
- }
- }
- PORT_FreeArena(key->params.arena, PR_TRUE);
- return SECSuccess;
-}
-
-static SECStatus
-md5_multi_test(blapitestInfo *info)
-{
- SECStatus rv = SECSuccess;
- MD5Context *md5cx;
- unsigned int len;
- MD5Context *foomd5cx;
- unsigned char *foomd5;
- int i;
- if (info->in.len == 0) {
- rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");
- CHECKERROR(rv, __LINE__);
- }
- md5cx = MD5_NewContext();
- if (!md5cx) {
- PR_fprintf(PR_STDERR,
- "%s: Failed to create hash context!\n", progName);
- return SECFailure;
- }
- info->out.len = MD5_LENGTH;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- MD5_Begin(md5cx);
- for (i=0; i<info->bufsize/8; i++) {
- MD5_Update(md5cx, &info->in.data[i*8], 8);
- len = MD5_FlattenSize(md5cx);
- foomd5 = PORT_Alloc(len);
- MD5_Flatten(md5cx, foomd5);
- foomd5cx = MD5_Resurrect(foomd5, NULL);
- rv = PORT_Memcmp(foomd5cx, md5cx, len);
- if (rv != SECSuccess)
- PR_fprintf(PR_STDERR, "%s: MD5_Resurrect failed!\n", progName);
- MD5_DestroyContext(foomd5cx, PR_TRUE);
- PORT_Free(foomd5);
- }
- MD5_End(md5cx, info->out.data, &len, MD5_LENGTH);
- if (len != MD5_LENGTH)
- PR_fprintf(PR_STDERR, "%s: Bad hash size %d.\n", progName, len);
- MD5_DestroyContext(md5cx, PR_TRUE);
- return rv;
-}
-
-static SECStatus
-md5_test(blapitestInfo *info)
-{
- SECStatus rv = SECSuccess;
- PRIntervalTime time1, time2;
- int i;
- if (!info->hash) return SECFailure;
- if (info->multihash) return md5_multi_test(info);
- if (info->in.len == 0) {
- rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");
- CHECKERROR(rv, __LINE__);
- }
- info->out.len = MD5_LENGTH;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- TIMESTART();
- for (i=info->repetitions; i>0; i--) {
- MD5_HashBuf(info->out.data, info->in.data, info->in.len);
- }
- TIMEFINISH("MD5 HASH", info->in.len);
- return rv;
-}
-
-static SECStatus
-md2_multi_test(blapitestInfo *info)
-{
- SECStatus rv = SECSuccess;
- MD2Context *md2cx;
- unsigned int len;
- MD2Context *foomd2cx;
- unsigned char *foomd2;
- int i;
- if (!info->hash) return SECFailure;
- if (info->in.len == 0) {
- rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");
- CHECKERROR(rv, __LINE__);
- }
- md2cx = MD2_NewContext();
- if (!md2cx) {
- PR_fprintf(PR_STDERR,
- "%s: Failed to create hash context!\n", progName);
- return SECFailure;
- }
- info->out.len = MD2_LENGTH;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- MD2_Begin(md2cx);
- for (i=0; i<info->bufsize/8; i++) {
- MD2_Update(md2cx, &info->in.data[i*8], 8);
- len = MD2_FlattenSize(md2cx);
- foomd2 = PORT_Alloc(len);
- MD2_Flatten(md2cx, foomd2);
- foomd2cx = MD2_Resurrect(foomd2, NULL);
- rv = PORT_Memcmp(foomd2cx, md2cx, len);
- if (rv != SECSuccess)
- PR_fprintf(PR_STDERR, "%s: MD2_Resurrect failed!\n", progName);
- MD2_DestroyContext(foomd2cx, PR_TRUE);
- PORT_Free(foomd2);
- }
- MD2_End(md2cx, info->out.data, &len, MD2_LENGTH);
- if (len != MD2_LENGTH)
- PR_fprintf(PR_STDERR, "%s: Bad hash size %d.\n", progName, len);
- MD2_DestroyContext(md2cx, PR_TRUE);
- return rv;
-}
-
-static SECStatus
-md2_test(blapitestInfo *info)
-{
- unsigned int len;
- MD2Context *cx = MD2_NewContext();
- SECStatus rv = SECSuccess;
- PRIntervalTime time1, time2;
- int i;
- if (!info->hash) return SECFailure;
- if (info->multihash) return md2_multi_test(info);
- if (info->in.len == 0) {
- rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");
- CHECKERROR(rv, __LINE__);
- }
- info->out.len = 16;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- info->in.data[info->in.len] = '\0';
- TIMESTART();
- for (i=0; i<info->repetitions; i++) {
- MD2_Begin(cx);
- MD2_Update(cx, info->in.data, info->in.len);
- MD2_End(cx, info->out.data, &len, 16);
- }
- TIMEFINISH("MD2 HASH", info->in.len);
- MD2_DestroyContext(cx, PR_TRUE);
- return rv;
-}
-
-static SECStatus
-sha1_multi_test(blapitestInfo *info)
-{
- SECStatus rv = SECSuccess;
- SHA1Context *sha1cx;
- unsigned int len;
- SHA1Context *foosha1cx;
- unsigned char *foosha1;
- int i;
- if (info->in.len == 0) {
- rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");
- CHECKERROR(rv, __LINE__);
- }
- sha1cx = SHA1_NewContext();
- if (!sha1cx) {
- PR_fprintf(PR_STDERR,
- "%s: Failed to create hash context!\n", progName);
- return SECFailure;
- }
- info->out.len = SHA1_LENGTH;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- SHA1_Begin(sha1cx);
- for (i=0; i<info->bufsize/8; i++) {
- SHA1_Update(sha1cx, &info->in.data[i*8], 8);
- len = SHA1_FlattenSize(sha1cx);
- foosha1 = PORT_Alloc(len);
- SHA1_Flatten(sha1cx, foosha1);
- foosha1cx = SHA1_Resurrect(foosha1, NULL);
- rv = PORT_Memcmp(foosha1cx, sha1cx, len);
- if (rv != SECSuccess)
- PR_fprintf(PR_STDERR, "%s: SHA1_Resurrect failed!\n", progName);
- SHA1_DestroyContext(foosha1cx, PR_TRUE);
- PORT_Free(foosha1);
- }
- SHA1_End(sha1cx, info->out.data, &len, SHA1_LENGTH);
- if (len != SHA1_LENGTH)
- PR_fprintf(PR_STDERR, "%s: Bad hash size %d.\n", progName, len);
- SHA1_DestroyContext(sha1cx, PR_TRUE);
- return rv;
-}
-
-static SECStatus
-sha1_test(blapitestInfo *info)
-{
- unsigned int len;
- SHA1Context *cx = SHA1_NewContext();
- SECStatus rv = SECSuccess;
- PRIntervalTime time1, time2;
- int i;
- if (!info->hash) return SECFailure;
- if (info->multihash) return sha1_multi_test(info);
- if (info->in.len == 0) {
- rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");
- CHECKERROR(rv, __LINE__);
- }
- info->out.len = SHA1_LENGTH;
- info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);
- info->in.data[info->in.len] = '\0';
- TIMESTART();
- for (i=info->repetitions; i>0; i--) {
- SHA1_Begin(cx);
- SHA1_Update(cx, info->in.data, info->in.len);
- SHA1_End(cx, info->out.data, &len, SHA1_LENGTH);
- }
- TIMEFINISH("SHA1 HASH", info->in.len);
- SHA1_DestroyContext(cx, PR_TRUE);
- return rv;
-}
-
-typedef SECStatus (* blapitestCryptoFn)(blapitestInfo *);
-
-static blapitestCryptoFn crypto_fns[] =
-{
- des_ecb_test,
- des_cbc_test,
- des_ede_ecb_test,
- des_ede_cbc_test,
- rc2_ecb_test,
- rc2_cbc_test,
- rc4_test,
- rc5_ecb_test,
- rc5_cbc_test,
- rsa_test,
- NULL,
- pqg_test,
- dsa_test,
- NULL,
- md5_test,
- md2_test,
- sha1_test,
- NULL
-};
-
-static char *mode_strings[] =
-{
- "des_ecb",
- "des_cbc",
- "des3_ecb",
- "des3_cbc",
- "rc2_ecb",
- "rc2_cbc",
- "rc4",
- "rc5_ecb",
- "rc5_cbc",
- "rsa",
- "#endencrypt",
- "pqg",
- "dsa",
- "#endsign",
- "md5",
- "md2",
- "sha1",
- "#endhash"
-};
-
-static void
-printmodes(blapitestInfo *info)
-{
- int i = 0;
- char *mode = mode_strings[0];
- PR_fprintf(PR_STDERR, "Available modes: (specify with -m)\n", progName);
- while (mode[0] != '#') {
- if (info->encrypt || info->decrypt)
- fprintf(stderr, "%s\n", mode);
- mode = mode_strings[++i];
- }
- mode = mode_strings[++i];
- while (mode[0] != '#') {
- if (info->sign || info->verify)
- fprintf(stderr, "%s\n", mode);
- mode = mode_strings[++i];
- }
- mode = mode_strings[++i];
- while (mode[0] != '#') {
- if (info->hash)
- fprintf(stderr, "%s\n", mode);
- mode = mode_strings[++i];
- }
-}
-
-static blapitestCryptoFn
-get_test_mode(const char *modestring)
-{
- int i;
- int nummodes = sizeof(mode_strings) / sizeof(char *);
- for (i=0; i<nummodes; i++)
- if (PL_strcmp(modestring, mode_strings[i]) == 0)
- return crypto_fns[i];
- PR_fprintf(PR_STDERR, "%s: invalid mode: %s\n", progName, modestring);
- return NULL;
-}
-
-static void
-get_params(blapitestInfo *info, char *mode, int num)
-{
- SECItem *item;
- /* XXX
- * this should use NSPR, but the string functions (strchr and atoi)
- * barf when the commented code below is used.
- PRFileDesc *file;
- */
- FILE *file;
- char filename[32];
- char *mark, *param, *val;
- int index = 0;
- int len;
- sprintf(filename, "%s/tests/%s/params%d", testdir, mode, num);
- /*
- file = PR_Open(filename, PR_RDONLY, 00440);
- if (file)
- SECU_FileToItem(item, file);
- else
- return;
- param = (char *)item->data;
- */
- file = fopen(filename, "r");
- if (!file) return;
- param = malloc(100);
- len = fread(param, 1, 100, file);
- while (index < len) {
- mark = PL_strchr(param, '=');
- *mark = '\0';
- val = mark + 1;
- mark = PL_strchr(val, '\n');
- *mark = '\0';
- if (PL_strcmp(param, "rounds") == 0) {
- info->rounds = atoi(val);
- } else if (PL_strcmp(param, "wordsize") == 0) {
- info->wordsize = atoi(val);
- }
- index += PL_strlen(param) + PL_strlen(val) + 2;
- param = mark + 1;
- }
-}
-
-static SECStatus
-get_ascii_file_data(SECItem *item, char *mode, char *type, int num)
-{
- char filename[32];
- PRFileDesc *file;
- SECStatus rv;
- sprintf(filename, "%s/tests/%s/%s%d", testdir, mode, type, num);
- file = PR_Open(filename, PR_RDONLY, 00440);
- if (file) {
- rv = SECU_FileToItem(item, file);
- } else {
- /* Not a failure if "mode" does not need "type". */
- return SECSuccess;
- }
- if ((PL_strcmp(mode, "rsa") == 0 || PL_strcmp(mode, "dsa") == 0) &&
- PL_strcmp(type, "key") == 0)
- atob(SECITEM_DupItem(item), item);
- /* remove a trailing newline, else byte count will be wrong */
- if (item->data[item->len-1] == '\n')
- item->len--;
- PR_Close(file);
- return rv;
-}
-
-static SECStatus
-blapi_selftest(char **modesToTest, int numModesToTest)
-{
- blapitestCryptoFn cryptofn;
- blapitestInfo info;
- SECItem output, asciiOut, item, inpCopy;
- SECStatus rv;
- char filename[32];
- PRFileDesc *file;
- char *mode;
- int i, j, nummodes;
-
- PORT_Memset(&info, 0, sizeof(info));
- info.repetitions = 1;
- info.useseed = PR_TRUE;
- info.usesigseed = PR_TRUE;
- if (modesToTest) {
- /* user gave a list of modes to test */
- nummodes = numModesToTest;
- } else {
- /* test all modes */
- nummodes = sizeof(mode_strings) / sizeof(char *);
- }
- for (i=0; i<nummodes; i++) {
- if (modesToTest) {
- mode = modesToTest[i];
- } else {
- mode = mode_strings[i];
- }
- /* skip pqg - nothing to do for self-test. */
- if (PL_strcmp(mode, "pqg") == 0)
- continue;
- cryptofn = get_test_mode(mode);
- if (mode[0] == '#') continue;
- /* get the number of tests in the directory */
- sprintf(filename, "%s/tests/%s/%s", testdir, mode, "numtests");
- file = PR_Open(filename, PR_RDONLY, 00440);
- if (!file) {
- fprintf(stderr, "File %s does not exist.\n", filename);
- return SECFailure;
- }
- rv = SECU_FileToItem(&item, file);
- PR_Close(file);
- /* loop over the tests in the directory */
- for (j=0; j<(int)(item.data[0] - '0'); j++) {
- rv = get_ascii_file_data(&info.key, mode, "key", j);
- rv = get_ascii_file_data(&info.iv, mode, "iv", j);
- rv = get_ascii_file_data(&info.in, mode, "plaintext", j);
- rv = get_ascii_file_data(&info.seed, mode, "keyseed", j);
- rv = get_ascii_file_data(&info.sigseed, mode, "sigseed", j);
- SECITEM_CopyItem(NULL, &inpCopy, &info.in);
- get_params(&info, mode, j);
- sprintf(filename, "%s/tests/%s/%s%d", testdir, mode,
- "ciphertext", j);
- file = PR_Open(filename, PR_RDONLY, 00440);
- rv = SECU_FileToItem(&asciiOut, file);
- PR_Close(file);
- rv = atob(&asciiOut, &output);
- info.encrypt = info.hash = info.sign = PR_TRUE;
- (*cryptofn)(&info);
- if (SECITEM_CompareItem(&output, &info.out) != 0) {
- printf("encrypt self-test for %s failed!\n", mode);
- } else {
- printf("encrypt self-test for %s passed.\n", mode);
- }
- info.encrypt = info.hash = info.sign = PR_FALSE;
- info.decrypt = info.verify = PR_TRUE;
- if (PL_strcmp(mode, "dsa") == 0) {
- rv = (*cryptofn)(&info);
- if (rv == SECSuccess) {
- printf("signature self-test for %s passed.\n", mode);
- } else {
- printf("signature self-test for %s failed!\n", mode);
- }
- } else {
- SECITEM_ZfreeItem(&info.in, PR_FALSE);
- SECITEM_ZfreeItem(&info.out, PR_FALSE);
- SECITEM_CopyItem(NULL, &info.in, &output);
- info.out.len = 0;
- rv = (*cryptofn)(&info);
- if (rv == SECSuccess) {
- if (SECITEM_CompareItem(&inpCopy, &info.out) != 0) {
- printf("decrypt self-test for %s failed!\n", mode);
- } else {
- printf("decrypt self-test for %s passed.\n", mode);
- }
- }
- }
- }
- }
- return SECSuccess;
-}
-
-static SECStatus
-get_file_data(char *filename, SECItem *item, PRBool b64)
-{
- SECStatus rv = SECSuccess;
- PRFileDesc *file = PR_Open(filename, PR_RDONLY, 006600);
- if (file) {
- SECItem asciiItem;
- rv = SECU_FileToItem(&asciiItem, file);
- CHECKERROR(rv, __LINE__);
- if (b64) {
- rv = atob(&asciiItem, item);
- } else {
- SECITEM_CopyItem(NULL, item, &asciiItem);
- if (item->data[item->len-1] == '\n')
- item->len--;
- }
- CHECKERROR(rv, __LINE__);
- PR_Close(file);
- }
- return rv;
-}
-
-SECStatus
-dump_file(char *mode, char *filename)
-{
- SECItem item;
- if (PL_strcmp(mode, "rsa") == 0) {
- } else if (PL_strcmp(mode, "pqg") == 0) {
- PQGParams *pqg;
- get_file_data(filename, &item, PR_TRUE);
- pqg = pqg_from_filedata(&item);
- dump_pqg(pqg);
- } else if (PL_strcmp(mode, "dsa") == 0) {
- DSAPrivateKey *key;
- get_file_data(filename, &item, PR_TRUE);
- key = dsakey_from_filedata(&item);
- dump_dsakey(key);
- }
- return SECFailure;
-}
-
-int main(int argc, char **argv)
-{
- char *infile, *outfile, *keyfile, *ivfile, *sigfile, *seedfile,
- *sigseedfile, *pqgfile;
- PRBool b64 = PR_TRUE;
- blapitestInfo info;
- blapitestCryptoFn cryptofn = NULL;
- PLOptState *optstate;
- PLOptStatus status;
- PRBool dofips = PR_FALSE;
- PRBool doselftest = PR_FALSE;
- PRBool zerobuffer = PR_FALSE;
- char *dumpfile = NULL;
- char *mode = NULL;
- char *modesToTest[20];
- int numModesToTest = 0;
- SECStatus rv;
-
- PORT_Memset(&info, 0, sizeof(info));
- info.bufsize = 8;
- info.keysize = DES_KEY_LENGTH;
- info.rsapubexp = 17;
- info.rounds = 10;
- info.wordsize = 4;
- infile=outfile=keyfile=pqgfile=ivfile=sigfile=seedfile=sigseedfile=NULL;
- info.repetitions = 1;
- progName = strrchr(argv[0], '/');
- progName = progName ? progName+1 : argv[0];
- optstate = PL_CreateOptState(argc, argv,
- "DEFHP:STVab:d:ce:g:j:i:o:p:k:m:t:qr:s:v:w:xyz:");
- while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) {
- switch (optstate->option) {
- case 'D': info.decrypt = PR_TRUE; break;
- case 'E': info.encrypt = PR_TRUE; break;
- case 'F': dofips = PR_TRUE; break;
- case 'H': info.hash = PR_TRUE; break;
- case 'P': dumpfile = PL_strdup(optstate->value); break;
- case 'S': info.sign = PR_TRUE; break;
- case 'T': doselftest = PR_TRUE; break;
- case 'V': info.verify = PR_TRUE; break;
- case 'a': b64 = PR_FALSE; break;
- case 'b': info.bufsize = PORT_Atoi(optstate->value); break;
- case 'c': info.multihash = PR_TRUE; break;
- case 'd': testdir = PL_strdup(optstate->value); break;
- case 'e': info.rsapubexp = PORT_Atoi(optstate->value); break;
- case 'g': info.keysize = PORT_Atoi(optstate->value); break;
- case 'i': infile = PL_strdup(optstate->value); break;
- case 'j': pqgfile = PL_strdup(optstate->value); break;
- case 'k': keyfile = PL_strdup(optstate->value); break;
- case 'm': cryptofn = get_test_mode(optstate->value);
- mode = PL_strdup(optstate->value);
- break;
- case 'o': outfile = PL_strdup(optstate->value); break;
- case 'p': info.performance = PR_TRUE;
- info.repetitions = PORT_Atoi(optstate->value);
- break;
- case 'q': zerobuffer = PR_TRUE; break;
- case 'r': info.rounds = PORT_Atoi(optstate->value); break;
- case 's': sigfile = PL_strdup(optstate->value); break;
- case 't': sigseedfile = PL_strdup(optstate->value); break;
- case 'v': ivfile = PL_strdup(optstate->value); break;
- case 'w': info.wordsize = PORT_Atoi(optstate->value); break;
- case 'x': info.useseed = PR_TRUE; break;
- case 'y': info.usesigseed = PR_TRUE; break;
- case 'z': seedfile = PL_strdup(optstate->value); break;
- case '\0': if (optstate->value[0] != '-')
- modesToTest[numModesToTest++] =
- PL_strdup(optstate->value);
- break;
- default: break;
- }
- }
-
- if (dumpfile)
- return dump_file(mode, dumpfile);
-
- if (doselftest) {
- if (numModesToTest > 0) {
- return blapi_selftest(modesToTest, numModesToTest);
- } else {
- return blapi_selftest(NULL, 0);
- }
- }
-
- if (dofips) {
- CK_RV foo = pk11_fipsPowerUpSelfTest();
- PR_fprintf(PR_STDOUT, "CK_RV: %d.\n", foo);
- return 0;
- }
-
- if (!info.encrypt && !info.decrypt && !info.hash &&
- !info.sign && !info.verify)
- Usage();
-
- if (!cryptofn) {
- printmodes(&info);
- return -1;
- }
-
- if (info.decrypt && !infile)
- Usage();
-
- if (info.performance) {
- char buf[256];
- PRStatus stat;
- stat = PR_GetSystemInfo(PR_SI_HOSTNAME, buf, sizeof(buf));
- printf("HOST: %s\n", buf);
- stat = PR_GetSystemInfo(PR_SI_SYSNAME, buf, sizeof(buf));
- printf("SYSTEM: %s\n", buf);
- stat = PR_GetSystemInfo(PR_SI_RELEASE, buf, sizeof(buf));
- printf("RELEASE: %s\n", buf);
- stat = PR_GetSystemInfo(PR_SI_ARCHITECTURE, buf, sizeof(buf));
- printf("ARCH: %s\n", buf);
- }
-
- RNG_RNGInit();
-
- if (keyfile) {
- /* RSA and DSA keys are always b64 encoded. */
- if (b64 || PL_strcmp(mode,"rsa")==0 || PL_strcmp(mode,"dsa")==0)
- get_file_data(keyfile, &info.key, PR_TRUE);
- else
- get_file_data(keyfile, &info.key, b64);
- }
- if (ivfile)
- get_file_data(ivfile, &info.iv, b64);
- if (infile)
- get_file_data(infile, &info.in, b64);
- if (sigfile)
- get_file_data(sigfile, &info.out, PR_TRUE);
- if (seedfile) {
- get_file_data(seedfile, &info.seed, b64);
- info.useseed = PR_TRUE;
- }
- if (sigseedfile) {
- get_file_data(sigseedfile, &info.sigseed, b64);
- info.usesigseed = PR_TRUE;
- }
- if (pqgfile)
- get_file_data(pqgfile, &info.pqg, PR_TRUE);
-
- if (zerobuffer) {
- PRFileDesc *ifile;
- info.in.len = info.bufsize;
- info.in.data = PORT_ZAlloc(info.in.len);
- ifile = PR_Open("tmp.pt", PR_WRONLY|PR_CREATE_FILE, 00660);
- rv = btoa_file(&info.in, ifile);
- CHECKERROR((rv < 0), __LINE__);
- PR_Close(ifile);
- }
-
- rv = (*cryptofn)(&info);
- CHECKERROR(rv, __LINE__);
-
- if (!sigfile && info.out.len > 0) {
- PRFileDesc *ofile;
- if (!outfile)
- ofile = PR_Open("tmp.out", PR_WRONLY|PR_CREATE_FILE, 00660);
- else
- ofile = PR_Open(outfile, PR_WRONLY|PR_CREATE_FILE, 00660);
- rv = btoa_file(&info.out, ofile);
- PR_Close(ofile);
- CHECKERROR((rv < 0), __LINE__);
- }
-
- RNG_RNGShutdown();
-
- return SECSuccess;
-}
diff --git a/security/nss/cmd/bltest/manifest.mn b/security/nss/cmd/bltest/manifest.mn
deleted file mode 100644
index ad31bb961..000000000
--- a/security/nss/cmd/bltest/manifest.mn
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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 = security
-
-REQUIRES = seccmd dbm
-
-PROGRAM = bltest
-
-EXPORTS = \
- $(NULL)
-
-PRIVATE_EXPORTS = \
- $(NULL)
-
-CSRCS = \
- blapitest.c \
- $(NULL)
-
diff --git a/security/nss/cmd/bltest/tests/README b/security/nss/cmd/bltest/tests/README
deleted file mode 100644
index 998639aee..000000000
--- a/security/nss/cmd/bltest/tests/README
+++ /dev/null
@@ -1,26 +0,0 @@
-This directory contains a set of tests for each cipher supported by BLAPI. Each subdirectory contains known plaintext and ciphertext pairs (and keys and/or iv's if needed). The tests can be run as a full set with:
-bltest -T
-or as subsets, for example:
-bltest -T des_ecb rc2 rsa
-
-In each subdirectory, the plaintext, key, and iv are ascii, and treated as such. The ciphertext is base64-encoded to avoid the hassle of binary files.
-
-To add a test, incremement the value in the numtests file. Create a plaintext, key, and iv file, such that the name of the file is incrememted one from the last set of tests. For example, if you are adding the second test, put your data in files named plaintext1, key1, and iv1 (ignoring key and iv if they are not needed, of course). Make sure your key and iv are the correct number of bytes for your cipher (a trailing \n is okay, but any other trailing bytes will be used!). Once you have your input data, create output data by running bltest on a trusted implementation. For example, for a new DES ECB test, run
-bltest -E -m des_ecb -i plaintext1 -k key1 -o ciphertext1 -a
-in the tests/des_ecb directory. Then run
-bltest -T des_ecb
-from the cmd/bltest directory in the tree of the implementation you want to test.
-
-Note that the -a option above is important, it tells bltest to expect the input to be straight ASCII, and not base64 encoded binary!
-
-Special cases:
-
-RC5:
-RC5 can take additional parameters, the number of rounds to perform and the wordsize to use. The number of rounds is between is between 0 and 255, and the wordsize is either is either 16, 32, or 64 bits (at this time only 32-bit is supported). These parameters are specified in a paramsN file, where N is an index as above. The format of the file is "rounds=R\nwordsize=W\n".
-
-public key modes (RSA and DSA):
-Asymmetric key ciphers use keys with special properties, so creating a key file with "Mozilla!" in it will not get you very far! To create a public key, run bltest with the plaintext you want to encrypt, using a trusted implementation. bltest will generate a key and store it in "tmp.key", rename that file to keyN. For example:
-bltest -E -m rsa -i plaintext0 -o ciphertext0 -e 65537 -g 32 -a
-mv tmp.key key0
-
-[note: specifying a keysize (-g) when using RSA is important!] \ No newline at end of file
diff --git a/security/nss/cmd/bltest/tests/des3_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/des3_cbc/ciphertext0
deleted file mode 100644
index b5b78e440..000000000
--- a/security/nss/cmd/bltest/tests/des3_cbc/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-KV3MDNGKWOc=
diff --git a/security/nss/cmd/bltest/tests/des3_cbc/iv0 b/security/nss/cmd/bltest/tests/des3_cbc/iv0
deleted file mode 100644
index 97b5955f7..000000000
--- a/security/nss/cmd/bltest/tests/des3_cbc/iv0
+++ /dev/null
@@ -1 +0,0 @@
-12345678
diff --git a/security/nss/cmd/bltest/tests/des3_cbc/key0 b/security/nss/cmd/bltest/tests/des3_cbc/key0
deleted file mode 100644
index 588efd111..000000000
--- a/security/nss/cmd/bltest/tests/des3_cbc/key0
+++ /dev/null
@@ -1 +0,0 @@
-abcdefghijklmnopqrstuvwx
diff --git a/security/nss/cmd/bltest/tests/des3_cbc/numtests b/security/nss/cmd/bltest/tests/des3_cbc/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/des3_cbc/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/des3_cbc/plaintext0 b/security/nss/cmd/bltest/tests/des3_cbc/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/des3_cbc/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/des3_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/des3_ecb/ciphertext0
deleted file mode 100644
index 7bdcde21d..000000000
--- a/security/nss/cmd/bltest/tests/des3_ecb/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-RgckVNh4QcM=
diff --git a/security/nss/cmd/bltest/tests/des3_ecb/key0 b/security/nss/cmd/bltest/tests/des3_ecb/key0
deleted file mode 100644
index 588efd111..000000000
--- a/security/nss/cmd/bltest/tests/des3_ecb/key0
+++ /dev/null
@@ -1 +0,0 @@
-abcdefghijklmnopqrstuvwx
diff --git a/security/nss/cmd/bltest/tests/des3_ecb/numtests b/security/nss/cmd/bltest/tests/des3_ecb/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/des3_ecb/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/des3_ecb/plaintext0 b/security/nss/cmd/bltest/tests/des3_ecb/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/des3_ecb/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/des_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/des_cbc/ciphertext0
deleted file mode 100644
index 56acfeeaf..000000000
--- a/security/nss/cmd/bltest/tests/des_cbc/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-Perdg9FMYQ4=
diff --git a/security/nss/cmd/bltest/tests/des_cbc/iv0 b/security/nss/cmd/bltest/tests/des_cbc/iv0
deleted file mode 100644
index 97b5955f7..000000000
--- a/security/nss/cmd/bltest/tests/des_cbc/iv0
+++ /dev/null
@@ -1 +0,0 @@
-12345678
diff --git a/security/nss/cmd/bltest/tests/des_cbc/key0 b/security/nss/cmd/bltest/tests/des_cbc/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/des_cbc/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/des_cbc/numtests b/security/nss/cmd/bltest/tests/des_cbc/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/des_cbc/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/des_cbc/plaintext0 b/security/nss/cmd/bltest/tests/des_cbc/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/des_cbc/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/des_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/des_ecb/ciphertext0
deleted file mode 100644
index 86ed115a1..000000000
--- a/security/nss/cmd/bltest/tests/des_ecb/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-3bNoWzzNiFc=
diff --git a/security/nss/cmd/bltest/tests/des_ecb/key0 b/security/nss/cmd/bltest/tests/des_ecb/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/des_ecb/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/des_ecb/numtests b/security/nss/cmd/bltest/tests/des_ecb/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/des_ecb/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/des_ecb/plaintext0 b/security/nss/cmd/bltest/tests/des_ecb/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/des_ecb/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext0 b/security/nss/cmd/bltest/tests/dsa/ciphertext0
deleted file mode 100644
index 784581fae..000000000
--- a/security/nss/cmd/bltest/tests/dsa/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-gG8blX+paEQhO6vfYbOJTk8VnulxdWZwl4q2LG+QZuxFMOmuKedJ0g==
diff --git a/security/nss/cmd/bltest/tests/dsa/key0 b/security/nss/cmd/bltest/tests/dsa/key0
deleted file mode 100644
index ce4aab925..000000000
--- a/security/nss/cmd/bltest/tests/dsa/key0
+++ /dev/null
@@ -1,6 +0,0 @@
-AAAAQPMqxsvVL4Wyzr79fr0/61V0IbRwQ+KdFgP1rdaCzTmh+zMXOL47dBC5sL2v
-0df+bpOitrFZeiLchi6Mc+wpjREAAAAUmMYJXJpQuVvoX782XJeR1RiGRo0AAABA
-gwPAlkPOf8Mm/ZhKhzxu/IJv5QPsFmV6cZsASJmYlgty3gIheyB+V/H0rTmSgTTu
-jgqFjPhwEkCDVKV8ciuQ/QAAAEEAqfgFS3p3KP86A9LIzJBVTIwsV7xB6dp1J6w5
-070lCOfMWQYFR2jx8SxDWsar9SfNTNx4TKJPHLpd278pJ4J2tAAAABQyMC1ieXRl
-IHNlZWQgZm9yIGtleQ==
diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed0 b/security/nss/cmd/bltest/tests/dsa/keyseed0
deleted file mode 100644
index c90af8bb7..000000000
--- a/security/nss/cmd/bltest/tests/dsa/keyseed0
+++ /dev/null
@@ -1 +0,0 @@
-20-byte seed for key
diff --git a/security/nss/cmd/bltest/tests/dsa/numtests b/security/nss/cmd/bltest/tests/dsa/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/dsa/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext0 b/security/nss/cmd/bltest/tests/dsa/plaintext0
deleted file mode 100644
index 8b561c5b7..000000000
--- a/security/nss/cmd/bltest/tests/dsa/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Buffer to sign w/DSA
diff --git a/security/nss/cmd/bltest/tests/dsa/pqg0 b/security/nss/cmd/bltest/tests/dsa/pqg0
deleted file mode 100644
index a6459738f..000000000
--- a/security/nss/cmd/bltest/tests/dsa/pqg0
+++ /dev/null
@@ -1,4 +0,0 @@
-AAAAQPMqxsvVL4Wyzr79fr0/61V0IbRwQ+KdFgP1rdaCzTmh+zMXOL47dBC5sL2v
-0df+bpOitrFZeiLchi6Mc+wpjREAAAAUmMYJXJpQuVvoX782XJeR1RiGRo0AAABA
-gwPAlkPOf8Mm/ZhKhzxu/IJv5QPsFmV6cZsASJmYlgty3gIheyB+V/H0rTmSgTTu
-jgqFjPhwEkCDVKV8ciuQ/Q==
diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed0 b/security/nss/cmd/bltest/tests/dsa/sigseed0
deleted file mode 100644
index 45f7e2421..000000000
--- a/security/nss/cmd/bltest/tests/dsa/sigseed0
+++ /dev/null
@@ -1 +0,0 @@
-20-byte seed for sig
diff --git a/security/nss/cmd/bltest/tests/md2/ciphertext0 b/security/nss/cmd/bltest/tests/md2/ciphertext0
deleted file mode 100644
index 0b7bc262f..000000000
--- a/security/nss/cmd/bltest/tests/md2/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-CS/UNcrWhB5Knt7Gf8Tz3Q==
diff --git a/security/nss/cmd/bltest/tests/md2/numtests b/security/nss/cmd/bltest/tests/md2/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/md2/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/md2/plaintext0 b/security/nss/cmd/bltest/tests/md2/plaintext0
deleted file mode 100644
index dce2994ba..000000000
--- a/security/nss/cmd/bltest/tests/md2/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-16-bytes to MD2.
diff --git a/security/nss/cmd/bltest/tests/md5/ciphertext0 b/security/nss/cmd/bltest/tests/md5/ciphertext0
deleted file mode 100644
index 7bb485d01..000000000
--- a/security/nss/cmd/bltest/tests/md5/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-XN8lnQuWAiMqmSGfvd8Hdw==
diff --git a/security/nss/cmd/bltest/tests/md5/numtests b/security/nss/cmd/bltest/tests/md5/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/md5/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/md5/plaintext0 b/security/nss/cmd/bltest/tests/md5/plaintext0
deleted file mode 100644
index 5ae3875e2..000000000
--- a/security/nss/cmd/bltest/tests/md5/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-63-byte input to MD5 can be a bit tricky, but no problems here.
diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0
deleted file mode 100644
index 91ddac381..000000000
--- a/security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-3ki6eVsWpY8=
diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/iv0 b/security/nss/cmd/bltest/tests/rc2_cbc/iv0
deleted file mode 100644
index 97b5955f7..000000000
--- a/security/nss/cmd/bltest/tests/rc2_cbc/iv0
+++ /dev/null
@@ -1 +0,0 @@
-12345678
diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/key0 b/security/nss/cmd/bltest/tests/rc2_cbc/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/rc2_cbc/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/numtests b/security/nss/cmd/bltest/tests/rc2_cbc/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/rc2_cbc/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/plaintext0 b/security/nss/cmd/bltest/tests/rc2_cbc/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/rc2_cbc/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0
deleted file mode 100644
index c569f4dbd..000000000
--- a/security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-WT+tc4fANhQ=
diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/key0 b/security/nss/cmd/bltest/tests/rc2_ecb/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/rc2_ecb/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/numtests b/security/nss/cmd/bltest/tests/rc2_ecb/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/rc2_ecb/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/plaintext0 b/security/nss/cmd/bltest/tests/rc2_ecb/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/rc2_ecb/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/rc4/ciphertext0 b/security/nss/cmd/bltest/tests/rc4/ciphertext0
deleted file mode 100644
index e0c2147dc..000000000
--- a/security/nss/cmd/bltest/tests/rc4/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-34sTZJtr20k=
diff --git a/security/nss/cmd/bltest/tests/rc4/key0 b/security/nss/cmd/bltest/tests/rc4/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/rc4/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/rc4/numtests b/security/nss/cmd/bltest/tests/rc4/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/rc4/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/rc4/plaintext0 b/security/nss/cmd/bltest/tests/rc4/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/rc4/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0
deleted file mode 100644
index 2c5ae7e44..000000000
--- a/security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-qsv4Fn2J6d0=
diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/iv0 b/security/nss/cmd/bltest/tests/rc5_cbc/iv0
deleted file mode 100644
index 97b5955f7..000000000
--- a/security/nss/cmd/bltest/tests/rc5_cbc/iv0
+++ /dev/null
@@ -1 +0,0 @@
-12345678
diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/key0 b/security/nss/cmd/bltest/tests/rc5_cbc/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/rc5_cbc/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/numtests b/security/nss/cmd/bltest/tests/rc5_cbc/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/rc5_cbc/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/params0 b/security/nss/cmd/bltest/tests/rc5_cbc/params0
deleted file mode 100644
index d68e0362d..000000000
--- a/security/nss/cmd/bltest/tests/rc5_cbc/params0
+++ /dev/null
@@ -1,2 +0,0 @@
-rounds=10
-wordsize=4
diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/plaintext0 b/security/nss/cmd/bltest/tests/rc5_cbc/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/rc5_cbc/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0
deleted file mode 100644
index 67c88bc8a..000000000
--- a/security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-4ZKK/1v5Ohc=
diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/key0 b/security/nss/cmd/bltest/tests/rc5_ecb/key0
deleted file mode 100644
index 65513c116..000000000
--- a/security/nss/cmd/bltest/tests/rc5_ecb/key0
+++ /dev/null
@@ -1 +0,0 @@
-zyxwvuts
diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/numtests b/security/nss/cmd/bltest/tests/rc5_ecb/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/rc5_ecb/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/params0 b/security/nss/cmd/bltest/tests/rc5_ecb/params0
deleted file mode 100644
index d68e0362d..000000000
--- a/security/nss/cmd/bltest/tests/rc5_ecb/params0
+++ /dev/null
@@ -1,2 +0,0 @@
-rounds=10
-wordsize=4
diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/plaintext0 b/security/nss/cmd/bltest/tests/rc5_ecb/plaintext0
deleted file mode 100644
index 5513e438c..000000000
--- a/security/nss/cmd/bltest/tests/rc5_ecb/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-Mozilla!
diff --git a/security/nss/cmd/bltest/tests/rsa/ciphertext0 b/security/nss/cmd/bltest/tests/rsa/ciphertext0
deleted file mode 100644
index e6357efd7..000000000
--- a/security/nss/cmd/bltest/tests/rsa/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-qPVrXv0y3SC5rY44bIi6GE4Aec8uDpHH7/cCg0FU5as=
diff --git a/security/nss/cmd/bltest/tests/rsa/key0 b/security/nss/cmd/bltest/tests/rsa/key0
deleted file mode 100644
index 1352fe986..000000000
--- a/security/nss/cmd/bltest/tests/rsa/key0
+++ /dev/null
@@ -1,4 +0,0 @@
-AAAAAAAAACC5lyu2K2ro8YGnvOCKaL1sFX1HEIblIVbuMXsa8oeFSwAAAAERAAAA
-IBXVjKwFG6LvPG4WOIjBBzmxGNpkQwDs3W5qZcXVzqahAAAAEOEOH/WnhZCJyM39
-oNfhf18AAAAQ0xvmxqXXs3L62xxogUl9lQAAABAaeiHgqkvy4wiQtG1Gkv/tAAAA
-EMaw2TNu6SFdKFXAYluQdjEAAAAQi0u+IlgKCt/hatGAsTrfzQ==
diff --git a/security/nss/cmd/bltest/tests/rsa/numtests b/security/nss/cmd/bltest/tests/rsa/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/rsa/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/rsa/plaintext0 b/security/nss/cmd/bltest/tests/rsa/plaintext0
deleted file mode 100644
index d915bc88c..000000000
--- a/security/nss/cmd/bltest/tests/rsa/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-512bitsforRSAPublicKeyEncryption
diff --git a/security/nss/cmd/bltest/tests/sha1/ciphertext0 b/security/nss/cmd/bltest/tests/sha1/ciphertext0
deleted file mode 100644
index a33d020cd..000000000
--- a/security/nss/cmd/bltest/tests/sha1/ciphertext0
+++ /dev/null
@@ -1 +0,0 @@
-cDSMAygXMPIJZC5bntZ4ZhecQ9g=
diff --git a/security/nss/cmd/bltest/tests/sha1/numtests b/security/nss/cmd/bltest/tests/sha1/numtests
deleted file mode 100644
index d00491fd7..000000000
--- a/security/nss/cmd/bltest/tests/sha1/numtests
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/security/nss/cmd/bltest/tests/sha1/plaintext0 b/security/nss/cmd/bltest/tests/sha1/plaintext0
deleted file mode 100644
index 863e79c65..000000000
--- a/security/nss/cmd/bltest/tests/sha1/plaintext0
+++ /dev/null
@@ -1 +0,0 @@
-A cage went in search of a bird.
diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c
index 794ac11f7..113892283 100644
--- a/security/nss/cmd/certutil/certutil.c
+++ b/security/nss/cmd/certutil/certutil.c
@@ -100,7 +100,7 @@ GetGeneralName (PRArenaPool *arena)
PORT_Assert (arena);
mark = PORT_ArenaMark (arena);
do {
- fflush (stdin);
+ /*fflush (stdin);*/
puts ("\nSelect one of the following general name type: \n");
puts ("\t1 - instance of other name\n\t2 - rfc822Name\n\t3 - dnsName\n");
puts ("\t4 - x400Address\n\t5 - directoryName\n\t6 - ediPartyName\n");
@@ -123,7 +123,7 @@ GetGeneralName (PRArenaPool *arena)
}
current->type = intValue;
puts ("\nEnter data:");
- fflush (stdin);
+ /*fflush (stdin); */
fflush (stdout);
gets (buffer);
switch (current->type) {
@@ -198,7 +198,7 @@ GetString(PRArenaPool *arena, char *prompt, SECItem *value)
value->len = 0;
puts (prompt);
- fflush (stdin);
+ /*fflush (stdin);*/
gets (buffer);
if (strlen (buffer) > 0) {
value->data = PORT_ArenaAlloc (arena, strlen (buffer));
@@ -1521,7 +1521,7 @@ AddBasicConstraint(void *extHandle)
do {
basicConstraint.pathLenConstraint = CERT_UNLIMITED_PATH_CONSTRAINT;
puts ("Is this a CA certificate [y/n]?");
- fflush (stdin);
+ /*fflush (stdin);*/
gets (buffer);
basicConstraint.isCA = (buffer[0] == 'Y' || buffer[0] == 'y') ?
PR_TRUE : PR_FALSE;
@@ -1550,7 +1550,7 @@ AddBasicConstraint(void *extHandle)
static SECItem *
SignCert(CERTCertDBHandle *handle,
CERTCertificate *cert, PRBool selfsign,
-SECKEYPrivateKey *selfsignprivkey, char *issuerNickName)
+SECKEYPrivateKey *selfsignprivkey, char *issuerNickName, void *pwarg)
{
SECItem der;
SECItem *result = NULL;
@@ -1564,14 +1564,14 @@ SECKEYPrivateKey *selfsignprivkey, char *issuerNickName)
caPrivateKey = selfsignprivkey;
} else {
/*CERTCertificate *issuer = CERT_FindCertByNickname(handle, issuerNickName);*/
- CERTCertificate *issuer = PK11_FindCertFromNickname(issuerNickName, NULL);
+ CERTCertificate *issuer = PK11_FindCertFromNickname(issuerNickName, pwarg);
if( (CERTCertificate *)NULL == issuer ) {
SECU_PrintError(progName, "unable to find issuer with nickname %s",
issuerNickName);
return (SECItem *)NULL;
}
- caPrivateKey = PK11_FindKeyByAnyCert(issuer, (void *)NULL);
+ caPrivateKey = PK11_FindKeyByAnyCert(issuer, pwarg);
if (caPrivateKey == NULL) {
SECU_PrintError(progName, "unable to retrieve key %s", issuerNickName);
return NULL;
@@ -1654,7 +1654,7 @@ AddAuthKeyID (void *extHandle)
GEN_BREAK (SECFailure);
}
- fflush (stdin);
+ /*fflush (stdin);*/
rv = GetString (arena, "Enter value for the key identifier fields, enter to omit:",
&authKeyID->keyID);
if (rv != SECSuccess)
@@ -1706,7 +1706,7 @@ AddCrlDistPoint(void *extHandle)
GEN_BREAK (SECFailure);
}
- fflush (stdin);
+ /*fflush (stdin);*/
/* Get the distributionPointName fields - this field is optional */
puts ("Enter the type of the distribution point name:\n");
puts ("\t1 - Full Name\n\t2 - Relative Name\n\tOther - omit\n\t\tChoice: ");
@@ -1725,7 +1725,7 @@ AddCrlDistPoint(void *extHandle)
current->distPointType = intValue;
puts ("Enter the relative name: ");
fflush (stdout);
- fflush (stdin);
+ /*fflush (stdin);*/
gets (buffer);
/* For simplicity, use CERT_AsciiToName to converse from a string
to NAME, but we only interest in the first RDN */
@@ -1792,7 +1792,7 @@ AddCrlDistPoint(void *extHandle)
} while (1);
if (rv == SECSuccess) {
- fflush (stdin);
+ /*fflush (stdin);*/
buffer[0] = 'n';
puts ("Is this a critical extension [y/n]? ");
gets (buffer);
@@ -1817,6 +1817,7 @@ CreateCert(
int serialNumber,
int warpmonths,
int validitylength,
+ void *pwarg,
PRBool selfsign,
PRBool keyUsage,
PRBool extKeyUsage,
@@ -1901,7 +1902,7 @@ CreateCert(
CERT_FinishExtensions(extHandle);
- certDER = SignCert (handle, subjectCert, selfsign, selfsignprivkey, issuerNickName);
+ certDER = SignCert (handle, subjectCert, selfsign, selfsignprivkey, issuerNickName, pwarg);
if (certDER)
PR_Write(outFile, certDER->data, certDER->len);
@@ -2480,10 +2481,15 @@ main(int argc, char **argv)
/* Create a certificate (-C or -S). */
if (certutil.commands[cmd_CreateAndAddCert].activated ||
certutil.commands[cmd_CreateNewCert].activated) {
+ if ( certutil.options[opt_PasswordFile].arg) {
+ pwdata.source = PW_FROMFILE;
+ pwdata.data = certutil.options[opt_PasswordFile].arg;
+ }
rv = CreateCert(certHandle,
certutil.options[opt_IssuerName].arg,
inFile, outFile, privkey,
serialNumber, warpmonths, validitylength,
+ &pwdata,
certutil.options[opt_SelfSign].activated,
certutil.options[opt_AddKeyUsageExt].activated,
certutil.options[opt_AddExtKeyUsageExt].activated,
diff --git a/security/nss/cmd/lib/secpwd.c b/security/nss/cmd/lib/secpwd.c
index c235c3ffa..7f01b7c1a 100644
--- a/security/nss/cmd/lib/secpwd.c
+++ b/security/nss/cmd/lib/secpwd.c
@@ -155,6 +155,10 @@ static int quiet_fgets (char *buf, int length, FILE *input)
/* fflush (input); */
memset (buf, 0, length);
+ if (input != stdin) {
+ return fgets(buf,length,input);
+ }
+
while (1)
{
c = getch();
diff --git a/security/nss/cmd/lib/secutil.c b/security/nss/cmd/lib/secutil.c
index 27ae30436..bd2c5feca 100644
--- a/security/nss/cmd/lib/secutil.c
+++ b/security/nss/cmd/lib/secutil.c
@@ -256,6 +256,7 @@ SECU_FilePasswd(PK11SlotInfo *slot, PRBool retry, void *arg)
PR_Close(fd);
if (phrase[nb-1] == '\n') {
+ if ( nb > 2 && phrase[nb-2] == '\r' ) nb--;
phrase[nb-1] = '\0';
if (nb == 0) {
fprintf(stderr,"password file contains no data\n");
@@ -309,7 +310,11 @@ secu_InitSlotPassword(PK11SlotInfo *slot, PRBool retry, void *arg)
if (pwdata->source == PW_NONE) {
/* open terminal */
+#ifdef _WINDOWS
+ input = stdin;
+#else
input = fopen(consoleName, "r");
+#endif
if (input == NULL) {
PR_fprintf(PR_STDERR, "Error opening input terminal for read\n");
return NULL;
@@ -393,9 +398,16 @@ SECU_ChangePW(PK11SlotInfo *slot, char *passwd, char *pwFile)
for (;;) {
oldpw = SECU_GetModulePassword(slot, PR_FALSE, &pwdata);
- if (PK11_CheckUserPassword(slot, oldpw) != SECSuccess)
- PR_fprintf(PR_STDERR, "Invalid password. Try again.\n");
- else
+ if (PK11_CheckUserPassword(slot, oldpw) != SECSuccess) {
+ if (pwdata.source == PW_NONE) {
+ PR_fprintf(PR_STDERR, "Invalid password. Try again.\n");
+ } else {
+ PR_fprintf(PR_STDERR, "Invalid password.\n");
+ PORT_Memset(oldpw, 0, PL_strlen(oldpw));
+ PORT_Free(oldpw);
+ return SECFailure;
+ }
+ } else
break;
PORT_Free(oldpw);
diff --git a/security/nss/cmd/selfserv/selfserv.c b/security/nss/cmd/selfserv/selfserv.c
index 37fdedf38..f6ba17009 100644
--- a/security/nss/cmd/selfserv/selfserv.c
+++ b/security/nss/cmd/selfserv/selfserv.c
@@ -144,7 +144,7 @@ Usage(const char *progName)
fprintf(stderr,
"Usage: %s -n rsa_nickname -p port [-3RTmrvx] [-w password]\n"
-" [-c ciphers] [-d dbdir] [-f fortezza_nickname] \n"
+" [-i pid_file] [-c ciphers] [-d dbdir] [-f fortezza_nickname] \n"
"-3 means disable SSL v3\n"
"-T means disable TLS\n"
"-R means disable detection of rollback from TLS to SSL3\n"
@@ -156,6 +156,7 @@ Usage(const char *progName)
" 4 -r's mean request and require, cert on second handshake.\n"
"-v means verbose output\n"
"-x means use export policy.\n"
+"-i pid_file file to write the process id of selfserve\n"
"-c ciphers Letter(s) chosen from the following list\n"
"A SSL2 RC4 128 WITH MD5\n"
"B SSL2 RC4 128 EXPORT40 WITH MD5\n"
@@ -1162,6 +1163,7 @@ main(int argc, char **argv)
char * cipherString= NULL;
char * dir = ".";
char * passwd = NULL;
+ char * pidFile = NULL;
char * tmp;
CERTCertificate * cert [kt_kea_size] = { NULL };
SECKEYPrivateKey * privKey[kt_kea_size] = { NULL };
@@ -1176,7 +1178,7 @@ main(int argc, char **argv)
progName = strrchr(tmp, '\\');
progName = progName ? progName + 1 : tmp;
- optstate = PL_CreateOptState(argc, argv, "RT2:3c:d:p:mn:f:rvw:x");
+ optstate = PL_CreateOptState(argc, argv, "RT2:3c:d:p:mn:i:f:rvw:x");
while (PL_GetNextOpt(optstate) == PL_OPT_OK) {
switch(optstate->option) {
default:
@@ -1200,6 +1202,8 @@ main(int argc, char **argv)
case 'n': nickName = optstate->value; break;
+ case 'i': pidFile = optstate->value; break;
+
case 'p': port = PORT_Atoi(optstate->value); break;
case 'r': ++requestCert; break;
@@ -1218,6 +1222,16 @@ main(int argc, char **argv)
if (port == 0)
Usage(progName);
+ if (pidFile) {
+ FILE *tmpfile=fopen(pidFile,"w+");
+
+ if (tmpfile) {
+ fprintf(tmpfile,"%d",getpid());
+ fclose(tmpfile);
+ }
+ }
+
+
/* Call the NSPR initialization routines */
PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1);
diff --git a/security/nss/lib/certdb/certdb.h b/security/nss/lib/certdb/certdb.h
index 7710b72c9..e0a9158bf 100644
--- a/security/nss/lib/certdb/certdb.h
+++ b/security/nss/lib/certdb/certdb.h
@@ -43,7 +43,7 @@
/* version number of certificate database */
#define CERT_DB_FILE_VERSION 7
#ifdef USE_NS_ROOTS
-#define CERT_DB_CONTENT_VERSION 24
+#define CERT_DB_CONTENT_VERSION 25
#else
#define CERT_DB_CONTENT_VERSION 2
#endif
diff --git a/security/nss/lib/ckfw/dbm/Makefile b/security/nss/lib/ckfw/dbm/Makefile
deleted file mode 100644
index 03e1fb4c6..000000000
--- a/security/nss/lib/ckfw/dbm/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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.
-#
-MAKEFILE_CVS_ID = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"
-
-include manifest.mn
-include config.mk
-include $(CORE_DEPTH)/coreconf/config.mk
-include $(CORE_DEPTH)/coreconf/rules.mk
diff --git a/security/nss/lib/ckfw/dbm/anchor.c b/security/nss/lib/ckfw/dbm/anchor.c
deleted file mode 100644
index 588fd00e0..000000000
--- a/security/nss/lib/ckfw/dbm/anchor.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-/*
- * dbm/anchor.c
- *
- * This file "anchors" the actual cryptoki entry points in this module's
- * shared library, which is required for dynamic loading. See the
- * comments in nssck.api for more information.
- */
-
-#include "ckdbm.h"
-
-#define MODULE_NAME dbm
-#define INSTANCE_NAME (NSSCKMDInstance *)&nss_dbm_mdInstance
-#include "nssck.api"
diff --git a/security/nss/lib/ckfw/dbm/ckdbm.h b/security/nss/lib/ckfw/dbm/ckdbm.h
deleted file mode 100644
index 7bab87ec7..000000000
--- a/security/nss/lib/ckfw/dbm/ckdbm.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CKDBM_CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef CKDBM_H
-#define CKDBM_H
-
-#include "nssckmdt.h"
-#include "nssckfw.h"
-
-/*
- * I'm including this for access to the arena functions.
- * Looks like we should publish that API.
- */
-#ifndef BASE_H
-#include "base.h"
-#endif /* BASE_H */
-
-/*
- * This is where the Netscape extensions live, at least for now.
- */
-#ifndef CKT_H
-#include "ckt.h"
-#endif /* CKT_H */
-
-#include "mcom_db.h"
-
-NSS_EXTERN_DATA NSSCKMDInstance nss_dbm_mdInstance;
-
-typedef struct nss_dbm_db_struct nss_dbm_db_t;
-struct nss_dbm_db_struct {
- DB *db;
- NSSCKFWMutex *crustylock;
-};
-
-typedef struct nss_dbm_dbt_struct nss_dbm_dbt_t;
-struct nss_dbm_dbt_struct {
- DBT dbt;
- nss_dbm_db_t *my_db;
-};
-
-typedef struct nss_dbm_instance_struct nss_dbm_instance_t;
-struct nss_dbm_instance_struct {
- NSSArena *arena;
- CK_ULONG nSlots;
- char **filenames;
- int *flags; /* e.g. O_RDONLY, O_RDWR */
-};
-
-typedef struct nss_dbm_slot_struct nss_dbm_slot_t;
-struct nss_dbm_slot_struct {
- nss_dbm_instance_t *instance;
- char *filename;
- int flags;
- nss_dbm_db_t *token_db;
-};
-
-typedef struct nss_dbm_token_struct nss_dbm_token_t;
-struct nss_dbm_token_struct {
- NSSArena *arena;
- nss_dbm_slot_t *slot;
- nss_dbm_db_t *session_db;
- NSSUTF8 *label;
-};
-
-struct nss_dbm_dbt_node {
- struct nss_dbm_dbt_node *next;
- nss_dbm_dbt_t *dbt;
-};
-
-typedef struct nss_dbm_session_struct nss_dbm_session_t;
-struct nss_dbm_session_struct {
- NSSArena *arena;
- nss_dbm_token_t *token;
- CK_ULONG deviceError;
- struct nss_dbm_dbt_node *session_objects;
- NSSCKFWMutex *list_lock;
-};
-
-typedef struct nss_dbm_object_struct nss_dbm_object_t;
-struct nss_dbm_object_struct {
- NSSArena *arena; /* token or session */
- nss_dbm_dbt_t *handle;
-};
-
-typedef struct nss_dbm_find_struct nss_dbm_find_t;
-struct nss_dbm_find_struct {
- NSSArena *arena;
- struct nss_dbm_dbt_node *found;
- NSSCKFWMutex *list_lock;
-};
-
-NSS_EXTERN NSSCKMDSlot *
-nss_dbm_mdSlot_factory
-(
- nss_dbm_instance_t *instance,
- char *filename,
- int flags,
- CK_RV *pError
-);
-
-NSS_EXTERN NSSCKMDToken *
-nss_dbm_mdToken_factory
-(
- nss_dbm_slot_t *slot,
- CK_RV *pError
-);
-
-NSS_EXTERN NSSCKMDSession *
-nss_dbm_mdSession_factory
-(
- nss_dbm_token_t *token,
- NSSCKFWSession *fwSession,
- NSSCKFWInstance *fwInstance,
- CK_BBOOL rw,
- CK_RV *pError
-);
-
-NSS_EXTERN NSSCKMDObject *
-nss_dbm_mdObject_factory
-(
- nss_dbm_object_t *object,
- CK_RV *pError
-);
-
-NSS_EXTERN NSSCKMDFindObjects *
-nss_dbm_mdFindObjects_factory
-(
- nss_dbm_find_t *find,
- CK_RV *pError
-);
-
-NSS_EXTERN nss_dbm_db_t *
-nss_dbm_db_open
-(
- NSSArena *arena,
- NSSCKFWInstance *fwInstance,
- char *filename,
- int flags,
- CK_RV *pError
-);
-
-NSS_EXTERN void
-nss_dbm_db_close
-(
- nss_dbm_db_t *db
-);
-
-NSS_EXTERN CK_VERSION
-nss_dbm_db_get_format_version
-(
- nss_dbm_db_t *db
-);
-
-NSS_EXTERN CK_RV
-nss_dbm_db_set_label
-(
- nss_dbm_db_t *db,
- NSSUTF8 *label
-);
-
-NSS_EXTERN NSSUTF8 *
-nss_dbm_db_get_label
-(
- nss_dbm_db_t *db,
- NSSArena *arena,
- CK_RV *pError
-);
-
-NSS_EXTERN CK_RV
-nss_dbm_db_delete_object
-(
- nss_dbm_dbt_t *dbt
-);
-
-NSS_EXTERN nss_dbm_dbt_t *
-nss_dbm_db_create_object
-(
- NSSArena *arena,
- nss_dbm_db_t *db,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- CK_RV *pError,
- CK_ULONG *pdbrv
-);
-
-NSS_EXTERN CK_RV
-nss_dbm_db_find_objects
-(
- nss_dbm_find_t *find,
- nss_dbm_db_t *db,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- CK_ULONG *pdbrv
-);
-
-NSS_EXTERN CK_BBOOL
-nss_dbm_db_object_still_exists
-(
- nss_dbm_dbt_t *dbt
-);
-
-NSS_EXTERN CK_ULONG
-nss_dbm_db_get_object_attribute_count
-(
- nss_dbm_dbt_t *dbt,
- CK_RV *pError,
- CK_ULONG *pdbrv
-);
-
-NSS_EXTERN CK_RV
-nss_dbm_db_get_object_attribute_types
-(
- nss_dbm_dbt_t *dbt,
- CK_ATTRIBUTE_TYPE_PTR typeArray,
- CK_ULONG ulCount,
- CK_ULONG *pdbrv
-);
-
-NSS_EXTERN CK_ULONG
-nss_dbm_db_get_object_attribute_size
-(
- nss_dbm_dbt_t *dbt,
- CK_ATTRIBUTE_TYPE type,
- CK_RV *pError,
- CK_ULONG *pdbrv
-);
-
-NSS_EXTERN NSSItem *
-nss_dbm_db_get_object_attribute
-(
- nss_dbm_dbt_t *dbt,
- NSSArena *arena,
- CK_ATTRIBUTE_TYPE type,
- CK_RV *pError,
- CK_ULONG *pdbrv
-);
-
-NSS_EXTERN CK_RV
-nss_dbm_db_set_object_attribute
-(
- nss_dbm_dbt_t *dbt,
- CK_ATTRIBUTE_TYPE type,
- NSSItem *value,
- CK_ULONG *pdbrv
-);
-
-#endif /* CKDBM_H */
diff --git a/security/nss/lib/ckfw/dbm/config.mk b/security/nss/lib/ckfw/dbm/config.mk
deleted file mode 100644
index 80b3135f4..000000000
--- a/security/nss/lib/ckfw/dbm/config.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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.
-#
-CONFIG_CVS_ID = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"
-
-ifdef BUILD_IDG
-DEFINES += -DNSSDEBUG
-endif
diff --git a/security/nss/lib/ckfw/dbm/db.c b/security/nss/lib/ckfw/dbm/db.c
deleted file mode 100644
index 307c7f21d..000000000
--- a/security/nss/lib/ckfw/dbm/db.c
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-#define PREFIX_METADATA "0000"
-#define PREFIX_OBJECT "0001"
-#define PREFIX_INDEX "0002"
-
-static CK_VERSION nss_dbm_db_format_version = { 1, 0 };
-struct handle {
- char prefix[4];
- CK_ULONG id;
-};
-
-NSS_IMPLEMENT nss_dbm_db_t *
-nss_dbm_db_open
-(
- NSSArena *arena,
- NSSCKFWInstance *fwInstance,
- char *filename,
- int flags,
- CK_RV *pError
-)
-{
- nss_dbm_db_t *rv;
- CK_VERSION db_version;
-
- rv = nss_ZNEW(arena, nss_dbm_db_t);
- if( (nss_dbm_db_t *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (nss_dbm_db_t *)NULL;
- }
-
- rv->db = dbopen(filename, flags, 0600, DB_HASH, (const void *)NULL);
- if( (DB *)NULL == rv->db ) {
- *pError = CKR_TOKEN_NOT_PRESENT;
- return (nss_dbm_db_t *)NULL;
- }
-
- rv->crustylock = NSSCKFWInstance_CreateMutex(fwInstance, arena, pError);
- if( (NSSCKFWMutex *)NULL == rv->crustylock ) {
- return (nss_dbm_db_t *)NULL;
- }
-
- db_version = nss_dbm_db_get_format_version(rv);
- if( db_version.major != nss_dbm_db_format_version.major ) {
- nss_dbm_db_close(rv);
- *pError = CKR_TOKEN_NOT_RECOGNIZED;
- return (nss_dbm_db_t *)NULL;
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT void
-nss_dbm_db_close
-(
- nss_dbm_db_t *db
-)
-{
- if( (NSSCKFWMutex *)NULL != db->crustylock ) {
- (void)NSSCKFWMutex_Destroy(db->crustylock);
- }
-
- if( (DB *)NULL != db->db ) {
- (void)db->db->close(db->db);
- }
-
- nss_ZFreeIf(db);
-}
-
-NSS_IMPLEMENT CK_VERSION
-nss_dbm_db_get_format_version
-(
- nss_dbm_db_t *db
-)
-{
- CK_VERSION rv;
- DBT k, v;
- int dbrv;
- char buffer[64];
-
- rv.major = rv.minor = 0;
-
- k.data = PREFIX_METADATA "FormatVersion";
- k.size = nssUTF8_Size((NSSUTF8 *)k.data, (PRStatus *)NULL);
- (void)memset(&v, 0, sizeof(v));
-
- /* Locked region */
- {
- if( CKR_OK != NSSCKFWMutex_Lock(db->crustylock) ) {
- return rv;
- }
-
- dbrv = db->db->get(db->db, &k, &v, 0);
- if( dbrv == 0 ) {
- CK_ULONG major = 0, minor = 0;
- (void)PR_sscanf(v.data, "%ld.%ld", &major, &minor);
- rv.major = major;
- rv.minor = minor;
- } else if( dbrv > 0 ) {
- (void)PR_snprintf(buffer, sizeof(buffer), "%ld.%ld", nss_dbm_db_format_version.major,
- nss_dbm_db_format_version.minor);
- v.data = buffer;
- v.size = nssUTF8_Size((NSSUTF8 *)v.data, (PRStatus *)NULL);
- dbrv = db->db->put(db->db, &k, &v, 0);
- (void)db->db->sync(db->db, 0);
- rv = nss_dbm_db_format_version;
- } else {
- /* No error return.. */
- ;
- }
-
- (void)NSSCKFWMutex_Unlock(db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_RV
-nss_dbm_db_set_label
-(
- nss_dbm_db_t *db,
- NSSUTF8 *label
-)
-{
- CK_RV rv;
- DBT k, v;
- int dbrv;
-
- k.data = PREFIX_METADATA "Label";
- k.size = nssUTF8_Size((NSSUTF8 *)k.data, (PRStatus *)NULL);
- v.data = label;
- v.size = nssUTF8_Size((NSSUTF8 *)v.data, (PRStatus *)NULL);
-
- /* Locked region */
- {
- if( CKR_OK != NSSCKFWMutex_Lock(db->crustylock) ) {
- return rv;
- }
-
- dbrv = db->db->put(db->db, &k, &v, 0);
- if( 0 != dbrv ) {
- rv = CKR_DEVICE_ERROR;
- }
-
- dbrv = db->db->sync(db->db, 0);
- if( 0 != dbrv ) {
- rv = CKR_DEVICE_ERROR;
- }
-
- (void)NSSCKFWMutex_Unlock(db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT NSSUTF8 *
-nss_dbm_db_get_label
-(
- nss_dbm_db_t *db,
- NSSArena *arena,
- CK_RV *pError
-)
-{
- NSSUTF8 *rv = (NSSUTF8 *)NULL;
- DBT k, v;
- int dbrv;
-
- k.data = PREFIX_METADATA "Label";
- k.size = nssUTF8_Size((NSSUTF8 *)k.data, (PRStatus *)NULL);
-
- /* Locked region */
- {
- if( CKR_OK != NSSCKFWMutex_Lock(db->crustylock) ) {
- return rv;
- }
-
- dbrv = db->db->get(db->db, &k, &v, 0);
- if( 0 == dbrv ) {
- rv = nssUTF8_Duplicate((NSSUTF8 *)v.data, arena);
- if( (NSSUTF8 *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- }
- } else if( dbrv > 0 ) {
- /* Just return null */
- ;
- } else {
- *pError = CKR_DEVICE_ERROR;
- ;
- }
-
-
- (void)NSSCKFWMutex_Unlock(db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_RV
-nss_dbm_db_delete_object
-(
- nss_dbm_dbt_t *dbt
-)
-{
- CK_RV rv;
- int dbrv;
-
- /* Locked region */
- {
- rv = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != rv ) {
- return rv;
- }
-
- dbrv = dbt->my_db->db->del(dbt->my_db->db, &dbt->dbt, 0);
- if( 0 != dbrv ) {
- rv = CKR_DEVICE_ERROR;
- goto done;
- }
-
- dbrv = dbt->my_db->db->sync(dbt->my_db->db, 0);
- if( 0 != dbrv ) {
- rv = CKR_DEVICE_ERROR;
- goto done;
- }
-
- done:
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
- }
-
- return rv;
-}
-
-static CK_ULONG
-nss_dbm_db_new_handle
-(
- nss_dbm_db_t *db,
- DBT *dbt, /* pre-allocated */
- CK_RV *pError
-)
-{
- CK_ULONG rv;
- DBT k, v;
- CK_ULONG align = 0, id, myid;
- struct handle *hp;
-
- if( sizeof(struct handle) != dbt->size ) {
- return EINVAL;
- }
-
- /* Locked region */
- {
- *pError = NSSCKFWMutex_Lock(db->crustylock);
- if( CKR_OK != *pError ) {
- return EINVAL;
- }
-
- k.data = PREFIX_METADATA "LastID";
- k.size = nssUTF8_Size((NSSUTF8 *)k.data, (PRStatus *)NULL);
- (void)memset(&v, 0, sizeof(v));
-
- rv = db->db->get(db->db, &k, &v, 0);
- if( 0 == rv ) {
- (void)memcpy(&align, v.data, sizeof(CK_ULONG));
- id = ntohl(align);
- } else if( rv > 0 ) {
- id = 0;
- } else {
- goto done;
- }
-
- myid = id;
- id++;
- align = htonl(id);
- v.data = &align;
- v.size = sizeof(CK_ULONG);
-
- rv = db->db->put(db->db, &k, &v, 0);
- if( 0 != rv ) {
- goto done;
- }
-
- rv = db->db->sync(db->db, 0);
- if( 0 != rv ) {
- goto done;
- }
-
- done:
- (void)NSSCKFWMutex_Unlock(db->crustylock);
- }
-
- if( 0 != rv ) {
- return rv;
- }
-
- hp = (struct handle *)dbt->data;
- (void)memcpy(&hp->prefix[0], PREFIX_OBJECT, 4);
- hp->id = myid;
-
- return 0;
-}
-
-/*
- * This attribute-type-dependent swapping should probably
- * be in the Framework, because it'll be a concern of just
- * about every Module. Of course any Framework implementation
- * will have to be augmentable or overridable by a Module.
- */
-
-enum swap_type { type_byte, type_short, type_long, type_opaque };
-
-static enum swap_type
-nss_dbm_db_swap_type
-(
- CK_ATTRIBUTE_TYPE type
-)
-{
- switch( type ) {
- case CKA_CLASS: return type_long;
- case CKA_TOKEN: return type_byte;
- case CKA_PRIVATE: return type_byte;
- case CKA_LABEL: return type_opaque;
- case CKA_APPLICATION: return type_opaque;
- case CKA_VALUE: return type_opaque;
- case CKA_CERTIFICATE_TYPE: return type_long;
- case CKA_ISSUER: return type_opaque;
- case CKA_SERIAL_NUMBER: return type_opaque;
- case CKA_KEY_TYPE: return type_long;
- case CKA_SUBJECT: return type_opaque;
- case CKA_ID: return type_opaque;
- case CKA_SENSITIVE: return type_byte;
- case CKA_ENCRYPT: return type_byte;
- case CKA_DECRYPT: return type_byte;
- case CKA_WRAP: return type_byte;
- case CKA_UNWRAP: return type_byte;
- case CKA_SIGN: return type_byte;
- case CKA_SIGN_RECOVER: return type_byte;
- case CKA_VERIFY: return type_byte;
- case CKA_VERIFY_RECOVER: return type_byte;
- case CKA_DERIVE: return type_byte;
- case CKA_START_DATE: return type_opaque;
- case CKA_END_DATE: return type_opaque;
- case CKA_MODULUS: return type_opaque;
- case CKA_MODULUS_BITS: return type_long;
- case CKA_PUBLIC_EXPONENT: return type_opaque;
- case CKA_PRIVATE_EXPONENT: return type_opaque;
- case CKA_PRIME_1: return type_opaque;
- case CKA_PRIME_2: return type_opaque;
- case CKA_EXPONENT_1: return type_opaque;
- case CKA_EXPONENT_2: return type_opaque;
- case CKA_COEFFICIENT: return type_opaque;
- case CKA_PRIME: return type_opaque;
- case CKA_SUBPRIME: return type_opaque;
- case CKA_BASE: return type_opaque;
- case CKA_VALUE_BITS: return type_long;
- case CKA_VALUE_LEN: return type_long;
- case CKA_EXTRACTABLE: return type_byte;
- case CKA_LOCAL: return type_byte;
- case CKA_NEVER_EXTRACTABLE: return type_byte;
- case CKA_ALWAYS_SENSITIVE: return type_byte;
- case CKA_MODIFIABLE: return type_byte;
- case CKA_NETSCAPE_URL: return type_opaque;
- case CKA_NETSCAPE_EMAIL: return type_opaque;
- case CKA_NETSCAPE_SMIME_INFO: return type_opaque;
- case CKA_NETSCAPE_SMIME_TIMESTAMP: return type_opaque;
- case CKA_NETSCAPE_PKCS8_SALT: return type_opaque;
- case CKA_NETSCAPE_PASSWORD_CHECK: return type_opaque;
- case CKA_NETSCAPE_EXPIRES: return type_opaque;
- case CKA_TRUST_DIGITAL_SIGNATURE: return type_long;
- case CKA_TRUST_NON_REPUDIATION: return type_long;
- case CKA_TRUST_KEY_ENCIPHERMENT: return type_long;
- case CKA_TRUST_DATA_ENCIPHERMENT: return type_long;
- case CKA_TRUST_KEY_AGREEMENT: return type_long;
- case CKA_TRUST_KEY_CERT_SIGN: return type_long;
- case CKA_TRUST_CRL_SIGN: return type_long;
- case CKA_TRUST_SERVER_AUTH: return type_long;
- case CKA_TRUST_CLIENT_AUTH: return type_long;
- case CKA_TRUST_CODE_SIGNING: return type_long;
- case CKA_TRUST_EMAIL_PROTECTION: return type_long;
- case CKA_TRUST_IPSEC_END_SYSTEM: return type_long;
- case CKA_TRUST_IPSEC_TUNNEL: return type_long;
- case CKA_TRUST_IPSEC_USER: return type_long;
- case CKA_TRUST_TIME_STAMPING: return type_long;
- case CKA_NETSCAPE_DB: return type_opaque;
- case CKA_NETSCAPE_TRUST: return type_opaque;
- default: return type_opaque;
- }
-}
-
-static void
-nss_dbm_db_swap_copy
-(
- CK_ATTRIBUTE_TYPE type,
- void *dest,
- void *src,
- CK_ULONG len
-)
-{
- switch( nss_dbm_db_swap_type(type) ) {
- case type_byte:
- case type_opaque:
- (void)memcpy(dest, src, len);
- break;
- case type_short:
- {
- CK_USHORT s, d;
- (void)memcpy(&s, src, sizeof(CK_USHORT));
- d = htons(s);
- (void)memcpy(dest, &d, sizeof(CK_USHORT));
- break;
- }
- case type_long:
- {
- CK_ULONG s, d;
- (void)memcpy(&s, src, sizeof(CK_ULONG));
- d = htonl(s);
- (void)memcpy(dest, &d, sizeof(CK_ULONG));
- break;
- }
- }
-}
-
-static CK_RV
-nss_dbm_db_wrap_object
-(
- NSSArena *arena,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- DBT *object
-)
-{
- CK_ULONG object_size;
- CK_ULONG i;
- CK_ULONG *pulData;
- char *pcData;
- CK_ULONG offset;
-
- object_size = (1 + ulAttributeCount*3) * sizeof(CK_ULONG);
- offset = object_size;
- for( i = 0; i < ulAttributeCount; i++ ) {
- object_size += pTemplate[i].ulValueLen;
- }
-
- object->size = object_size;
- object->data = nss_ZAlloc(arena, object_size);
- if( (void *)NULL == object->data ) {
- return CKR_HOST_MEMORY;
- }
-
- pulData = (CK_ULONG *)object->data;
- pcData = (char *)object->data;
-
- pulData[0] = htonl(ulAttributeCount);
- for( i = 0; i < ulAttributeCount; i++ ) {
- CK_ULONG len = pTemplate[i].ulValueLen;
- pulData[1 + i*3] = htonl(pTemplate[i].type);
- pulData[2 + i*3] = htonl(len);
- pulData[3 + i*3] = htonl(offset);
- nss_dbm_db_swap_copy(pTemplate[i].type, &pcData[offset], pTemplate[i].pValue, len);
- offset += len;
- }
-
- return CKR_OK;
-}
-
-static CK_RV
-nss_dbm_db_unwrap_object
-(
- NSSArena *arena,
- DBT *object,
- CK_ATTRIBUTE_PTR *ppTemplate,
- CK_ULONG *pulAttributeCount
-)
-{
- CK_ULONG *pulData;
- char *pcData;
- CK_ULONG n, i;
- CK_ATTRIBUTE_PTR pTemplate;
-
- pulData = (CK_ULONG *)object->data;
- pcData = (char *)object->data;
-
- n = ntohl(pulData[0]);
- *pulAttributeCount = n;
- pTemplate = nss_ZNEWARRAY(arena, CK_ATTRIBUTE, n);
- if( (CK_ATTRIBUTE_PTR)NULL == pTemplate ) {
- return CKR_HOST_MEMORY;
- }
-
- for( i = 0; i < n; i++ ) {
- CK_ULONG len;
- CK_ULONG offset;
- void *p;
-
- pTemplate[i].type = ntohl(pulData[1 + i*3]);
- len = ntohl(pulData[2 + i*3]);
- offset = ntohl(pulData[3 + i*3]);
-
- p = nss_ZAlloc(arena, len);
- if( (void *)NULL == p ) {
- return CKR_HOST_MEMORY;
- }
-
- nss_dbm_db_swap_copy(pTemplate[i].type, p, &pcData[offset], len);
- pTemplate[i].ulValueLen = len;
- pTemplate[i].pValue = p;
- }
-
- *ppTemplate = pTemplate;
- return CKR_OK;
-}
-
-
-NSS_IMPLEMENT nss_dbm_dbt_t *
-nss_dbm_db_create_object
-(
- NSSArena *arena,
- nss_dbm_db_t *db,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- CK_RV *pError,
- CK_ULONG *pdbrv
-)
-{
- NSSArena *tmparena = (NSSArena *)NULL;
- nss_dbm_dbt_t *rv = (nss_dbm_dbt_t *)NULL;
- DBT object;
-
- rv = nss_ZNEW(arena, nss_dbm_dbt_t);
- if( (nss_dbm_dbt_t *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (nss_dbm_dbt_t *)NULL;
- }
-
- rv->my_db = db;
- rv->dbt.size = sizeof(struct handle);
- rv->dbt.data = nss_ZAlloc(arena, rv->dbt.size);
- if( (void *)NULL == rv->dbt.data ) {
- *pError = CKR_HOST_MEMORY;
- return (nss_dbm_dbt_t *)NULL;
- }
-
- *pdbrv = nss_dbm_db_new_handle(db, &rv->dbt, pError);
- if( 0 != *pdbrv ) {
- return (nss_dbm_dbt_t *)NULL;
- }
-
- tmparena = NSSArena_Create();
- if( (NSSArena *)NULL == tmparena ) {
- *pError = CKR_HOST_MEMORY;
- return (nss_dbm_dbt_t *)NULL;
- }
-
- *pError = nss_dbm_db_wrap_object(tmparena, pTemplate, ulAttributeCount, &object);
- if( CKR_OK != *pError ) {
- return (nss_dbm_dbt_t *)NULL;
- }
-
- /* Locked region */
- {
- *pError = NSSCKFWMutex_Lock(db->crustylock);
- if( CKR_OK != *pError ) {
- goto loser;
- }
-
- *pdbrv = db->db->put(db->db, &rv->dbt, &object, 0);
- if( 0 != *pdbrv ) {
- *pError = CKR_DEVICE_ERROR;
- }
-
- (void)db->db->sync(db->db, 0);
-
- (void)NSSCKFWMutex_Unlock(db->crustylock);
- }
-
- loser:
- if( (NSSArena *)NULL != tmparena ) {
- (void)NSSArena_Destroy(tmparena);
- }
-
- return rv;
-}
-
-
-NSS_IMPLEMENT CK_RV
-nss_dbm_db_find_objects
-(
- nss_dbm_find_t *find,
- nss_dbm_db_t *db,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- CK_ULONG *pdbrv
-)
-{
- CK_RV rv = CKR_OK;
-
- if( (nss_dbm_db_t *)NULL != db ) {
- DBT k, v;
-
- rv = NSSCKFWMutex_Lock(db->crustylock);
- if( CKR_OK != rv ) {
- return rv;
- }
-
- *pdbrv = db->db->seq(db->db, &k, &v, R_FIRST);
- while( 0 == *pdbrv ) {
- CK_ULONG i, j;
- NSSArena *tmparena = (NSSArena *)NULL;
- CK_ULONG ulac;
- CK_ATTRIBUTE_PTR pt;
-
- if( (k.size < 4) || (0 != memcmp(k.data, PREFIX_OBJECT, 4)) ) {
- goto nomatch;
- }
-
- tmparena = NSSArena_Create();
-
- rv = nss_dbm_db_unwrap_object(tmparena, &v, &pt, &ulac);
- if( CKR_OK != rv ) {
- goto loser;
- }
-
- for( i = 0; i < ulAttributeCount; i++ ) {
- for( j = 0; j < ulac; j++ ) {
- if( pTemplate[i].type == pt[j].type ) {
- if( pTemplate[i].ulValueLen != pt[j].ulValueLen ) {
- goto nomatch;
- }
- if( 0 != memcmp(pTemplate[i].pValue, pt[j].pValue, pt[j].ulValueLen) ) {
- goto nomatch;
- }
- break;
- }
- }
- if( j == ulac ) {
- goto nomatch;
- }
- }
-
- /* entire template matches */
- {
- struct nss_dbm_dbt_node *node;
-
- node = nss_ZNEW(find->arena, struct nss_dbm_dbt_node);
- if( (struct nss_dbm_dbt_node *)NULL == node ) {
- rv = CKR_HOST_MEMORY;
- goto loser;
- }
-
- node->dbt = nss_ZNEW(find->arena, nss_dbm_dbt_t);
- if( (nss_dbm_dbt_t *)NULL == node->dbt ) {
- rv = CKR_HOST_MEMORY;
- goto loser;
- }
-
- node->dbt->dbt.size = k.size;
- node->dbt->dbt.data = nss_ZAlloc(find->arena, k.size);
- if( (void *)NULL == node->dbt->dbt.data ) {
- rv = CKR_HOST_MEMORY;
- goto loser;
- }
-
- (void)memcpy(node->dbt->dbt.data, k.data, k.size);
-
- node->dbt->my_db = db;
-
- node->next = find->found;
- find->found = node;
- }
-
- nomatch:
- if( (NSSArena *)NULL != tmparena ) {
- (void)NSSArena_Destroy(tmparena);
- }
- *pdbrv = db->db->seq(db->db, &k, &v, R_NEXT);
- }
-
- if( *pdbrv < 0 ) {
- rv = CKR_DEVICE_ERROR;
- goto loser;
- }
-
- rv = CKR_OK;
-
- loser:
- (void)NSSCKFWMutex_Unlock(db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_BBOOL
-nss_dbm_db_object_still_exists
-(
- nss_dbm_dbt_t *dbt
-)
-{
- CK_BBOOL rv;
- CK_RV ckrv;
- int dbrv;
- DBT object;
-
- ckrv = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != ckrv ) {
- return CK_FALSE;
- }
-
- dbrv = dbt->my_db->db->get(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 == dbrv ) {
- rv = CK_TRUE;
- } else {
- rv = CK_FALSE;
- }
-
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_ULONG
-nss_dbm_db_get_object_attribute_count
-(
- nss_dbm_dbt_t *dbt,
- CK_RV *pError,
- CK_ULONG *pdbrv
-)
-{
- CK_ULONG rv = 0;
- DBT object;
- CK_ULONG *pulData;
-
- /* Locked region */
- {
- *pError = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != *pError ) {
- return rv;
- }
-
- *pdbrv = dbt->my_db->db->get(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 == *pdbrv ) {
- ;
- } else if( *pdbrv > 0 ) {
- *pError = CKR_OBJECT_HANDLE_INVALID;
- goto done;
- } else {
- *pError = CKR_DEVICE_ERROR;
- goto done;
- }
-
- pulData = (CK_ULONG *)object.data;
- rv = ntohl(pulData[0]);
-
- done:
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_RV
-nss_dbm_db_get_object_attribute_types
-(
- nss_dbm_dbt_t *dbt,
- CK_ATTRIBUTE_TYPE_PTR typeArray,
- CK_ULONG ulCount,
- CK_ULONG *pdbrv
-)
-{
- CK_RV rv = CKR_OK;
- DBT object;
- CK_ULONG *pulData;
- CK_ULONG n, i;
-
- /* Locked region */
- {
- rv = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != rv ) {
- return rv;
- }
-
- *pdbrv = dbt->my_db->db->get(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 == *pdbrv ) {
- ;
- } else if( *pdbrv > 0 ) {
- rv = CKR_OBJECT_HANDLE_INVALID;
- goto done;
- } else {
- rv = CKR_DEVICE_ERROR;
- goto done;
- }
-
- pulData = (CK_ULONG *)object.data;
- n = ntohl(pulData[0]);
-
- if( ulCount < n ) {
- rv = CKR_BUFFER_TOO_SMALL;
- goto done;
- }
-
- for( i = 0; i < n; i++ ) {
- typeArray[i] = ntohl(pulData[1 + i*3]);
- }
-
- done:
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_ULONG
-nss_dbm_db_get_object_attribute_size
-(
- nss_dbm_dbt_t *dbt,
- CK_ATTRIBUTE_TYPE type,
- CK_RV *pError,
- CK_ULONG *pdbrv
-)
-{
- CK_ULONG rv = 0;
- DBT object;
- CK_ULONG *pulData;
- CK_ULONG n, i;
-
- /* Locked region */
- {
- *pError = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != *pError ) {
- return rv;
- }
-
- *pdbrv = dbt->my_db->db->get(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 == *pdbrv ) {
- ;
- } else if( *pdbrv > 0 ) {
- *pError = CKR_OBJECT_HANDLE_INVALID;
- goto done;
- } else {
- *pError = CKR_DEVICE_ERROR;
- goto done;
- }
-
- pulData = (CK_ULONG *)object.data;
- n = ntohl(pulData[0]);
-
- for( i = 0; i < n; i++ ) {
- if( type == ntohl(pulData[1 + i*3]) ) {
- rv = ntohl(pulData[2 + i*3]);
- }
- }
-
- if( i == n ) {
- *pError = CKR_ATTRIBUTE_TYPE_INVALID;
- goto done;
- }
-
- done:
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT NSSItem *
-nss_dbm_db_get_object_attribute
-(
- nss_dbm_dbt_t *dbt,
- NSSArena *arena,
- CK_ATTRIBUTE_TYPE type,
- CK_RV *pError,
- CK_ULONG *pdbrv
-)
-{
- NSSItem *rv = (NSSItem *)NULL;
- DBT object;
- CK_ULONG i;
- NSSArena *tmp = NSSArena_Create();
- CK_ATTRIBUTE_PTR pTemplate;
- CK_ULONG ulAttributeCount;
-
- /* Locked region */
- {
- *pError = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != *pError ) {
- goto loser;
- }
-
- *pdbrv = dbt->my_db->db->get(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 == *pdbrv ) {
- ;
- } else if( *pdbrv > 0 ) {
- *pError = CKR_OBJECT_HANDLE_INVALID;
- goto done;
- } else {
- *pError = CKR_DEVICE_ERROR;
- goto done;
- }
-
- *pError = nss_dbm_db_unwrap_object(tmp, &object, &pTemplate, &ulAttributeCount);
- if( CKR_OK != *pError ) {
- goto done;
- }
-
- for( i = 0; i < ulAttributeCount; i++ ) {
- if( type == pTemplate[i].type ) {
- rv = nss_ZNEW(arena, NSSItem);
- if( (NSSItem *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- goto done;
- }
- rv->size = pTemplate[i].ulValueLen;
- rv->data = nss_ZAlloc(arena, rv->size);
- if( (void *)NULL == rv->data ) {
- *pError = CKR_HOST_MEMORY;
- goto done;
- }
- (void)memcpy(rv->data, pTemplate[i].pValue, rv->size);
- break;
- }
- }
- if( ulAttributeCount == i ) {
- *pError = CKR_ATTRIBUTE_TYPE_INVALID;
- goto done;
- }
-
- done:
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
- }
-
- loser:
- if( (NSSArena *)NULL != tmp ) {
- NSSArena_Destroy(tmp);
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT CK_RV
-nss_dbm_db_set_object_attribute
-(
- nss_dbm_dbt_t *dbt,
- CK_ATTRIBUTE_TYPE type,
- NSSItem *value,
- CK_ULONG *pdbrv
-)
-{
- CK_RV rv = CKR_OK;
- DBT object;
- CK_ULONG i;
- NSSArena *tmp = NSSArena_Create();
- CK_ATTRIBUTE_PTR pTemplate;
- CK_ULONG ulAttributeCount;
-
- /* Locked region */
- {
- rv = NSSCKFWMutex_Lock(dbt->my_db->crustylock);
- if( CKR_OK != rv ) {
- goto loser;
- }
-
- *pdbrv = dbt->my_db->db->get(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 == *pdbrv ) {
- ;
- } else if( *pdbrv > 0 ) {
- rv = CKR_OBJECT_HANDLE_INVALID;
- goto done;
- } else {
- rv = CKR_DEVICE_ERROR;
- goto done;
- }
-
- rv = nss_dbm_db_unwrap_object(tmp, &object, &pTemplate, &ulAttributeCount);
- if( CKR_OK != rv ) {
- goto done;
- }
-
- for( i = 0; i < ulAttributeCount; i++ ) {
- if( type == pTemplate[i].type ) {
- /* Replacing an existing attribute */
- pTemplate[i].ulValueLen = value->size;
- pTemplate[i].pValue = value->data;
- break;
- }
- }
-
- if( i == ulAttributeCount ) {
- /* Adding a new attribute */
- CK_ATTRIBUTE_PTR npt = nss_ZNEWARRAY(tmp, CK_ATTRIBUTE, ulAttributeCount+1);
- if( (CK_ATTRIBUTE_PTR)NULL == npt ) {
- rv = CKR_DEVICE_ERROR;
- goto done;
- }
-
- for( i = 0; i < ulAttributeCount; i++ ) {
- npt[i] = pTemplate[i];
- }
-
- npt[ulAttributeCount].type = type;
- npt[ulAttributeCount].ulValueLen = value->size;
- npt[ulAttributeCount].pValue = value->data;
-
- pTemplate = npt;
- ulAttributeCount++;
- }
-
- rv = nss_dbm_db_wrap_object(tmp, pTemplate, ulAttributeCount, &object);
- if( CKR_OK != rv ) {
- goto done;
- }
-
- *pdbrv = dbt->my_db->db->put(dbt->my_db->db, &dbt->dbt, &object, 0);
- if( 0 != *pdbrv ) {
- rv = CKR_DEVICE_ERROR;
- goto done;
- }
-
- (void)dbt->my_db->db->sync(dbt->my_db->db, 0);
-
- done:
- (void)NSSCKFWMutex_Unlock(dbt->my_db->crustylock);
- }
-
- loser:
- if( (NSSArena *)NULL != tmp ) {
- NSSArena_Destroy(tmp);
- }
-
- return rv;
-}
diff --git a/security/nss/lib/ckfw/dbm/find.c b/security/nss/lib/ckfw/dbm/find.c
deleted file mode 100644
index 81fe5d8fb..000000000
--- a/security/nss/lib/ckfw/dbm/find.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-static void
-nss_dbm_mdFindObjects_Final
-(
- NSSCKMDFindObjects *mdFindObjects,
- NSSCKFWFindObjects *fwFindObjects,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_find_t *find = (nss_dbm_find_t *)mdFindObjects->etc;
-
- /* Locks might have system resources associated */
- (void)NSSCKFWMutex_Destroy(find->list_lock);
- (void)NSSArena_Destroy(find->arena);
-}
-
-
-static NSSCKMDObject *
-nss_dbm_mdFindObjects_Next
-(
- NSSCKMDFindObjects *mdFindObjects,
- NSSCKFWFindObjects *fwFindObjects,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- NSSArena *arena,
- CK_RV *pError
-)
-{
- nss_dbm_find_t *find = (nss_dbm_find_t *)mdFindObjects->etc;
- struct nss_dbm_dbt_node *node;
- nss_dbm_object_t *object;
- NSSCKMDObject *rv;
-
- while(1) {
- /* Lock */
- {
- *pError = NSSCKFWMutex_Lock(find->list_lock);
- if( CKR_OK != *pError ) {
- return (NSSCKMDObject *)NULL;
- }
-
- node = find->found;
- if( (struct nss_dbm_dbt_node *)NULL != node ) {
- find->found = node->next;
- }
-
- *pError = NSSCKFWMutex_Unlock(find->list_lock);
- if( CKR_OK != *pError ) {
- /* screwed now */
- return (NSSCKMDObject *)NULL;
- }
- }
-
- if( (struct nss_dbm_dbt_node *)NULL == node ) {
- break;
- }
-
- if( nss_dbm_db_object_still_exists(node->dbt) ) {
- break;
- }
- }
-
- if( (struct nss_dbm_dbt_node *)NULL == node ) {
- *pError = CKR_OK;
- return (NSSCKMDObject *)NULL;
- }
-
- object = nss_ZNEW(arena, nss_dbm_object_t);
- if( (nss_dbm_object_t *)NULL == object ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDObject *)NULL;
- }
-
- object->arena = arena;
- object->handle = nss_ZNEW(arena, nss_dbm_dbt_t);
- if( (nss_dbm_dbt_t *)NULL == object->handle ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDObject *)NULL;
- }
-
- object->handle->my_db = node->dbt->my_db;
- object->handle->dbt.size = node->dbt->dbt.size;
- object->handle->dbt.data = nss_ZAlloc(arena, node->dbt->dbt.size);
- if( (void *)NULL == object->handle->dbt.data ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDObject *)NULL;
- }
-
- (void)memcpy(object->handle->dbt.data, node->dbt->dbt.data, node->dbt->dbt.size);
-
- rv = nss_dbm_mdObject_factory(object, pError);
- if( (NSSCKMDObject *)NULL == rv ) {
- return (NSSCKMDObject *)NULL;
- }
-
- return rv;
-}
-
-NSS_IMPLEMENT NSSCKMDFindObjects *
-nss_dbm_mdFindObjects_factory
-(
- nss_dbm_find_t *find,
- CK_RV *pError
-)
-{
- NSSCKMDFindObjects *rv;
-
- rv = nss_ZNEW(find->arena, NSSCKMDFindObjects);
- if( (NSSCKMDFindObjects *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDFindObjects *)NULL;
- }
-
- rv->etc = (void *)find;
- rv->Final = nss_dbm_mdFindObjects_Final;
- rv->Next = nss_dbm_mdFindObjects_Next;
-
- return rv;
-}
diff --git a/security/nss/lib/ckfw/dbm/instance.c b/security/nss/lib/ckfw/dbm/instance.c
deleted file mode 100644
index 70681803f..000000000
--- a/security/nss/lib/ckfw/dbm/instance.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-static CK_RV
-nss_dbm_mdInstance_Initialize
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- NSSUTF8 *configurationData
-)
-{
- CK_RV rv = CKR_OK;
- NSSArena *arena;
- nss_dbm_instance_t *instance;
-
- arena = NSSCKFWInstance_GetArena(fwInstance, &rv);
- if( ((NSSArena *)NULL == arena) && (CKR_OK != rv) ) {
- return rv;
- }
-
- instance = nss_ZNEW(arena, nss_dbm_instance_t);
- if( (nss_dbm_instance_t *)NULL == instance ) {
- return CKR_HOST_MEMORY;
- }
-
- instance->arena = arena;
-
- /*
- * This should parse the configuration data for information on
- * number and locations of databases, modes (e.g. readonly), etc.
- * But for now, we'll have one slot with a creatable read-write
- * database called "cert8.db."
- */
-
- instance->nSlots = 1;
- instance->filenames = nss_ZNEWARRAY(arena, char *, instance->nSlots);
- if( (char **)NULL == instance->filenames ) {
- return CKR_HOST_MEMORY;
- }
-
- instance->flags = nss_ZNEWARRAY(arena, int, instance->nSlots);
- if( (int *)NULL == instance->flags ) {
- return CKR_HOST_MEMORY;
- }
-
- instance->filenames[0] = "cert8.db";
- instance->flags[0] = O_RDWR|O_CREAT;
-
- mdInstance->etc = (void *)instance;
- return CKR_OK;
-}
-
-/* nss_dbm_mdInstance_Finalize is not required */
-
-static CK_ULONG
-nss_dbm_mdInstance_GetNSlots
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- nss_dbm_instance_t *instance = (nss_dbm_instance_t *)mdInstance->etc;
- return instance->nSlots;
-}
-
-static CK_VERSION
-nss_dbm_mdInstance_GetCryptokiVersion
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- static CK_VERSION rv = { 2, 1 };
- return rv;
-}
-
-static NSSUTF8 *
-nss_dbm_mdInstance_GetManufacturerID
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- return "Netscape Communications Corp.";
-}
-
-static NSSUTF8 *
-nss_dbm_mdInstance_GetLibraryDescription
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- return "Berkeley Database Module";
-}
-
-static CK_VERSION
-nss_dbm_mdInstance_GetLibraryVersion
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- static CK_VERSION rv = { 1, 0 }; /* My own version number */
- return rv;
-}
-
-static CK_BBOOL
-nss_dbm_mdInstance_ModuleHandlesSessionObjects
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- return CK_TRUE;
-}
-
-static CK_RV
-nss_dbm_mdInstance_GetSlots
-(
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- NSSCKMDSlot *slots[]
-)
-{
- nss_dbm_instance_t *instance = (nss_dbm_instance_t *)mdInstance->etc;
- CK_ULONG i;
- CK_RV rv = CKR_OK;
-
- for( i = 0; i < instance->nSlots; i++ ) {
- slots[i] = nss_dbm_mdSlot_factory(instance, instance->filenames[i],
- instance->flags[i], &rv);
- if( (NSSCKMDSlot *)NULL == slots[i] ) {
- return rv;
- }
- }
-
- return rv;
-}
-
-/* nss_dbm_mdInstance_WaitForSlotEvent is not relevant */
-
-NSS_IMPLEMENT_DATA NSSCKMDInstance
-nss_dbm_mdInstance = {
- NULL, /* etc; filled in later */
- nss_dbm_mdInstance_Initialize,
- NULL, /* nss_dbm_mdInstance_Finalize */
- nss_dbm_mdInstance_GetNSlots,
- nss_dbm_mdInstance_GetCryptokiVersion,
- nss_dbm_mdInstance_GetManufacturerID,
- nss_dbm_mdInstance_GetLibraryDescription,
- nss_dbm_mdInstance_GetLibraryVersion,
- nss_dbm_mdInstance_ModuleHandlesSessionObjects,
- nss_dbm_mdInstance_GetSlots,
- NULL, /* nss_dbm_mdInstance_WaitForSlotEvent */
- NULL /* terminator */
-};
diff --git a/security/nss/lib/ckfw/dbm/manifest.mn b/security/nss/lib/ckfw/dbm/manifest.mn
deleted file mode 100644
index 193e46bef..000000000
--- a/security/nss/lib/ckfw/dbm/manifest.mn
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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.
-#
-MANIFEST_CVS_ID = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"
-
-CORE_DEPTH = ../../../..
-
-MODULE = security
-
-CSRCS = \
- anchor.c \
- instance.c \
- slot.c \
- token.c \
- session.c \
- object.c \
- find.c \
- db.c \
- $(NULL)
-
-REQUIRES = security dbm nspr
-
-LIBRARY_NAME = nssckdbm
-
-EXTRA_SHARED_LIBS = -L$(DIST)/lib -lnssckfw -lnssb -ldbm -lnspr4 -lplc4 -lplds4
diff --git a/security/nss/lib/ckfw/dbm/object.c b/security/nss/lib/ckfw/dbm/object.c
deleted file mode 100644
index 2bd7578fd..000000000
--- a/security/nss/lib/ckfw/dbm/object.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-static void
-nss_dbm_mdObject_Finalize
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- ;
-}
-
-static CK_RV
-nss_dbm_mdObject_Destroy
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_object_t *object = (nss_dbm_object_t *)mdObject->etc;
- return nss_dbm_db_delete_object(object->handle);
-}
-
-static CK_ULONG
-nss_dbm_mdObject_GetAttributeCount
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- nss_dbm_object_t *object = (nss_dbm_object_t *)mdObject->etc;
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- return nss_dbm_db_get_object_attribute_count(object->handle, pError,
- &session->deviceError);
-}
-
-static CK_RV
-nss_dbm_mdObject_GetAttributeTypes
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_ATTRIBUTE_TYPE_PTR typeArray,
- CK_ULONG ulCount
-)
-{
- nss_dbm_object_t *object = (nss_dbm_object_t *)mdObject->etc;
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- return nss_dbm_db_get_object_attribute_types(object->handle, typeArray,
- ulCount, &session->deviceError);
-}
-
-static CK_ULONG
-nss_dbm_mdObject_GetAttributeSize
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_ATTRIBUTE_TYPE attribute,
- CK_RV *pError
-)
-{
- nss_dbm_object_t *object = (nss_dbm_object_t *)mdObject->etc;
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- return nss_dbm_db_get_object_attribute_size(object->handle, attribute, pError,
- &session->deviceError);
-}
-
-static NSSItem *
-nss_dbm_mdObject_GetAttribute
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_ATTRIBUTE_TYPE attribute,
- CK_RV *pError
-)
-{
- nss_dbm_object_t *object = (nss_dbm_object_t *)mdObject->etc;
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- return nss_dbm_db_get_object_attribute(object->handle, object->arena, attribute,
- pError, &session->deviceError);
-}
-
-static CK_RV
-nss_dbm_mdObject_SetAttribute
-(
- NSSCKMDObject *mdObject,
- NSSCKFWObject *fwObject,
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_ATTRIBUTE_TYPE attribute,
- NSSItem *value
-)
-{
- nss_dbm_object_t *object = (nss_dbm_object_t *)mdObject->etc;
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- return nss_dbm_db_set_object_attribute(object->handle, attribute, value,
- &session->deviceError);
-}
-
-NSS_IMPLEMENT NSSCKMDObject *
-nss_dbm_mdObject_factory
-(
- nss_dbm_object_t *object,
- CK_RV *pError
-)
-{
- NSSCKMDObject *rv;
-
- rv = nss_ZNEW(object->arena, NSSCKMDObject);
- if( (NSSCKMDObject *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDObject *)NULL;
- }
-
- rv->etc = (void *)object;
- rv->Finalize = nss_dbm_mdObject_Finalize;
- rv->Destroy = nss_dbm_mdObject_Destroy;
- /* IsTokenObject can be deferred */
- rv->GetAttributeCount = nss_dbm_mdObject_GetAttributeCount;
- rv->GetAttributeTypes = nss_dbm_mdObject_GetAttributeTypes;
- rv->GetAttributeSize = nss_dbm_mdObject_GetAttributeSize;
- rv->GetAttribute = nss_dbm_mdObject_GetAttribute;
- rv->SetAttribute = nss_dbm_mdObject_SetAttribute;
- /* GetObjectSize can be deferred */
-
- return rv;
-}
diff --git a/security/nss/lib/ckfw/dbm/session.c b/security/nss/lib/ckfw/dbm/session.c
deleted file mode 100644
index c0969d948..000000000
--- a/security/nss/lib/ckfw/dbm/session.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-static void
-nss_dbm_mdSession_Close
-(
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
-
- struct nss_dbm_dbt_node *w;
-
- /* Lock */
- {
- if( CKR_OK != NSSCKFWMutex_Lock(session->list_lock) ) {
- return;
- }
-
- w = session->session_objects;
- session->session_objects = (struct nss_dbm_dbt_node *)NULL; /* sanity */
-
- (void)NSSCKFWMutex_Unlock(session->list_lock);
- }
-
- for( ; (struct nss_dbm_dbt_node *)NULL != w; w = w->next ) {
- (void)nss_dbm_db_delete_object(w->dbt);
- }
-}
-
-static CK_ULONG
-nss_dbm_mdSession_GetDeviceError
-(
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- return session->deviceError;
-}
-
-/* Login isn't needed */
-/* Logout isn't needed */
-/* InitPIN is irrelevant */
-/* SetPIN is irrelevant */
-/* GetOperationStateLen is irrelevant */
-/* GetOperationState is irrelevant */
-/* SetOperationState is irrelevant */
-
-static NSSCKMDObject *
-nss_dbm_mdSession_CreateObject
-(
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- NSSArena *handyArenaPointer,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- CK_RV *pError
-)
-{
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
- CK_ULONG i;
- CK_BBOOL isToken = CK_FALSE; /* defaults to false */
- NSSCKMDObject *rv;
- struct nss_dbm_dbt_node *node = (struct nss_dbm_dbt_node *)NULL;
- nss_dbm_object_t *object;
- nss_dbm_db_t *which_db;
-
- /* This framework should really pass this to me */
- for( i = 0; i < ulAttributeCount; i++ ) {
- if( CKA_TOKEN == pTemplate[i].type ) {
- isToken = *(CK_BBOOL *)pTemplate[i].pValue;
- break;
- }
- }
-
- object = nss_ZNEW(handyArenaPointer, nss_dbm_object_t);
- if( (nss_dbm_object_t *)NULL == object ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDObject *)NULL;
- }
-
- object->arena = handyArenaPointer;
- which_db = isToken ? token->slot->token_db : token->session_db;
-
- /* Do this before the actual database call; it's easier to recover from */
- rv = nss_dbm_mdObject_factory(object, pError);
- if( (NSSCKMDObject *)NULL == rv ) {
- return (NSSCKMDObject *)NULL;
- }
-
- if( CK_FALSE == isToken ) {
- node = nss_ZNEW(session->arena, struct nss_dbm_dbt_node);
- if( (struct nss_dbm_dbt_node *)NULL == node ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDObject *)NULL;
- }
- }
-
- object->handle = nss_dbm_db_create_object(handyArenaPointer, which_db,
- pTemplate, ulAttributeCount,
- pError, &session->deviceError);
- if( (nss_dbm_dbt_t *)NULL == object->handle ) {
- return (NSSCKMDObject *)NULL;
- }
-
- if( CK_FALSE == isToken ) {
- node->dbt = object->handle;
- /* Lock */
- {
- *pError = NSSCKFWMutex_Lock(session->list_lock);
- if( CKR_OK != *pError ) {
- (void)nss_dbm_db_delete_object(object->handle);
- return (NSSCKMDObject *)NULL;
- }
-
- node->next = session->session_objects;
- session->session_objects = node;
-
- *pError = NSSCKFWMutex_Unlock(session->list_lock);
- }
- }
-
- return rv;
-}
-
-/* CopyObject isn't needed; the framework will use CreateObject */
-
-static NSSCKMDFindObjects *
-nss_dbm_mdSession_FindObjectsInit
-(
- NSSCKMDSession *mdSession,
- NSSCKFWSession *fwSession,
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_ATTRIBUTE_PTR pTemplate,
- CK_ULONG ulAttributeCount,
- CK_RV *pError
-)
-{
- nss_dbm_session_t *session = (nss_dbm_session_t *)mdSession->etc;
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
- NSSArena *arena;
- nss_dbm_find_t *find;
- NSSCKMDFindObjects *rv;
-
- arena = NSSArena_Create();
- if( (NSSArena *)NULL == arena ) {
- *pError = CKR_HOST_MEMORY;
- goto loser;
- }
-
- find = nss_ZNEW(arena, nss_dbm_find_t);
- if( (nss_dbm_find_t *)NULL == find ) {
- *pError = CKR_HOST_MEMORY;
- goto loser;
- }
-
- find->arena = arena;
- find->list_lock = NSSCKFWInstance_CreateMutex(fwInstance, arena, pError);
- if( (NSSCKFWMutex *)NULL == find->list_lock ) {
- goto loser;
- }
-
- *pError = nss_dbm_db_find_objects(find, token->slot->token_db, pTemplate,
- ulAttributeCount, &session->deviceError);
- if( CKR_OK != *pError ) {
- goto loser;
- }
-
- *pError = nss_dbm_db_find_objects(find, token->session_db, pTemplate,
- ulAttributeCount, &session->deviceError);
- if( CKR_OK != *pError ) {
- goto loser;
- }
-
- rv = nss_dbm_mdFindObjects_factory(find, pError);
- if( (NSSCKMDFindObjects *)NULL == rv ) {
- goto loser;
- }
-
- return rv;
-
- loser:
- if( (NSSArena *)NULL != arena ) {
- (void)NSSArena_Destroy(arena);
- }
-
- return (NSSCKMDFindObjects *)NULL;
-}
-
-/* SeedRandom is irrelevant */
-/* GetRandom is irrelevant */
-
-NSS_IMPLEMENT NSSCKMDSession *
-nss_dbm_mdSession_factory
-(
- nss_dbm_token_t *token,
- NSSCKFWSession *fwSession,
- NSSCKFWInstance *fwInstance,
- CK_BBOOL rw,
- CK_RV *pError
-)
-{
- NSSArena *arena;
- nss_dbm_session_t *session;
- NSSCKMDSession *rv;
-
- arena = NSSCKFWSession_GetArena(fwSession, pError);
-
- session = nss_ZNEW(arena, nss_dbm_session_t);
- if( (nss_dbm_session_t *)NULL == session ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDSession *)NULL;
- }
-
- rv = nss_ZNEW(arena, NSSCKMDSession);
- if( (NSSCKMDSession *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDSession *)NULL;
- }
-
- session->arena = arena;
- session->token = token;
- session->list_lock = NSSCKFWInstance_CreateMutex(fwInstance, arena, pError);
- if( (NSSCKFWMutex *)NULL == session->list_lock ) {
- return (NSSCKMDSession *)NULL;
- }
-
- rv->etc = (void *)session;
- rv->Close = nss_dbm_mdSession_Close;
- rv->GetDeviceError = nss_dbm_mdSession_GetDeviceError;
- /* Login isn't needed */
- /* Logout isn't needed */
- /* InitPIN is irrelevant */
- /* SetPIN is irrelevant */
- /* GetOperationStateLen is irrelevant */
- /* GetOperationState is irrelevant */
- /* SetOperationState is irrelevant */
- rv->CreateObject = nss_dbm_mdSession_CreateObject;
- /* CopyObject isn't needed; the framework will use CreateObject */
- rv->FindObjectsInit = nss_dbm_mdSession_FindObjectsInit;
- rv->null = NULL;
-
- return rv;
-}
diff --git a/security/nss/lib/ckfw/dbm/slot.c b/security/nss/lib/ckfw/dbm/slot.c
deleted file mode 100644
index 40898897a..000000000
--- a/security/nss/lib/ckfw/dbm/slot.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-static CK_RV
-nss_dbm_mdSlot_Initialize
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_slot_t *slot = (nss_dbm_slot_t *)mdSlot->etc;
- nss_dbm_instance_t *instance = (nss_dbm_instance_t *)mdInstance->etc;
- CK_RV rv = CKR_OK;
-
- slot->token_db = nss_dbm_db_open(instance->arena, fwInstance, slot->filename,
- slot->flags, &rv);
- if( (nss_dbm_db_t *)NULL == slot->token_db ) {
- if( CKR_TOKEN_NOT_PRESENT == rv ) {
- /* This is not an error-- just means "the token isn't there" */
- rv = CKR_OK;
- }
- }
-
- return rv;
-}
-
-static void
-nss_dbm_mdSlot_Destroy
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_slot_t *slot = (nss_dbm_slot_t *)mdSlot->etc;
-
- if( (nss_dbm_db_t *)NULL != slot->token_db ) {
- nss_dbm_db_close(slot->token_db);
- slot->token_db = (nss_dbm_db_t *)NULL;
- }
-}
-
-static NSSUTF8 *
-nss_dbm_mdSlot_GetSlotDescription
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- return "Database";
-}
-
-static NSSUTF8 *
-nss_dbm_mdSlot_GetManufacturerID
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- return "Berkeley";
-}
-
-static CK_BBOOL
-nss_dbm_mdSlot_GetTokenPresent
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_slot_t *slot = (nss_dbm_slot_t *)mdSlot->etc;
-
- if( (nss_dbm_db_t *)NULL == slot->token_db ) {
- return CK_FALSE;
- } else {
- return CK_TRUE;
- }
-}
-
-static CK_BBOOL
-nss_dbm_mdSlot_GetRemovableDevice
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- /*
- * Well, this supports "tokens" (databases) that aren't there, so in
- * that sense they're removable. It'd be nice to handle databases
- * that suddenly disappear (NFS-mounted home directories and network
- * errors, for instance) but that's a harder problem. We'll say
- * we support removable devices, badly.
- */
-
- return CK_TRUE;
-}
-
-/* nss_dbm_mdSlot_GetHardwareSlot defaults to CK_FALSE */
-/*
- * nss_dbm_mdSlot_GetHardwareVersion
- * nss_dbm_mdSlot_GetFirmwareVersion
- *
- * These are kinda fuzzy concepts here. I suppose we could return the
- * Berkeley DB version for one of them, if we had an actual number we
- * were confident in. But mcom's "dbm" has been hacked enough that I
- * don't really know from what "real" version it stems..
- */
-
-static NSSCKMDToken *
-nss_dbm_mdSlot_GetToken
-(
- NSSCKMDSlot *mdSlot,
- NSSCKFWSlot *fwSlot,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- nss_dbm_slot_t *slot = (nss_dbm_slot_t *)mdSlot->etc;
- return nss_dbm_mdToken_factory(slot, pError);
-}
-
-NSS_IMPLEMENT NSSCKMDSlot *
-nss_dbm_mdSlot_factory
-(
- nss_dbm_instance_t *instance,
- char *filename,
- int flags,
- CK_RV *pError
-)
-{
- nss_dbm_slot_t *slot;
- NSSCKMDSlot *rv;
-
- slot = nss_ZNEW(instance->arena, nss_dbm_slot_t);
- if( (nss_dbm_slot_t *)NULL == slot ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDSlot *)NULL;
- }
-
- slot->instance = instance;
- slot->filename = filename;
- slot->flags = flags;
- slot->token_db = (nss_dbm_db_t *)NULL;
-
- rv = nss_ZNEW(instance->arena, NSSCKMDSlot);
- if( (NSSCKMDSlot *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDSlot *)NULL;
- }
-
- rv->etc = (void *)slot;
- rv->Initialize = nss_dbm_mdSlot_Initialize;
- rv->Destroy = nss_dbm_mdSlot_Destroy;
- rv->GetSlotDescription = nss_dbm_mdSlot_GetSlotDescription;
- rv->GetManufacturerID = nss_dbm_mdSlot_GetManufacturerID;
- rv->GetTokenPresent = nss_dbm_mdSlot_GetTokenPresent;
- rv->GetRemovableDevice = nss_dbm_mdSlot_GetRemovableDevice;
- /* GetHardwareSlot */
- /* GetHardwareVersion */
- /* GetFirmwareVersion */
- rv->GetToken = nss_dbm_mdSlot_GetToken;
- rv->null = (void *)NULL;
-
- return rv;
-}
diff --git a/security/nss/lib/ckfw/dbm/token.c b/security/nss/lib/ckfw/dbm/token.c
deleted file mode 100644
index 7c7fbf9e5..000000000
--- a/security/nss/lib/ckfw/dbm/token.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#include "ckdbm.h"
-
-static CK_RV
-nss_dbm_mdToken_Setup
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
- CK_RV rv = CKR_OK;
-
- token->arena = NSSCKFWToken_GetArena(fwToken, &rv);
- token->session_db = nss_dbm_db_open(token->arena, fwInstance, (char *)NULL,
- O_RDWR|O_CREAT, &rv);
- if( (nss_dbm_db_t *)NULL == token->session_db ) {
- return rv;
- }
-
- /* Add a label record if there isn't one? */
-
- return CKR_OK;
-}
-
-static void
-nss_dbm_mdToken_Invalidate
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
-
- if( (nss_dbm_db_t *)NULL != token->session_db ) {
- nss_dbm_db_close(token->session_db);
- token->session_db = (nss_dbm_db_t *)NULL;
- }
-}
-
-static CK_RV
-nss_dbm_mdToken_InitToken
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- NSSItem *pin,
- NSSUTF8 *label
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
- nss_dbm_instance_t *instance = (nss_dbm_instance_t *)mdInstance->etc;
- CK_RV rv;
-
- /* Wipe the session object data */
-
- if( (nss_dbm_db_t *)NULL != token->session_db ) {
- nss_dbm_db_close(token->session_db);
- }
-
- token->session_db = nss_dbm_db_open(token->arena, fwInstance, (char *)NULL,
- O_RDWR|O_CREAT, &rv);
- if( (nss_dbm_db_t *)NULL == token->session_db ) {
- return rv;
- }
-
- /* Wipe the token object data */
-
- if( token->slot->flags & O_RDWR ) {
- if( (nss_dbm_db_t *)NULL != token->slot->token_db ) {
- nss_dbm_db_close(token->slot->token_db);
- }
-
- token->slot->token_db = nss_dbm_db_open(instance->arena, fwInstance,
- token->slot->filename,
- token->slot->flags | O_CREAT | O_TRUNC,
- &rv);
- if( (nss_dbm_db_t *)NULL == token->slot->token_db ) {
- return rv;
- }
-
- /* PIN is irrelevant */
-
- rv = nss_dbm_db_set_label(token->slot->token_db, label);
- if( CKR_OK != rv ) {
- return rv;
- }
- }
-
- return CKR_OK;
-}
-
-static NSSUTF8 *
-nss_dbm_mdToken_GetLabel
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
-
- if( (NSSUTF8 *)NULL == token->label ) {
- token->label = nss_dbm_db_get_label(token->slot->token_db, token->arena, pError);
- }
-
- /* If no label has been set, return *something* */
- if( (NSSUTF8 *)NULL == token->label ) {
- return token->slot->filename;
- }
-
- return token->label;
-}
-
-static NSSUTF8 *
-nss_dbm_mdToken_GetManufacturerID
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- return "mozilla.org NSS";
-}
-
-static NSSUTF8 *
-nss_dbm_mdToken_GetModel
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- CK_RV *pError
-)
-{
- return "dbm";
-}
-
-/* GetSerialNumber is irrelevant */
-/* GetHasRNG defaults to CK_FALSE */
-
-static CK_BBOOL
-nss_dbm_mdToken_GetIsWriteProtected
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
-
- if( token->slot->flags & O_RDWR ) {
- return CK_FALSE;
- } else {
- return CK_TRUE;
- }
-}
-
-/* GetLoginRequired defaults to CK_FALSE */
-/* GetUserPinInitialized defaults to CK_FALSE */
-/* GetRestoreKeyNotNeeded is irrelevant */
-/* GetHasClockOnToken defaults to CK_FALSE */
-/* GetHasProtectedAuthenticationPath defaults to CK_FALSE */
-/* GetSupportsDualCryptoOperations is irrelevant */
-
-static CK_ULONG
-nss_dbm_mdToken_effectively_infinite
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- return CK_EFFECTIVELY_INFINITE;
-}
-
-static CK_VERSION
-nss_dbm_mdToken_GetHardwareVersion
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
- return nss_dbm_db_get_format_version(token->slot->token_db);
-}
-
-/* GetFirmwareVersion is irrelevant */
-/* GetUTCTime is irrelevant */
-
-static NSSCKMDSession *
-nss_dbm_mdToken_OpenSession
-(
- NSSCKMDToken *mdToken,
- NSSCKFWToken *fwToken,
- NSSCKMDInstance *mdInstance,
- NSSCKFWInstance *fwInstance,
- NSSCKFWSession *fwSession,
- CK_BBOOL rw,
- CK_RV *pError
-)
-{
- nss_dbm_token_t *token = (nss_dbm_token_t *)mdToken->etc;
- return nss_dbm_mdSession_factory(token, fwSession, fwInstance, rw, pError);
-}
-
-/* GetMechanismCount defaults to zero */
-/* GetMechanismTypes is irrelevant */
-/* GetMechanism is irrelevant */
-
-NSS_IMPLEMENT NSSCKMDToken *
-nss_dbm_mdToken_factory
-(
- nss_dbm_slot_t *slot,
- CK_RV *pError
-)
-{
- nss_dbm_token_t *token;
- NSSCKMDToken *rv;
-
- token = nss_ZNEW(slot->instance->arena, nss_dbm_token_t);
- if( (nss_dbm_token_t *)NULL == token ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDToken *)NULL;
- }
-
- rv = nss_ZNEW(slot->instance->arena, NSSCKMDToken);
- if( (NSSCKMDToken *)NULL == rv ) {
- *pError = CKR_HOST_MEMORY;
- return (NSSCKMDToken *)NULL;
- }
-
- token->slot = slot;
-
- rv->etc = (void *)token;
- rv->Setup = nss_dbm_mdToken_Setup;
- rv->Invalidate = nss_dbm_mdToken_Invalidate;
- rv->InitToken = nss_dbm_mdToken_InitToken;
- rv->GetLabel = nss_dbm_mdToken_GetLabel;
- rv->GetManufacturerID = nss_dbm_mdToken_GetManufacturerID;
- rv->GetModel = nss_dbm_mdToken_GetModel;
- /* GetSerialNumber is irrelevant */
- /* GetHasRNG defaults to CK_FALSE */
- rv->GetIsWriteProtected = nss_dbm_mdToken_GetIsWriteProtected;
- /* GetLoginRequired defaults to CK_FALSE */
- /* GetUserPinInitialized defaults to CK_FALSE */
- /* GetRestoreKeyNotNeeded is irrelevant */
- /* GetHasClockOnToken defaults to CK_FALSE */
- /* GetHasProtectedAuthenticationPath defaults to CK_FALSE */
- /* GetSupportsDualCryptoOperations is irrelevant */
- rv->GetMaxSessionCount = nss_dbm_mdToken_effectively_infinite;
- rv->GetMaxRwSessionCount = nss_dbm_mdToken_effectively_infinite;
- /* GetMaxPinLen is irrelevant */
- /* GetMinPinLen is irrelevant */
- /* GetTotalPublicMemory defaults to CK_UNAVAILABLE_INFORMATION */
- /* GetFreePublicMemory defaults to CK_UNAVAILABLE_INFORMATION */
- /* GetTotalPrivateMemory defaults to CK_UNAVAILABLE_INFORMATION */
- /* GetFreePrivateMemory defaults to CK_UNAVAILABLE_INFORMATION */
- rv->GetHardwareVersion = nss_dbm_mdToken_GetHardwareVersion;
- /* GetFirmwareVersion is irrelevant */
- /* GetUTCTime is irrelevant */
- rv->OpenSession = nss_dbm_mdToken_OpenSession;
- rv->null = NULL;
-
- return rv;
-}
diff --git a/security/nss/lib/pk11wrap/pk11sdr.c b/security/nss/lib/pk11wrap/pk11sdr.c
index 6e84e2261..911d18d95 100644
--- a/security/nss/lib/pk11wrap/pk11sdr.c
+++ b/security/nss/lib/pk11wrap/pk11sdr.c
@@ -194,7 +194,7 @@ PK11SDR_Encrypt(SECItem *keyid, SECItem *data, SECItem *result, void *cx)
sdrResult.data.len = paddedData.len;
sdrResult.data.data = (unsigned char *)PORT_ArenaAlloc(arena, sdrResult.data.len);
- rv = PK11_CipherOp(ctx, sdrResult.data.data, &sdrResult.data.len, sdrResult.data.len,
+ rv = PK11_CipherOp(ctx, sdrResult.data.data, (int *)&sdrResult.data.len, sdrResult.data.len,
paddedData.data, paddedData.len);
if (rv != SECSuccess) goto loser;
@@ -266,7 +266,7 @@ PK11SDR_Decrypt(SECItem *data, SECItem *result, void *cx)
paddedResult.len = sdrResult.data.len;
paddedResult.data = PORT_ArenaAlloc(arena, result->len);
- rv = PK11_CipherOp(ctx, paddedResult.data, &paddedResult.len, paddedResult.len,
+ rv = PK11_CipherOp(ctx, paddedResult.data, (int *)&paddedResult.len, paddedResult.len,
sdrResult.data.data, sdrResult.data.len);
if (rv != SECSuccess) goto loser;
@@ -277,7 +277,7 @@ PK11SDR_Decrypt(SECItem *data, SECItem *result, void *cx)
if (rv) goto loser;
loser:
- SECITEM_ZfreeItem(&paddedResult, PR_FALSE);
+ /* SECITEM_ZfreeItem(&paddedResult, PR_FALSE); */
if (arena) PORT_FreeArena(arena, PR_TRUE);
if (ctx) PK11_DestroyContext(ctx, PR_TRUE);
if (key) PK11_FreeSymKey(key);
diff --git a/security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c
deleted file mode 100644
index 4e0d0d018..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/AppendRelativeDistinguishedName.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * NSSPKIXRDNSequence_AppendRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-NSSPKIXRDNSequence_AppendRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdn
-)
-{
- nss_ClearErrorStack();
-
-#ifdef DEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) {
- return PR_FAILURE;
- }
-#endif /* DEBUG */
-
- return nssPKIXRDNSequence_AppendRelativeDistinguishedName(rdnseq, rdn);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c b/security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c
deleted file mode 100644
index 05b5e89b4..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/GetRelativeDistinguishedNameCount.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * Nonnegative integer upon success
- * -1 upon failure.
- */
-
-NSS_IMPLEMENT PRInt32
-NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount
-(
- NSSPKIXRDNSequence *rdnseq
-)
-{
- nss_ClearErrorStack();
-
-#ifdef DEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return -1;
- }
-#endif /* DEBUG */
-
- return nssPKIXRDNSequence_GetRelativeDistinguishedNameCount(rdnseq);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c
deleted file mode 100644
index 433c2a315..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/InsertRelativeDistinguishedName.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * NSSPKIXRDNSequence_InsertRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-NSSPKIXRDNSequence_InsertRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i,
- NSSPKIXRelativeDistinguishedName *rdn
-)
-{
- nss_ClearErrorStack();
-
-#ifdef DEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) {
- return PR_FAILURE;
- }
-#endif /* DEBUG */
-
- return nssPKIXRDNSequence_InsertRelativeDistinguishedName(rdnseq, i, rdn);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c
deleted file mode 100644
index 9d1ea4875..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PAppendRelativeDistinguishedName.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_AppendRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-nssPKIXRDNSequence_AppendRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdn
-)
-{
- NSSPKIXRelativeDistinguishedName **na;
- NSSPKIXRelativeDistinguishedName *dup;
-
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) {
- return PR_FAILURE;
- }
-#endif /* NSSDEBUG */
-
- if( 0 == rdnseq->count ) {
- nss_pkix_RDNSequence_Count(rdnseq);
- }
-
-#ifdef PEDANTIC
- if( 0 == rdnseq->count ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-#endif /* PEDANTIC */
-
- na = (NSSPKIXRelativeDistinguishedName **)
- nss_ZRealloc(rdnseq->rdns, ((rdnseq->count+2) *
- sizeof(NSSPKIXRelativeDistinguishedName *)));
- if( (NSSPKIXRelativeDistinguishedName **)NULL == na ) {
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- rdnseq->rdns = na;
-
- dup = nssPKIXRelativeDistinguishedName_Duplicate(rdn, rdnseq->arena);
- if( (NSSPKIXRelativeDistinguishedName *)NULL == dup ) {
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- na[ rdnseq->count++ ] = dup;
-
- return nss_pkix_RDNSequence_Clear(rdnseq);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c
deleted file mode 100644
index 8064b9636..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PFindRelativeDistinguishedName.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_FindRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NOT_FOUND
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * The index of the specified attribute value upon success
- * -1 upon failure.
- */
-
-NSS_IMPLEMENT PRInt32
-nssPKIXRDNSequence_FindRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdn
-)
-{
- PRUint32 i;
- NSSPKIXRelativeDistinguishedName **a;
-
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) {
- return PR_FAILURE;
- }
-#endif /* NSSDEBUG */
-
- for( i = 0, a = rdnseq->rdns; *a; a++, (i > 0x7fffffff) || i++ ) {
- if( PR_TRUE == nssPKIXRelativeDistinguishedName_Equal(*a, rdn) ) {
- if( i > 0x7fffffff ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return -1;
- }
- return (PRInt32)i;
- }
- }
-
- nss_SetError(NSS_ERROR_NOT_FOUND);
- return -1;
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c b/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c
deleted file mode 100644
index a01077db1..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNameCount.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_GetRelativeDistinguishedNameCount
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * Nonnegative integer upon success
- * -1 upon failure.
- */
-
-NSS_IMPLEMENT PRInt32
-nssPKIXRDNSequence_GetRelativeDistinguishedNameCount
-(
- NSSPKIXRDNSequence *rdnseq
-)
-{
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return -1;
- }
-#endif /* NSSDEBUG */
-
- if( 0 == rdnseq->count ) {
- nss_pkix_RDNSequence_Count(rdnseq);
- }
-
-#ifdef PEDANTIC
- if( 0 == rdnseq->count ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return -1;
- }
-#endif /* PEDANTIC */
-
- if( rdnseq->count > 0x7fffffff ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return -1;
- }
-
- return (PRInt32)(rdnseq->count);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c b/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c
deleted file mode 100644
index 115480dfd..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PGetRelativeDistinguishedNames.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_GetRelativeDistinguishedNames
- *
- * This routine returns all of the relative distinguished names in the
- * specified RDN Sequence. {...} If the array is allocated, or if the
- * specified one has extra space, the array will be null-terminated.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_ARRAY_TOO_SMALL
- *
- * Return value:
- * A valid pointer to an array of NSSPKIXRelativeDistinguishedName
- * pointers upon success
- * NULL upon failure.
- */
-
-NSS_IMPLEMENT NSSPKIXRelativeDistinguishedName **
-nssPKIXRDNSequence_GetRelativeDistinguishedNames
-(
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rvOpt[],
- PRInt32 limit,
- NSSArena *arenaOpt
-)
-{
- NSSPKIXRelativeDistinguishedName **rv = (NSSPKIXRelativeDistinguishedName **)NULL;
- PRUint32 i;
-
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return (NSSPKIXRelativeDistinguishedName **)NULL;
- }
-
- if( (NSSArena *)NULL != arenaOpt ) {
- if( PR_SUCCESS != nssArena_verifyOpt(attribute) ) {
- return (NSSPKIXRelativeDistinguishedName **)NULL;
- }
- }
-#endif /* NSSDEBUG */
-
- if( 0 == rdnseq->count ) {
- nss_pkix_RDNSequence_Count(rdnseq);
- }
-
-#ifdef PEDANTIC
- if( 0 == rdnseq->count ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return (NSSPKIXRelativeDistinguishedName **)NULL;
- }
-#endif /* PEDANTIC */
-
- if( (limit < rdnseq->count) &&
- !((0 == limit) && ((NSSPKIXRelativeDistinguishedName **)NULL == rvOpt)) ) {
- nss_SetError(NSS_ERROR_ARRAY_TOO_SMALL);
- return (NSSPKIXRelativeDistinguishedName **)NULL;
- }
-
- limit = rdnseq->count;
- if( (NSSPKIXRelativeDistinguishedName **)NULL == rvOpt ) {
- rv = nss_ZNEWARRAY(arenaOpt, NSSPKIXRelativeDistinguishedName *, limit);
- if( (NSSPKIXRelativeDistinguishedName **)NULL == rv ) {
- return (NSSPKIXRelativeDistinguishedName **)NULL;
- }
- } else {
- rv = rvOpt;
- }
-
- for( i = 0; i < limit; i++ ) {
- rv[i] = nssPKIXRelativedistinguishedName_Duplicate(rdnseq->rdns[i], arenaOpt);
- if( (NSSPKIXRelativeDistinguishedName *)NULL == rv[i] ) {
- goto loser;
- }
- }
-
- return rv;
-
- loser:
- for( i = 0; i < limit; i++ ) {
- NSSPKIXRelativeDistinguishedName *x = rv[i];
- if( (NSSPKIXRelativeDistinguishedName *)NULL == x ) {
- break;
- }
- (void)nssPKIXRelativeDistinguishedName_Destroy(x);
- }
-
- if( rv != rvOpt ) {
- nss_ZFreeIf(rv);
- }
-
- return (NSSPKIXRelativeDistinguishedName **)NULL;
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c
deleted file mode 100644
index 213866694..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PInsertRelativeDistinguishedName.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_InsertRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-nssPKIXRDNSequence_InsertRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i,
- NSSPKIXRelativeDistinguishedName *rdn
-)
-{
- NSSPKIXRelativeDistinguishedName **na;
- NSSPKIXRelativeDistinguishedName *dup;
- PRInt32 c;
-
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) {
- return PR_FAILURE;
- }
-#endif /* NSSDEBUG */
-
- if( 0 == rdnseq->count ) {
- nss_pkix_RDNSequence_Count(rdnseq);
- }
-
-#ifdef PEDANTIC
- if( 0 == rdnseq->count ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-#endif /* PEDANTIC */
-
- if( (i < 0) || (i >= rdnseq->count) ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- na = (NSSPKIXRelativeDistinguishedName **)
- nss_ZRealloc(rdnseq->rdns, ((rdnseq->count+2) *
- sizeof(NSSPKIXRelativeDistinguishedName *)));
- if( (NSSPKIXRelativeDistinguishedName **)NULL == na ) {
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- rdnseq->rdns = na;
-
- dup = nssPKIXRelativeDistinguishedName_Duplicate(rdn, rdnseq->arena);
- if( (NSSPKIXRelativeDistinguishedName *)NULL == dup ) {
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- for( c = rdnseq->count; c > i; c-- ) {
- na[ c ] = na[ c-1 ];
- }
-
- na[ i ] = dup;
- rdnseq->count++;
-
- return nss_pkix_RDNSequence_Clear(rdnseq);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c
deleted file mode 100644
index 447620c77..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PRemoveRelativeDistinguishedName.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_RemoveRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-nssPKIXRDNSequence_RemoveRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i
-)
-{
- NSSPKIXRelativeDistinguishedName **na;
- PRInt32 c;
-
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-#endif /* NSSDEBUG */
-
- if( 0 == rdnseq->count ) {
- nss_pkix_RDNSequence_Count(rdnseq);
- }
-
-#ifdef PEDANTIC
- if( 0 == rdnseq->count ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-#endif /* PEDANTIC */
-
- if( (i < 0) || (i >= rdnseq->count) ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- nssPKIXRelativeDistinguishedName_Destroy(rdnseq->rdns[i]);
-
- rdnseq->rdns[i] = rdnseq->rdns[ rdnseq->count ];
- rdnseq->rdns[ rdnseq->count ] = (NSSPKIXRelativeDistinguishedName *)NULL;
- rdnseq->count--;
-
- na = (NSSPKIXRelativeDistinguishedName **)
- nss_ZRealloc(rdnseq->rdns, ((rdnseq->count) *
- sizeof(NSSPKIXRelativeDistinguishedName *)));
- if( (NSSPKIXRelativeDistinguishedName **)NULL == na ) {
- return (NSSPKIXRelativeDistinguishedName *)NULL;
- }
-
- rdnseq->rdns = na;
-
- return nss_pkix_RDNSequence_Clear(rdnseq);
-}
diff --git a/security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c b/security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c
deleted file mode 100644
index b0320a4b7..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/PSetRelativeDistinguishedNames.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRDNSequence_SetRelativeDistinguishedNames
- *
- * -- fgmr comments --
- * If the array pointer itself is null, the set is considered empty.
- * If the count is zero but the pointer nonnull, the array will be
- * assumed to be null-terminated.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-nssPKIXRDNSequence_SetRelativeDistinguishedNames
-(
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdns[],
- PRInt32 countOpt
-)
-{
- NSSPKIXRelativeDistinguishedName **ip;
- NSSPKIXRelativeDistinguishedName **newarray;
- PRUint32 i;
- nssArenaMark *mark;
-
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-
- if( (NSSPKIXRelativeDistinguishedName **)NULL == rdns ) {
- nss_SetError(NSS_ERROR_INVALID_POINTER);
- return PR_FAILURE;
- }
-
- {
- PRUint32 i, count;
-
- if( 0 == countOpt ) {
- for( i = 0; i < 0x80000000; i++ ) {
- if( (NSSPKIXRelativeDistinguishedName *)NULL == rdns[i] ) {
- break;
- }
- }
-
-#ifdef PEDANTIC
- if( 0x80000000 == i ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return PR_FAILURE;
- }
-#endif /* PEDANTIC */
-
- count = (PRUint32)i;
- } else {
- if( countOpt < 0 ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return PR_FAILURE;
- }
-
- count = (PRUint32)countOpt;
- }
-
- for( i = 0; i < count; i++ ) {
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdns[i]) ) {
- return PR_FAILURE;
- }
- }
- }
-#endif /* NSSDEBUG */
-
- mark = nssArena_Mark(rdnseq->mark);
- if( (nssArenaMark *)NULL == mark ) {
- return PR_FAILURE;
- }
-
- newarray = nss_ZNEWARRAY(rdnseq->arena, NSSPKIXRelativeDistinguishedName *, countOpt);
- if( (NSSPKIXRelativeDistinguishedName **)NULL == newarray ) {
- goto loser;
- }
-
- for( i = 0; i < countOpt; i++ ) {
- newarray[i] = nssPKIXRelativeDistinguishedName_Duplicate(rdns[i], rdnseq->arena);
- if( (NSSPKIXRelativeDistinguishedName *)NULL == newarray[i] ) {
- goto loser;
- }
- }
-
- for( i = 0; i < rdnseq->count; i++ ) {
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_Destroy(rdnseq->rdns[i]) ) {
- goto loser;
- }
- }
-
- nss_ZFreeIf(rdnseq->rdns);
-
- rdnseq->count = countOpt;
- rdnseq->rdns = newarray;
-
- (void)nss_pkix_RDNSequence_Clear(rdnseq);
-
- return nssArena_Unmark(rdnseq->arena, mark);
-
- loser:
- (void)nssArena_Release(a->arena, mark);
- return PR_FAILURE;
-}
-
diff --git a/security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c b/security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c
deleted file mode 100644
index 141ab7f37..000000000
--- a/security/nss/lib/pkix/src/RDNSequence/RemoveRelativeDistinguishedName.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * NSSPKIXRDNSequence_RemoveRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
-
-NSS_IMPLEMENT PRStatus
-NSSPKIXRDNSequence_RemoveRelativeDistinguishedName
-(
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i
-)
-{
- nss_ClearErrorStack();
-
-#ifdef DEBUG
- if( PR_SUCCESS != nssPKIXRDNSequence_verifyPointer(rdnseq) ) {
- return PR_FAILURE;
- }
-#endif /* DEBUG */
-
- return nssPKIXRDNSequence_RemoveRelativeDistinguishedName(rdnseq, i);
-}
diff --git a/security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c b/security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c
deleted file mode 100644
index df8e1b48e..000000000
--- a/security/nss/lib/pkix/src/RelativeDistinguishedName/PGetAttributeTypeAndValueCount.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.
- */
-
-#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $Source$ $Revision$ $Date$ $Name$";
-#endif /* DEBUG */
-
-#ifndef PKIX_H
-#include "pkix.h"
-#endif /* PKIX_H */
-
-/*
- * nssPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * Nonnegative integer upon success
- * -1 upon failure.
- */
-
-NSS_IMPLEMENT PRInt32
-nssPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount
-(
- NSSPKIXRelativeDistinguishedName *rdn
-)
-{
-#ifdef NSSDEBUG
- if( PR_SUCCESS != nssPKIXRelativeDistinguishedName_verifyPointer(rdn) ) {
- return -1;
- }
-#endif /* NSSDEBUG */
-
- if( 0 == rdn->count ) {
- nss_pkix_RelativeDistinguishedName_Count(rdn);
- }
-
-#ifdef PEDANTIC
- if( 0 == rdn->count ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return -1;
- }
-#endif /* PEDANTIC */
-
- if( rdn->count > 0x7fffffff ) {
- nss_SetError(NSS_ERROR_VALUE_OUT_OF_RANGE);
- return -1;
- }
-
- return (PRInt32)(rdn->count);
-}
diff --git a/security/nss/macbuild/NSS.mcp b/security/nss/macbuild/NSS.mcp
index 70bd25075..566e38f82 100755
--- a/security/nss/macbuild/NSS.mcp
+++ b/security/nss/macbuild/NSS.mcp
Binary files differ
diff --git a/security/nss/tests/all.sh b/security/nss/tests/all.sh
index 168254c8a..ca0fba124 100755
--- a/security/nss/tests/all.sh
+++ b/security/nss/tests/all.sh
@@ -5,7 +5,7 @@
CURDIR=`pwd`
TESTS="ssl"
cd common
-. init.sh
+. ./init.sh
export MOZILLA_ROOT
export COMMON
export DIST
diff --git a/security/nss/tests/common/arch.sh b/security/nss/tests/common/arch.sh
index 16820a699..b2f6475c4 100755
--- a/security/nss/tests/common/arch.sh
+++ b/security/nss/tests/common/arch.sh
@@ -38,7 +38,7 @@
#
# Macros for getting the OS architecture
#
-if [ -s "${USE_64}" ]; then
+if [ -n "${USE_64}" ]; then
A64BIT_TAG=_64
else
A64BIT_TAG=
@@ -135,9 +135,12 @@ fi
#if [(,$(filter-out Linux FreeBSD,${OS_ARCH}))
#OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
#endif
+if [ ${OS_ARCH} = "Linux" ]; then
+ OS_RELEASE=`echo ${OS_RELEASE} | sed 's/-.*//'`
+fi
if [ ${OS_ARCH} = "Linux" ]; then
- OS_RELEASE=`basename ${OS_RELEASE}`
+ OS_RELEASE=`echo ${OS_RELEASE} | sed 's;\\.[0123456789]*$;;'`
fi
#######################################################################
@@ -212,6 +215,20 @@ if [ ${OS_ARCH} = "Windows_NT" ]; then
fi
fi
+if [ ${OS_ARCH} = "Linux" ]; then
+ IMPL_STRATEGY=_PTH
+
+ if [ ${OS_TEST} = "ppc" ]; then
+ CPU_TAG=_ppc
+ elif [ ${OS_TEST} = "alpha" ]; then
+ CPU_TAG=_alpha
+ else
+ CPU_TAG=_x86
+ fi
+ LIBC_TAG=_glibc
+ ARCH=linux
+fi
+
OS_TARGET=${OS_TARGET-${OS_ARCH}}
if [ ${OS_TARGET} = "WIN95" ]; then
@@ -234,14 +251,14 @@ OS_CONFIG=${OS_TARGET}${OS_RELEASE}
# to distinguish between debug and release builds.
#
-if [ -s "${BUILD_OPT}" ]; then
+if [ -n "${BUILD_OPT}" ]; then
if [ ${OS_TARGET} = "WIN16" ]; then
OBJDIR_TAG=_O
else
OBJDIR_TAG=${A64BIT_TAG}_OPT
fi
else
- if [ -s "${BUILD_IDG}" ]; then
+ if [ -n "${BUILD_IDG}" ]; then
if [ ${OS_TARGET} = "WIN16" ]; then
OBJDIR_TAG=_I
else
@@ -278,19 +295,19 @@ fi
OBJDIR_NAME=${OS_CONFIG}${CPU_TAG}${COMPILER_TAG}${LIBC_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}'.OBJ'
#export OS_CONFIG OS_ARCH OBJDIR_NAME OS_RELEASE OBJDIR_TAG
+export OS_ARCH
if [ ${OS_ARCH} = "WINNT" ]; then
if [ ${OS_TARGET} != "WIN16" ]; then
-if [ ! -s "${BUILD_OPT}" ]; then
+if [ -z "${BUILD_OPT}" ]; then
#
# Define USE_DEBUG_RTL if you want to use the debug runtime library
# (RTL) in the debug build
#
-if [ -s "${USE_DEBUG_RTL}" ]; then
+if [ -n "${USE_DEBUG_RTL}" ]; then
OBJDIR_NAME=${OS_CONFIG}${CPU_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.OBJD
fi
fi
fi
fi
-echo ${OBJDIR_NAME}
diff --git a/security/nss/tests/common/init.sh b/security/nss/tests/common/init.sh
index bf6f3039b..2cb43fd19 100644
--- a/security/nss/tests/common/init.sh
+++ b/security/nss/tests/common/init.sh
@@ -12,7 +12,11 @@ SECURITY_ROOT=${SECURITY_ROOT-${MOZILLA_ROOT}/security/nss}
TESTDIR=${TESTDIR-${MOZILLA_ROOT}/tests_results/security}
. ../common/arch.sh
OBJDIR=${OBJDIR_NAME}
+if [ ${OS_ARCH} == "WINNT" ]; then
+PATH=${DIST}/${OBJDIR}/bin\;${DIST}/${OBJDIR}/lib\;$PATH
+else
PATH=${DIST}/${OBJDIR}/bin:${DIST}/${OBJDIR}/lib:$PATH
+fi
export PATH
LD_LIBRARY_PATH=${DIST}/${OBJDIR}/lib
export LD_LIBRARY_PATH
@@ -21,7 +25,7 @@ if [ ! -d ${TESTDIR} ]; then
mkdir -p ${TESTDIR}
fi
-if [ ! -s "${HOSTDIR}" ]; then
+if [ -z "${HOSTDIR}" ]; then
version=1
if [ -f ${TESTDIR}/${HOST} ]; then
version=`cat ${TESTDIR}/${HOST}`
@@ -52,7 +56,7 @@ fi
KILL="kill"
if [ ${OS_ARCH} = "Linux" ]; then
- KILL="kill -kill"
+ SLEEP="sleep 30"
fi
export KILL
diff --git a/security/nss/tests/ssl/ssl.sh b/security/nss/tests/ssl/ssl.sh
index 249345720..5d51b7e96 100755
--- a/security/nss/tests/ssl/ssl.sh
+++ b/security/nss/tests/ssl/ssl.sh
@@ -14,12 +14,14 @@ SSLSTRESS=${CURDIR}/sslstress.txt
REQUEST_FILE=${CURDIR}/sslreq.txt
#temparary files
-PWFILE=/tmp/tests.pw.$$
-CERTSCRIPT=/tmp/tests.certs.$$
-NOISE_FILE=/tmp/tests.noise.$$
-SERVEROUTFILE=/tmp/tests.server.$$
+TMP=${TMP-/tmp}
+PWFILE=${TMP}/tests.pw.$$
+CERTSCRIPT=${TMP}/tests_certs.$$
+NOISE_FILE=${TMP}/tests_noise.$$
+SERVEROUTFILE=${TMP}/tests_server.$$
+SERVERPID=${TMP}/tests_pid.$$
-TEMPFILES="${PWFILE} ${CERTSCRIPT} ${SERVEROUTFILE} ${NOISE_FILE}"
+TEMPFILES="${PWFILE} ${CERTSCRIPT} ${SERVEROUTFILE} ${NOISE_FILE} ${SERVERPID}"
none=1
coverage=0
@@ -93,6 +95,7 @@ echo nss > ${PWFILE}
echo " certutil -N -d . -f ${PWFILE}"
certutil -N -d . -f ${PWFILE}
+echo initialized
echo 5 > ${CERTSCRIPT}
echo 9 >> ${CERTSCRIPT}
echo n >> ${CERTSCRIPT}
@@ -121,13 +124,44 @@ if [ ! -d ${CLIENTDIR} ]; then
mkdir -p ${CLIENTDIR}
fi
cd ${CLIENTDIR}
-cp ${CADIR}/*.db .
-echo "certutil -S -n \"TestUser\" -s \"CN=Test User, O=BOGUS Netscape, L=Mountain View, ST=California, C=US\" -t \"u,u,u\" -c "TestCA" -m 3 -v 60 -d . -f ${PWFILE} -z ${NOISE_FILE}"
-certutil -S -n "TestUser" -s "CN=Test User, O=BOGUS NSS, L=Mountain View, ST=California, C=US" -t "u,u,u" -c "TestCA" -m 3 -v 60 -d . -f ${PWFILE} -z ${NOISE_FILE}
+echo " certutil -N -d . -f ${PWFILE}"
+certutil -N -d . -f ${PWFILE}
+if [ $? -ne 0 ]; then
+ CERTFAILED=${CERTFAILED-"Init DB"}
+fi
+echo "Import the root CA"
+echo " certutil -L -n \"TestCA\" -r -d ../CA > root.cert"
+certutil -L -n "TestCA" -r -d ../CA > root.cert
+if [ $? -ne 0 ]; then
+ CERTFAILED=${CERTFAILED-"Export Root"}
+fi
+echo " certutil -A -n \"TestCA\" -t \"TC,TC,TC\" -f ${PWFILE} -d . -i root.cert"
+certutil -A -n "TestCA" -t "TC,TC,TC" -f ${PWFILE} -d . -i root.cert
+if [ $? -ne 0 ]; then
+ CERTFAILED=${CERTFAILED-"Import Root"}
+fi
+echo "Generate a Certificate request"
+echo " certutil -R -s \"CN=Test User, O=BOGUS Netscape, L=Mountain View, ST=California, C=US\" -d . -f ${PWFILE} -z ${NOISE_FILE} -o req"
+certutil -R -s "CN=Test User, O=BOGUS NSS, L=Mountain View, ST=California, C=US" -d . -f ${PWFILE} -z ${NOISE_FILE} -o req
+if [ $? -ne 0 ]; then
+ CERTFAILED=${CERTFAILED-"Generate Request"}
+fi
+echo "Sign the Certificate request"
+echo "certutil -C -c "TestCA" -m 3 -v 60 -d ../CA -f ${PWFILE} -i req -o user.cert"
+certutil -C -c "TestCA" -m 3 -v 60 -d ../CA -i req -o user.cert -f ${PWFILE}
if [ $? -ne 0 ]; then
- echo "<TR><TD>Creating client Cert</TD><TD bgcolor=red>Failed</TD><TR>" >> ${RESULTS}
+ CERTFAILED=${CERTFAILED-"Sign User Cert"}
+fi
+echo "Import the new Cert"
+echo "certutil -A -n \"TestUser\" -t \"u,u,u\" -d . -f ${PWFILE} -i user.cert"
+certutil -A -n "TestUser" -t "u,u,u" -d . -f ${PWFILE} -i user.cert
+if [ $? -ne 0 ]; then
+ CERTFAILED=${CERTFAILED-"Import User"}
+fi
+if [ -n "${CERTFAILED}" ]; then
+ echo "<TR><TD>Creating User Cert</TD><TD bgcolor=red>Failed ($CERTFAILED)</TD><TR>" >> ${RESULTS}
else
- echo "<TR><TD>Creating client Cert</TD><TD bgcolor=lightGreen>Passed</TD><TR>" >> ${RESULTS}
+ echo "<TR><TD>Creating User Cert</TD><TD bgcolor=lightGreen>Passed</TD><TR>" >> ${RESULTS}
fi
echo "***** Creating Server CA Issued Certificate for ${HOST}.${DOMSUF} *****"
@@ -170,12 +204,12 @@ do
if [ ${param} = "i" ]; then
sparam='-c i'
fi
+ echo "selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -i ${SERVERPID} -w nss ${sparam} & "
if [ ${fileout} -eq 1 ]; then
- selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} > ${SERVEROUTFILE} 2>&1 &
+ selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -i ${SERVERPID} -w nss ${sparam} > ${SERVEROUTFILE} 2>&1 &
else
- selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} &
+ selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} &
fi
- SERVERPID=$!
sleep 10
tstclnt -p ${PORT} -h ${HOST} -c ${param} ${TLS_FLAG} -f -d . < ${REQUEST_FILE}
@@ -184,11 +218,12 @@ do
else
echo "<TR><TD>"${testname}"</TD><TD bgcolor=lightGreen>Passed</TD><TR>" >> ${RESULTS}
fi
- ${KILL} ${SERVERPID}
- wait ${SERVERPID}
+ ${KILL} `cat ${SERVERPID}`
+ wait `cat ${SERVERPID}`
if [ ${fileout} -eq 1 ]; then
cat ${SERVEROUTFILE}
fi
+ ${SLEEP}
fi
done
@@ -207,27 +242,27 @@ do
echo "***** $testname ****"
sparam=`echo $sparam | sed -e 's;_; ;g'`
cparam=`echo $cparam | sed -e 's;_; ;g'`
- echo "selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} &"
+ echo "selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} &"
if [ ${fileout} -eq 1 ]; then
- selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} > ${SERVEROUTFILE} 2>&1 &
+ selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} > ${SERVEROUTFILE} 2>&1 &
else
- selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} &
+ selfserv -v -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} &
fi
- SERVERPID=$!
sleep 10
pwd
echo "tstclnt -p ${PORT} -h ${HOST} -f -d ${CLIENTDIR} ${cparam}"
tstclnt -p ${PORT} -h ${HOST} -f -d ${CLIENTDIR} ${cparam} < ${REQUEST_FILE}
- if [ $? -ne $value ]; then
+ if [ $? $value 0 ]; then
echo "<TR><TD>"${testname}"</TD><TD bgcolor=red>Failed</TD><TR>" >> ${RESULTS}
else
echo "<TR><TD>"${testname}"</TD><TD bgcolor=lightGreen>Passed</TD><TR>" >> ${RESULTS}
fi
- ${KILL} ${SERVERPID}
- wait ${SERVERPID}
+ ${KILL} `cat ${SERVERPID}`
+ wait `cat ${SERVERPID}`
if [ ${fileout} -eq 1 ]; then
cat ${SERVEROUTFILE}
fi
+ ${SLEEP}
fi
done
@@ -247,12 +282,12 @@ do
echo "********************* $testname ****************************"
sparam=`echo $sparam | sed -e 's;_; ;g'`
cparam=`echo $cparam | sed -e 's;_; ;g'`
+ echo "selfserv -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} &"
if [ ${fileout} -eq 1 ]; then
- selfserv -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} > ${SERVEROUTFILE} 2>&1 &
+ selfserv -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} > ${SERVEROUTFILE} 2>&1 &
else
- selfserv -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} &
+ selfserv -p ${PORT} -d ${SERVERDIR} -n ${HOST}.${DOMSUF} -w nss ${sparam} -i ${SERVERPID} &
fi
- SERVERPID=$!
sleep 10
strsclnt -p ${PORT} ${HOST} -d . -w nss $cparam
@@ -261,11 +296,12 @@ do
else
echo "<TR><TD>"${testname}"</TD><TD bgcolor=lightGreen>Passed</TD><TR>" >> ${RESULTS}
fi
- ${KILL} ${SERVERPID}
- wait ${SERVERPID}
+ ${KILL} `cat ${SERVERPID}`
+ wait `cat ${SERVERPID}`
if [ ${fileout} -eq 1 ]; then
cat ${SERVEROUTFILE}
fi
+ ${SLEEP}
fi
done
diff --git a/security/nss/tests/ssl/sslauth.txt b/security/nss/tests/ssl/sslauth.txt
index e6beda10f..0c1c25fd9 100644
--- a/security/nss/tests/ssl/sslauth.txt
+++ b/security/nss/tests/ssl/sslauth.txt
@@ -5,17 +5,17 @@
# return server client Test Case name
# value params params
# ------ ------ ------ ---------------
- 0 -r -w_nss TLS Request don't require client auth (client does not provide auth)
- 0 -r -n_TestUser_-w_bogus TLS Request don't require client auth (bad password)
- 0 -r -n_TestUser_-w_nss TLS Request don't require client auth (client auth)
- 0 -r_-r -w_nss TLS Require client auth (client does not provide auth)
+ -eq -r -w_nss TLS Request don't require client auth (client does not provide auth)
+ -eq -r -n_TestUser_-w_bogus TLS Request don't require client auth (bad password)
+ -eq -r -n_TestUser_-w_nss TLS Request don't require client auth (client auth)
+ -eq -r_-r -w_nss TLS Require client auth (client does not provide auth)
# this one should fail
- 254 -r_-r -n_TestUser_-w_bogus TLS Require client auth (bad password)
- 0 -r_-r -n_TestUser_-w_nss TLS Require client auth (client auth)
- 0 -r -T_-w_nss SSL3 Request don't require client auth (client does not provide auth)
- 0 -r -T_-n_TestUser_-w_bogus SSL3 Request don't require client auth (bad password)
- 0 -r -T_-n_TestUser_-w_nss SSL3 Request don't require client auth (client auth)
- 0 -r_-r -T_-w_nss SSL3 Require client auth (client does not provide auth)
+ -ne -r_-r -n_TestUser_-w_bogus TLS Require client auth (bad password)
+ -eq -r_-r -n_TestUser_-w_nss TLS Require client auth (client auth)
+ -eq -r -T_-w_nss SSL3 Request don't require client auth (client does not provide auth)
+ -eq -r -T_-n_TestUser_-w_bogus SSL3 Request don't require client auth (bad password)
+ -eq -r -T_-n_TestUser_-w_nss SSL3 Request don't require client auth (client auth)
+ -eq -r_-r -T_-w_nss SSL3 Require client auth (client does not provide auth)
# this one should fail
- 254 -r_-r -T_-n_TestUser_-w_bogus SSL3 Require client auth (bad password)
- 0 -r_-r -T_-n_TestUser_-w_nss SSL3 Require client auth (client auth)
+ -ne -r_-r -T_-n_TestUser_-w_bogus SSL3 Require client auth (bad password)
+ -eq -r_-r -T_-n_TestUser_-w_nss SSL3 Require client auth (client auth)