Changes to get PSM to build with Mozilla

This commit is contained in:
ddrinan%netscape.com 2000-11-22 19:59:30 +00:00
parent 51c10d8d69
commit 7805b70b08
4 changed files with 105 additions and 98 deletions

View File

@ -1,27 +1,96 @@
#!nmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# The contents of this file are subject to the Netscape Public License
# Version 1.1 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
# Contributor(s):
DEPTH=..\..
include <$(DEPTH)/config/config.mak>
#
# An NMAKE file to set up and adjust NSPR20's build system for
# Client build. Client build should invoke NMAKE on this file
# instead of invoking gmake directly.
#
DIRS = lib
DEPTH = ..\..
include <$(DEPTH)\config\config.mak>
include <$(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
GMAKE_FLAGS = MOZ_TOOLS_FLIPPED=$(MOZ_TOOLS:\=/) PR_CLIENT_BUILD=1 PR_CLIENT_BUILD_WINDOWS=1 OBJDIR_NAME=$(OBJDIR)
#
# The Client's debug build uses MSVC's debug runtime library (/MDd).
#
!ifdef MOZ_DEBUG
!else
GMAKE_FLAGS = $(GMAKE_FLAGS) BUILD_OPT=1
!endif
!if "$(MOZ_BITS)" == "16"
GMAKE_FLAGS = $(GMAKE_FLAGS) OS_TARGET=WIN16
!else
GMAKE_FLAGS = $(GMAKE_FLAGS) OS_TARGET=WIN95
!ifdef MOZ_DEBUG
!ifdef MOZ_NO_DEBUG_RTL
!IF "$(CPU)" == "ALPHA"
PR_OBJDIR = WIN954.0ALPHA_DBG.OBJ
!else
PR_OBJDIR = WIN954.0_DBG.OBJ
!endif
!else
GMAKE_FLAGS = $(GMAKE_FLAGS) USE_DEBUG_RTL=1
!IF "$(CPU)" == "ALPHA"
PR_OBJDIR = WIN954.0ALPHA_DBG.OBJD
!else
PR_OBJDIR = WIN954.0_DBG.OBJD
!endif
!endif
!else
!IF "$(CPU)" == "ALPHA"
PR_OBJDIR = WIN954.0ALPHA_OPT.OBJ
!else
PR_OBJDIR = WIN954.0_OPT.OBJ
!endif
!endif
!endif
#
# The rules. Simply invoke gmake with the same target.
# The default target is 'all'. For Win16, set up the
# environment to use the Watcom compiler, Watcom headers,
# and Watcom libs.
#
all:: export libs install
export libs install clobber clobber_all clean depend::
!if "$(MOZ_BITS)" == "16"
set PATH=%WATCPATH%
set INCLUDE=%WATC_INC%
set LIB=%WATC_LIB%
!endif
$(GMAKE) $(GMAKE_FLAGS) $@
!if "$(MOZ_BITS)" == "16"
set PATH=%MSVCPATH%
set INCLUDE=%MSVC_INC%
set LIB=%MSVC_LIB%
!endif

View File

@ -29,45 +29,6 @@ include $(CORE_DEPTH)/coreconf/config.mk
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
ifdef MOZILLA_SECURITY_BUILD
# LDAP library
LDAPSDK_SNAPSHOT = 19981116D
LDAPSDK_ROOTDIR = components/ldapsdk31
# Linux 2.2 overrides
ifeq ($(OS_ARCH), Linux)
ifeq ($(OS_RELEASE), 2.2)
LDAPSDK_SNAPSHOT = 19991122E
endif
endif
# Compute LDAPSDK location
# - To use USE_LOCAL_LDAPSDK copy the correct version to your tree
# - This will be mozilla/security for MOZILLA_SECURITY_BUILD=1
ifdef USE_LOCAL_LDAPSDK
LDAPSDK_LOC = $(CORE_DEPTH)/ldapsdk
else
ifeq ($(OS_ARCH), WINNT)
LDAPSDK_LOC = \\\\IRIDIUM/$(LDAPSDK_ROOTDIR)/$(LDAPSDK_SNAPSHOT)
else
LDAPSDK_LOC = /share/builds/$(LDAPSDK_ROOTDIR)/$(LDAPSDK_SNAPSHOT)
endif
endif
# Compute LDAPSDK_PLATFORM
# - on WINNT force the platform to a WINNT directory, since that is what
# - is release by the ldapsdk team. This allows an OS_TARGET of WIN95 while
# - building on WINNT
ifeq ($(OS_ARCH), WINNT)
LDAPSDK_PLATFORM = WINNT$(OS_RELEASE)$(OBJDIR_TAG).OBJ
else
LDAPSDK_PLATFORM = $(PLATFORM)
endif
LDAPSDKDIST = $(LDAPSDK_LOC)/$(LDAPSDK_PLATFORM)
endif
#Which versin of install.js do we really want?
ifeq ($(OS_ARCH), WINNT)
INSTALL_JS = install.js
@ -85,7 +46,7 @@ CPLUSPLUSRUNTIME = -lC -lm
endif
endif
INCLUDES += -I$(LDAPSDKDIST)/include -I$(CORE_DEPTH)/../dist/public/nlslayer
INCLUDES += -I$(CORE_DEPTH)/../dist/public/nlslayer -I$(CORE_DEPTH)/../dist/include
ifeq ($(OS_ARCH), SunOS)
ifeq ($(OS_RELEASE), 5.5.1)
@ -148,21 +109,6 @@ NSPR_DYNAMIC_LIBS = \
NSPR_LIBS = $(NSPR_DYNAMIC_LIBS)
I18N_COMPONENTS = \
$(DIST)/lib/necko.dll \
$(DIST)/lib/strres.dll \
$(DIST)/lib/ucharuti.dll \
$(DIST)/lib/uconv.dll \
$(DIST)/lib/ucvlatin.dll \
$(DIST)/lib/nslocale.dll \
$(NULL)
XPCOM_LIBS = \
$(DIST)/lib/zlib.dll \
$(DIST)/lib/mozreg.dll \
$(DIST)/lib/xpcom.dll \
$(NULL)
EXTRA_LIBS = \
$(DIST)/lib/ssl.lib \
$(DIST)/lib/nss.lib \
@ -178,14 +124,12 @@ EXTRA_LIBS = \
$(DIST)/lib/softoken.lib \
$(DIST)/lib/certdb.lib \
$(DIST)/lib/secutil.lib \
$(DIST)/lib/crypto.lib \
$(DIST)/lib/freebl.lib \
$(DIST)/lib/dbm.lib \
$(DIST)/lib/protocol.lib \
$(DIST)/lib/nlslayer.lib \
$(DIST)/lib/xpcom.lib \
$(NSPR_STUB_LIBS) \
$(LDAPSDKDIST)/lib/nsldaps32v30.lib \
wsock32.lib \
winmm.lib \
advapi32.lib \
@ -204,15 +148,6 @@ NSPR_LIBS = \
$(DIST)/lib/libplds4.$(DLL_SUFFIX) \
$(DIST)/lib/libnspr4.$(DLL_SUFFIX)
I18N_COMPONENTS = \
$(DIST)/lib/libnecko.$(DLL_SUFFIX) \
$(DIST)/lib/libstrres.$(DLL_SUFFIX) \
$(DIST)/lib/libunicharutil.$(DLL_SUFFIX) \
$(DIST)/lib/libuconv.$(DLL_SUFFIX) \
$(DIST)/lib/libucvlatin.$(DLL_SUFFIX) \
$(DIST)/lib/libnslocale.$(DLL_SUFFIX) \
$(NULL)
XPCOM_LIBS = \
$(DIST)/lib/libxpcom.$(DLL_SUFFIX) \
$(NULL)
@ -257,7 +192,6 @@ EXTRA_LIBS += \
$(NSPR_LINK_LIBS) \
$(XPCOM_LINK_LIBS) \
$(CPLUSPLUSRUNTIME) \
$(LDAPSDKDIST)/lib/libldap30.a \
$(NULL)
endif
@ -266,21 +200,17 @@ release_md::
$(NSINSTALL) -m 644 $(NSPR_LIBS) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)
$(NSINSTALL) -m 644 ../ui/$(PLATFORM)/psm*.properties $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)/psmdata/ui
$(NSINSTALL) -m 644 ../doc/*.htm ../doc/*.html ../doc/*.gif $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)/psmdata/doc
$(NSINSTALL) -m 644 $(XPCOM_LIBS) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)
$(NSINSTALL) -m 644 $(I18N_COMPONENTS) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)/components
ifneq ($(OS_ARCH), WINNT)
$(NSINSTALL) -m 775 start-psm $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_BIN_DIR)
endif
install::
$(NSINSTALL) -m 644 ../ui/$(PLATFORM)/psm*.properties $(PLATFORM)/psmdata/ui
$(NSINSTALL) -m 644 ../doc/*.gif ../doc/*.html ../doc/*.htm $(PLATFORM)/psmdata/doc
$(NSINSTALL) -m 644 $(XPCOM_LIBS) $(PLATFORM)
$(NSINSTALL) -m 644 $(I18N_COMPONENTS) $(PLATFORM)/components
$(NSINSTALL) -m 644 $(NSPR_LIBS) $(PLATFORM)
$(NSINSTALL) -m 644 ../ui/$(PLATFORM)/psm*.properties $(DIST)/bin/psmdata/ui
$(NSINSTALL) -m 644 ../doc/*.gif ../doc/*.html ../doc/*.htm $(DIST)/bin/psmdata/doc
$(NSINSTALL) -m 644 $(DIST)/lib/nssckbi.$(DLL_SUFFIX) $(DIST)/bin
ifneq ($(OS_ARCH), WINNT)
$(NSINSTALL) -m 775 start-psm $(PLATFORM)
$(NSINSTALL) -m 775 start-psm $(DIST)/bin
endif
link:

View File

@ -32,7 +32,9 @@
*/
/* LDAP Cert Search */
#if 0
#include <ldap.h>
#endif
#include <stdio.h>
#include <ctype.h>
#include <string.h>
@ -50,6 +52,7 @@ int LDAPCertSearch (const char * rcpt_address, const char * server_name,
const char * auth_password, const char * mail_attribs,
const char * cert_attribs, cert_struct * certs[])
{
#if 0
int rtnval;
LDAP * ld;
@ -248,4 +251,7 @@ int LDAPCertSearch (const char * rcpt_address, const char * server_name,
ldap_msgfree(reslt);
ldap_unbind(ld);
return rtnval;
#else
return 1;
#endif
}

View File

@ -996,6 +996,8 @@ SSM_SetSMIMEExport(void)
#ifdef XP_MAC
#define LOADABLE_CERTS_MODULE "System:NSSckbiDebug.shlb"
#else
#define LOADABLE_CERTS_MODULE "nssckbi.dll"
#endif
SECStatus
@ -1059,7 +1061,7 @@ SSM_InitNSS(char* certpath, SSMControlConnection *ctrl, PRInt32 policy)
/* set default policy strings */
CERT_SetCAPolicyStringCallback(SSM_GetCAPolicyString, ctrl);
#if 0
/*
* Load the PKCS#11 module that has the root CA's in it.
*/
@ -1087,7 +1089,7 @@ SSM_InitNSS(char* certpath, SSMControlConnection *ctrl, PRInt32 policy)
}
SECMOD_AddNewModule(modName, LOADABLE_CERTS_MODULE, 0, 0);
}
#endif
loser:
PR_FREEIF(modName);
if (slotList) {