diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/nss/lib/ckfw/builtins/Makefile | 12 | ||||
-rw-r--r-- | security/nss/lib/ckfw/builtins/config.mk | 2 | ||||
-rw-r--r-- | security/nss/lib/ckfw/builtins/manifest.mn | 1 | ||||
-rw-r--r-- | security/nss/lib/ckfw/builtins/nssckbi.def | 53 | ||||
-rw-r--r-- | security/nss/lib/ckfw/ckapi.perl | 4 | ||||
-rw-r--r-- | security/nss/lib/ckfw/nssck.api | 4 | ||||
-rw-r--r-- | security/nss/lib/util/secasn1d.c | 58 |
7 files changed, 32 insertions, 102 deletions
diff --git a/security/nss/lib/ckfw/builtins/Makefile b/security/nss/lib/ckfw/builtins/Makefile index 7c392f2c9..164e0c369 100644 --- a/security/nss/lib/ckfw/builtins/Makefile +++ b/security/nss/lib/ckfw/builtins/Makefile @@ -44,10 +44,22 @@ EXTRA_LIBS = \ # can't do this in manifest.mn because OS_TARGET isn't defined there. ifeq (,$(filter-out WIN%,$(OS_TARGET))) +# Link with the real NSPR DLLs for MinGW because the NSPR stubs in +# nsprstub.c can't resolve the references to the _imp__PR_XXX symbols. +# This is merely an expedient hack and not the right solution. +ifdef NS_USE_GCC +EXTRA_LIBS += \ + -L$(DIST)/lib \ + -lplc4 \ + -lplds4 \ + -lnspr4 \ + $(NULL) +else EXTRA_LIBS += \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \ $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \ $(NULL) +endif else diff --git a/security/nss/lib/ckfw/builtins/config.mk b/security/nss/lib/ckfw/builtins/config.mk index f9fdb5702..f4d64b0f0 100644 --- a/security/nss/lib/ckfw/builtins/config.mk +++ b/security/nss/lib/ckfw/builtins/config.mk @@ -43,7 +43,7 @@ IMPORT_LIBRARY = PROGRAM = ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET))) - SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) endif ifdef BUILD_IDG diff --git a/security/nss/lib/ckfw/builtins/manifest.mn b/security/nss/lib/ckfw/builtins/manifest.mn index 86a794fbd..23360f081 100644 --- a/security/nss/lib/ckfw/builtins/manifest.mn +++ b/security/nss/lib/ckfw/builtins/manifest.mn @@ -35,7 +35,6 @@ MANIFEST_CVS_ID = "@(#) $RCSfile$ $Revision$ $Date$ $Name$" CORE_DEPTH = ../../../.. MODULE = nss -MAPFILE = $(OBJDIR)/nssckbi.def EXPORTS = \ nssckbi.h \ diff --git a/security/nss/lib/ckfw/builtins/nssckbi.def b/security/nss/lib/ckfw/builtins/nssckbi.def deleted file mode 100644 index c0fd99c04..000000000 --- a/security/nss/lib/ckfw/builtins/nssckbi.def +++ /dev/null @@ -1,53 +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) 2003 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. -;+# -;+# OK, this file is meant to support SUN, LINUX, AIX and WINDOWS -;+# 1. For all unix platforms, the string ";-" means "remove this line" -;+# 2. For all unix platforms, the string " DATA " will be removed from any -;+# line on which it occurs. -;+# 3. Lines containing ";+" will have ";+" removed on SUN and LINUX. -;+# On AIX, lines containing ";+" will be removed. -;+# 4. For all unix platforms, the string ";;" will thave the ";;" removed. -;+# 5. For all unix platforms, after the above processing has taken place, -;+# all characters after the first ";" on the line will be removed. -;+# And for AIX, the first ";" will also be removed. -;+# This file is passed directly to windows. Since ';' is a comment, all UNIX -;+# directives are hidden behind ";", ";+", and ";-" -;+ -;+NSS_3.1 { # NSS 3.1 release -;+ global: -LIBRARY nssckbi ;- -EXPORTS ;- -C_GetFunctionList; -;+ local: -;+*; -;+}; diff --git a/security/nss/lib/ckfw/ckapi.perl b/security/nss/lib/ckfw/ckapi.perl index da757f5a4..09dfc9199 100644 --- a/security/nss/lib/ckfw/ckapi.perl +++ b/security/nss/lib/ckfw/ckapi.perl @@ -489,7 +489,11 @@ __ADJOIN(MODULE_NAME,C_GetFunctionList) } /* This one is always present */ +#ifdef WIN32 +CK_RV _declspec(dllexport) +#else CK_RV CK_ENTRY +#endif C_GetFunctionList ( CK_FUNCTION_LIST_PTR_PTR ppFunctionList diff --git a/security/nss/lib/ckfw/nssck.api b/security/nss/lib/ckfw/nssck.api index 2e8fbd70c..4cbe5e8cc 100644 --- a/security/nss/lib/ckfw/nssck.api +++ b/security/nss/lib/ckfw/nssck.api @@ -1874,7 +1874,11 @@ __ADJOIN(MODULE_NAME,C_GetFunctionList) } /* This one is always present */ +#if defined(WIN32) || defined(XP_OS2_VACPP) +CK_RV _declspec(dllexport) +#else CK_RV CK_ENTRY +#endif C_GetFunctionList ( CK_FUNCTION_LIST_PTR_PTR ppFunctionList diff --git a/security/nss/lib/util/secasn1d.c b/security/nss/lib/util/secasn1d.c index 4f3a8be1b..890ddddba 100644 --- a/security/nss/lib/util/secasn1d.c +++ b/security/nss/lib/util/secasn1d.c @@ -600,32 +600,6 @@ sec_asn1d_init_state_based_on_template (sec_asn1d_state *state) return state; } -static PRBool -sec_asn1d_parent_is_indefinite(sec_asn1d_state *state) -{ - for (state = state->parent; state; state = state->parent) { - sec_asn1d_parse_place place = state->place; - if (place != afterImplicit && - place != afterPointer && - place != afterInline && - place != afterSaveEncoding && - place != duringSaveEncoding && - place != duringChoice) { - - /* we've walked up the stack to a state that represents - ** the enclosing construct. Is it one of the types that - ** permits an unexpected EOC? - */ - int eoc_permitted = - (place == duringGroup || - place == duringConstructedString || - state->child->optional); - return (state->indefinite && eoc_permitted) ? PR_TRUE : PR_FALSE; - - } - } - return PR_FALSE; -} static unsigned long sec_asn1d_parse_identifier (sec_asn1d_state *state, @@ -654,7 +628,15 @@ sec_asn1d_parse_identifier (sec_asn1d_state *state, */ state->pending = 1; } else { - if (byte == 0 && sec_asn1d_parent_is_indefinite(state)) { + if (byte == 0 && state->parent != NULL && + (state->parent->indefinite || + ( + (state->parent->place == afterImplicit || + state->parent->place == afterPointer) + && state->parent->parent != NULL && state->parent->parent->indefinite + ) + ) + ) { /* * Our parent has indefinite-length encoding, and the * entire tag found is 0, so it seems that we have hit the @@ -2205,26 +2187,6 @@ sec_asn1d_during_choice unsigned char child_found_tag_modifiers = 0; unsigned long child_found_tag_number = 0; - state->consumed += child->consumed; - - if (child->endofcontents) { - /* This choice is probably the first item in a GROUP - ** (e.g. SET_OF) that was indefinite-length encoded. - ** We're actually at the end of that GROUP. - ** We should look up the stack to be sure that we find - ** a state with indefinite length encoding before we - ** find a state (like a SEQUENCE) that is definite. - */ - child->place = notInUse; - state->place = afterChoice; - state->endofcontents = PR_TRUE; /* propagate this up */ - if (sec_asn1d_parent_is_indefinite(state)) - return state; - PORT_SetError(SEC_ERROR_BAD_DER); - state->top->status = decodeError; - return NULL; - } - child->theTemplate++; if( 0 == child->theTemplate->kind ) { @@ -2234,6 +2196,8 @@ sec_asn1d_during_choice return (sec_asn1d_state *)NULL; } + state->consumed += child->consumed; + /* cargo'd from next_in_sequence innards */ if( state->pending ) { PORT_Assert(!state->indefinite); |