OBS User unknown 2008-03-26 15:24:30 +00:00 committed by Git OBS Bridge
parent f0db09dfc6
commit 5cc9e28ae4
12 changed files with 276 additions and 137 deletions

3
README.SuSE Normal file
View File

@ -0,0 +1,3 @@
This is an (almost) empty package which requires the nss3 shared library
subpackage.

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Mar 25 22:21:18 CET 2008 - maw@suse.de
- Merge changes from the build service (thanks, Wolfgang)
- Update to a new snapshot of nss based on 3.12.0 Beta 2:
+ Update build requirements accordingly
+ Add nss-sqlitename.patch and nss-no-rpath.patch
- Split out a shared library subpackage.
-------------------------------------------------------------------
Mon Dec 10 16:22:37 CET 2007 - rguenther@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package mozilla-nss (Version 3.11.7)
# spec file for package mozilla-nss (Version 3.12.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -10,11 +10,15 @@
# norootforbuild
Name: mozilla-nss
BuildRequires: gcc-c++ mozilla-nspr-devel
%if %suse_version > 1020
BuildRequires: sqlite-devel
%endif
License: GPL v2 or later; LGPL v2.1 or later; MOZILLA PUBLIC LICENSE (MPL/NPL)
Version: 3.11.7
Release: 25
Version: 3.12.0
Release: 2
Summary: Network (Netscape) Security Services
Url: http://www.mozilla.org/projects/security/pki/nss/
Group: System/Libraries
@ -22,17 +26,16 @@ Source: nss-%{version}.tar.bz2
Source1: nss.pc.in
Source2: addon-certs.txt
Source3: nss-config.in
Source4: README.SuSE
Patch1: nss-opt.patch
Patch2: uninit.patch
Patch2: nss-sqlitename.patch
Patch3: system-nspr.patch
Patch4: char.patch
Patch5: nss-amd64-comba.patch
Patch5: nss-no-rpath.patch
Requires: libnss3 = %{version}
PreReq: mozilla-nspr >= %( echo `rpm -q --queryformat '%{VERSION}' mozilla-nspr`)
PreReq: /bin/mkdir
PreReq: /bin/mkdir
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: mozilla-nss-tools = %{version}-%{release}
Obsoletes: mozilla-nss-tools
%define nssdbdir %{_sysconfdir}/ssl/nssdb
%description
Network Security Services (NSS) is a set of libraries designed to
@ -43,6 +46,24 @@ certificates, and other security standards.
Authors:
--------
Mozilla Foundation <drivers@mozilla.org>
%package -n libnss3
Summary: Network (Netscape) Security Services
Group: System/Libraries
Requires: %{name} >= %{version}
%description -n libnss3
Network Security Services (NSS) is a set of libraries designed to
support cross-platform development of security-enabled server
applications. Applications built with NSS can support SSL v2 and v3,
TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3
certificates, and other security standards.
Authors:
--------
Mozilla Foundation <drivers@mozilla.org>
@ -62,20 +83,34 @@ certificates, and other security standards.
Authors:
--------
Mozilla Foundation <drivers@mozilla.org>
%package tools
Summary: Tools for developing, debugging, and managing applications that use NSS.
Group: System/Management
PreReq: mozilla-nss >= %{version}-%{release}
%description tools
The NSS Security Tools allow developers to test, debug, and manage
applications that use NSS.
Authors:
--------
Mozilla Foundation <drivers@mozilla.org>
%prep
# NSS is currently
# NSS_3_11_BRANCH
%setup -n nss-%{version} -q
cp %{S:4} .
cd mozilla
%patch1
%patch2
%patch3
%patch4
%patch5 -p1
%patch5
# additional CA certificates
#cd security/nss/lib/ckfw/builtins
#cat %{SOURCE2} >> certdata.txt
@ -83,19 +118,22 @@ cd mozilla
%build
cd mozilla/security/nss
export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing"
export NSPR_INCLUDE_DIR=`nspr-config --includedir`
export NSPR_LIB_DIR=`nspr-config --libdir`
export BUILD_OPT=1
export NSS_ENABLE_ECC=1
export OPT_FLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing"
#export NSS_ENABLE_ECC=1
export LIBDIR=%{_libdir}
%ifarch x86_64 s390x ppc64 ia64
export USE_64=1
%endif
%if %suse_version > 1020
export NSS_USE_SYSTEM_SQLITE=1
%endif
make nss_build_all
%install
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/nss
mkdir -p $RPM_BUILD_ROOT%{_includedir}/nss3
mkdir -p $RPM_BUILD_ROOT%{_bindir}
pushd mozilla/dist/Linux*
@ -103,6 +141,8 @@ pushd mozilla/dist/Linux*
cp -rL ../public/nss/*.h $RPM_BUILD_ROOT%{_includedir}/nss3
# copy dynamic libs
cp -L lib/libnss3.so \
lib/libnssdbm3.so \
lib/libnssutil3.so \
lib/libnssckbi.so \
lib/libsmime3.so \
lib/libsoftokn3.so \
@ -111,6 +151,10 @@ cp -L lib/libnss3.so \
lib/libfreebl3.so \
lib/libfreebl3.chk \
$RPM_BUILD_ROOT%{_libdir}
%if %suse_version < 1030
cp -L lib/libnsssqlite3.so \
$RPM_BUILD_ROOT%{_libdir}
%endif
# copy static libs
cp -L lib/libcrmf.a \
lib/libnssb.a \
@ -118,11 +162,28 @@ cp -L lib/libcrmf.a \
$RPM_BUILD_ROOT%{_libdir}
# copy tools
cp -L bin/certutil \
bin/cmsutil \
bin/crlutil \
bin/modutil \
bin/pk12util \
bin/signtool \
bin/signver \
bin/ssltap \
$RPM_BUILD_ROOT%{_bindir}
# copy unsupported tools
cp -L bin/atob \
bin/btoa \
bin/derdump \
bin/ocspclnt \
bin/pp \
bin/selfserv \
bin/shlibsign \
bin/strsclnt \
bin/symkeyutil \
bin/tstclnt \
bin/vfyserv \
bin/vfychain \
$RPM_BUILD_ROOT%{_libdir}/nss
# prepare pkgconfig file
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
sed "s:%%LIBDIR%%:%{_libdir}:g
@ -142,29 +203,31 @@ cat %{SOURCE3} | sed -e "s,@libdir@,%{_libdir},g" \
-e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \
> $RPM_BUILD_ROOT/%{_bindir}/nss-config
chmod 755 $RPM_BUILD_ROOT/%{_bindir}/nss-config
%define nssdbdir %{_sysconfdir}/ssl/nssdb
%post
/sbin/ldconfig
%post -n libnss3 -p /sbin/ldconfig
%postun -n libnss3 -p /sbin/ldconfig
%post tools
if [ ! -d "%{nssdbdir}" ] ; then
mkdir -p "%{nssdbdir}"
mkdir -p "%{nssdbdir}"
fi
if [ ! -f "%{nssdbdir}/secmod.db" ] ; then
modutil -force -dbdir "%{nssdbdir}" -create
chmod 644 "%{nssdbdir}"/*
modutil -force -dbdir "%{nssdbdir}" -create
chmod 644 "%{nssdbdir}"/*
fi
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc README.SuSE
%files -n libnss3
%defattr(-, root, root)
%{_libdir}/*.so
%{_libdir}/*.chk
%{_bindir}/*
%exclude %{_bindir}/nss-config
%files devel
%defattr(644, root, root, 755)
@ -173,100 +236,111 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%attr(755,root,root) %{_bindir}/nss-config
%files tools
%defattr(-, root, root)
%{_bindir}/*
%{_libdir}/nss/
%exclude %{_bindir}/nss-config
%changelog
* Mon Dec 10 2007 - rguenther@suse.de
* Tue Mar 25 2008 maw@suse.de
- Merge changes from the build service (thanks, Wolfgang)
- Update to a new snapshot of nss based on 3.12.0 Beta 2:
+ Update build requirements accordingly
+ Add nss-sqlitename.patch and nss-no-rpath.patch
- Split out a shared library subpackage.
* Mon Dec 10 2007 rguenther@suse.de
- disable use of freebl/mpi/mp_comba.c. [#346256]
* Sun Sep 16 2007 - coolo@suse.de
* Sun Sep 16 2007 coolo@suse.de
- fixing errors in %%post during installation
* Thu Sep 13 2007 - jberkman@novell.com
* Thu Sep 13 2007 jberkman@novell.com
- merge -tools package into main package
- create system-wide nssdb for system configuration of smart cards,
as used by pam_pkcs11, krb5 pkinit, and others
* Thu Jul 26 2007 - maw@suse.de
* Thu Jul 26 2007 maw@suse.de
- Update to version 3.11.7 (from the build service)
- Bug fixes.
* Mon Jun 11 2007 - ro@suse.de
* Mon Jun 11 2007 ro@suse.de
- use string[0] instead of string in char.patch
* Mon Jun 11 2007 - ro@suse.de
* Mon Jun 11 2007 ro@suse.de
- update to NSS 3.11.6 (pull in from wr from opensuse BS)
* Wed Feb 21 2007 - maw@suse.de
* Thu Feb 22 2007 maw@suse.de
- Update to NSS 3.11.5 (thanks, Wolfgang)
* Sun Oct 01 2006 - wr@rosenauer.org
* Mon Oct 02 2006 wr@rosenauer.org
- update to NSS 3.11.3
- requires NSPR 4.6.3 (pkgconfig)
* Wed Sep 06 2006 - stark@suse.de
* Wed Sep 06 2006 stark@suse.de
- update to NSS_3_11_20060905_TAG to be in sync with
Gecko 1.8.1
* Mon Aug 07 2006 - stark@suse.de
* Mon Aug 07 2006 stark@suse.de
- enabled usage of ECC
* Sat Aug 05 2006 - stark@suse.de
* Sat Aug 05 2006 stark@suse.de
- update to NSS_3_11_20060731_TAG to be in sync with
Gecko 1.8.1
* Fri Jul 28 2006 - stark@suse.de
* Fri Jul 28 2006 stark@suse.de
- fixed usage of uninitialized pointers (uninit.patch)
- requires NSPR 4.6.2
* Sat Jul 01 2006 - stark@suse.de
* Sun Jul 02 2006 stark@suse.de
- update to 3.11.2 RTM version
* ECC not enabled but defines needed symbols
* Thu Jun 08 2006 - stark@suse.de
* Thu Jun 08 2006 stark@suse.de
- update to 3.11.2 beta
* enabled ECC (needed since MOZILLA_1_8_BRANCH)
* Mon May 15 2006 - stark@suse.de
* Mon May 15 2006 stark@suse.de
- update to 3.11.1 RTM version
including:
* TLS server name indication extension support
* implement RFC 3546 (TLS v1.0 extensions)
* fixed bugs found by Coverity
* Mon Jan 30 2006 - stark@suse.de
* Mon Jan 30 2006 stark@suse.de
- removed additional CA certs
- removed zip from BuildRequires
* Wed Jan 25 2006 - mls@suse.de
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 - stark@suse.de
* Wed Jan 11 2006 stark@suse.de
- install nss-config executable
* Fri Dec 16 2005 - stark@suse.de
* Fri Dec 16 2005 stark@suse.de
- marked libfreebl3.so noexec stack
* Fri Dec 16 2005 - stark@suse.de
* Fri Dec 16 2005 stark@suse.de
- update to 3.11 RTM version
- provide nss-config file
- added static libs
- moved include files to /usr/include/nss3
- only ship a subset of the tools
* Sat Nov 26 2005 - stark@suse.de
* Sat Nov 26 2005 stark@suse.de
- update to 3.11rc1
- fixed PC file for 64bit archs
* Tue Nov 15 2005 - stark@suse.de
* Tue Nov 15 2005 stark@suse.de
- update to current 3.10.2 snapshot (20051114)
* Wed Nov 02 2005 - stark@suse.de
* Wed Nov 02 2005 stark@suse.de
- added tools subpackage which provides all NSS related
tools for managing and debugging NSS stuff
* Tue Oct 11 2005 - stark@suse.de
* Tue Oct 11 2005 stark@suse.de
- update to current 3.10.2 snapshot
* Mon Sep 26 2005 - stark@suse.de
* Mon Sep 26 2005 stark@suse.de
- prerequire the correct NSPR version
* Thu Sep 22 2005 - stark@suse.de
* Thu Sep 22 2005 stark@suse.de
- update to NSS_3_10_2_BETA1
* Tue Jul 05 2005 - stark@suse.de
* Tue Jul 05 2005 stark@suse.de
- use RPM_OPT_FLAGS
- fixed requirements for devel package
* Wed Jun 08 2005 - stark@suse.de
* Wed Jun 08 2005 stark@suse.de
- added pkgconfig file
- fixed permission for include directory
- fixed compiler/abuild warning
- included correct header files
* Mon May 09 2005 - stark@suse.de
* Mon May 09 2005 stark@suse.de
- update to 3.10 RTM version
* Wed Apr 27 2005 - stark@suse.de
* Wed Apr 27 2005 stark@suse.de
- don't package static libs
- copy NSPR static libs from new location
* Thu Apr 07 2005 - stark@suse.de
* Thu Apr 07 2005 stark@suse.de
- update to 3.10beta3
* Fri Apr 01 2005 - stark@suse.de
* Fri Apr 01 2005 stark@suse.de
- don't parallelize build
* Thu Mar 31 2005 - stark@suse.de
* Thu Mar 31 2005 stark@suse.de
- fixed build on other archs
- update to 3.10beta2
* Sat Mar 19 2005 - stark@suse.de
* Sat Mar 19 2005 stark@suse.de
- update to 3.10beta1
* Tue Mar 08 2005 - stark@suse.de
* Tue Mar 08 2005 stark@suse.de
- initial standalone package

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:addf726e63138d3bf2e01a4767bb7aeb358c9fd99f31a5e2423e9eb9398b3ce2
size 2902978

3
nss-3.12.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:454b5c2dc14cf5c3cb4408689dbc966a0441d58c3bd5296f4e1c9718d4635781
size 3928895

View File

@ -1,13 +0,0 @@
Index: mozilla/security/nss/lib/freebl/Makefile
===================================================================
--- mozilla.orig/security/nss/lib/freebl/Makefile 2007-06-19 19:46:15.000000000 +0200
+++ mozilla/security/nss/lib/freebl/Makefile 2007-12-10 16:18:51.000000000 +0100
@@ -130,7 +130,7 @@ ifeq ($(CPU_ARCH),x86_64)
ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
ASFLAGS += -march=opteron -m64 -fPIC
DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
- DEFINES += -DNSS_USE_COMBA
+# DEFINES += -DNSS_USE_COMBA
DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
# DEFINES += -DMPI_AMD64_ADD
MPI_SRCS += mpi_amd64.c mp_comba.c

View File

@ -33,6 +33,7 @@ fi
lib_ssl=yes
lib_smime=yes
lib_nss=yes
lib_nssutil=yes
while test $# -gt 0; do
case "$1" in
@ -83,6 +84,9 @@ while test $# -gt 0; do
nss)
lib_nss=yes
;;
nssutil)
lib_nssutil=yes
;;
*)
usage 1 1>&2
;;
@ -132,6 +136,9 @@ if test "$echo_libs" = "yes"; then
if test -n "$lib_nss"; then
libdirs="$libdirs -lnss${major_version}"
fi
if test -n "$lib_nssutil"; then
libdirs="$libdirs -lnssutil${major_version}"
fi
echo $libdirs
fi

25
nss-no-rpath.patch Normal file
View File

@ -0,0 +1,25 @@
Index: security/nss/cmd/platlibs.mk
===================================================================
RCS file: /cvsroot/mozilla/security/nss/cmd/platlibs.mk,v
retrieving revision 1.55
diff -u -p -6 -r1.55 platlibs.mk
--- security/nss/cmd/platlibs.mk 12 Oct 2007 01:44:40 -0000 1.55
+++ security/nss/cmd/platlibs.mk 22 Jan 2008 09:18:05 -0000
@@ -49,15 +49,15 @@ else
EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib'
endif
endif
ifeq ($(OS_ARCH), Linux)
ifeq ($(USE_64), 1)
-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
else
-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
+#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
endif
endif
ifeq ($(OS_ARCH), HP-UX)
ifeq ($(OS_TEST), ia64)
EXTRA_SHARED_LIBS += -Wl,+b,'$$ORIGIN/../lib'

View File

@ -1,16 +1,26 @@
Index: security/coreconf/Linux.mk
===================================================================
RCS file: /cvsroot/mozilla/security/coreconf/Linux.mk,v
retrieving revision 1.27
diff -u -r1.27 Linux.mk
--- security/coreconf/Linux.mk 16 Sep 2005 17:09:23 -0000 1.27
+++ security/coreconf/Linux.mk 25 Nov 2005 22:08:04 -0000
@@ -148,7 +148,7 @@
retrieving revision 1.31
diff -u -p -6 -r1.31 Linux.mk
--- security/coreconf/Linux.mk 22 Nov 2007 04:39:56 -0000 1.31
+++ security/coreconf/Linux.mk 22 Jan 2008 08:30:06 -0000
@@ -145,17 +145,13 @@ ifeq ($(OS_RELEASE),2.0)
endif
PROCESS_MAP_FILE = grep -v ';-' $< | \
sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
endif
ifdef BUILD_OPT
- OPTIMIZER = -O2
+ OPTIMIZER = $(RPM_OPT_FLAGS) -fno-strict-aliasing
-ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
- OPTIMIZER = -Os
-else
- OPTIMIZER = -O2
-endif
+ OPTIMIZER = $(OPT_FLAGS)
endif
ifeq ($(USE_PTHREADS),1)
OS_PTHREAD = -lpthread
endif

75
nss-sqlitename.patch Normal file
View File

@ -0,0 +1,75 @@
Index: security/nss/cmd/platlibs.mk
===================================================================
RCS file: /cvsroot/mozilla/security/nss/cmd/platlibs.mk,v
retrieving revision 1.55
diff -u -p -6 -r1.55 platlibs.mk
--- security/nss/cmd/platlibs.mk 12 Oct 2007 01:44:40 -0000 1.55
+++ security/nss/cmd/platlibs.mk 23 Jan 2008 08:25:42 -0000
@@ -69,13 +69,17 @@ EXTRA_SHARED_LIBS += \
else
EXTRA_SHARED_LIBS += -Wl,+b,'$$ORIGIN/../lib'
endif
endif
endif
+ifdef NSS_USE_SYSTEM_SQLITE
SQLITE=-lsqlite3
+else
+SQLITE=-lnsssqlite3
+endif
ifdef USE_STATIC_LIBS
# can't do this in manifest.mn because OS_ARCH isn't defined there.
ifeq ($(OS_ARCH), WINNT)
Index: security/nss/lib/sqlite/manifest.mn
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/sqlite/manifest.mn,v
retrieving revision 1.3
diff -u -p -6 -r1.3 manifest.mn
--- security/nss/lib/sqlite/manifest.mn 15 Aug 2007 15:30:05 -0000 1.3
+++ security/nss/lib/sqlite/manifest.mn 23 Jan 2008 08:39:29 -0000
@@ -35,15 +35,16 @@
#
# ***** END LICENSE BLOCK *****
CORE_DEPTH = ../../..
MODULE = nss
-LIBRARY_NAME = sqlite
+LIBRARY_NAME = nsssqlite
LIBRARY_VERSION = 3
MAPFILE = $(OBJDIR)/sqlite.def
+MAPFILE_SOURCE = sqlite.def
DEFINES += -DTHREADSAFE=1
EXPORTS = \
$(NULL)
PRIVATE_EXPORTS = \
Index: security/nss/lib/softoken/config.mk
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/softoken/config.mk,v
retrieving revision 1.23
diff -u -p -r1.23 config.mk
--- security/nss/lib/softoken/config.mk 5 Feb 2008 05:33:37 -0000 1.23
+++ security/nss/lib/softoken/config.mk 19 Feb 2008 11:50:02 -0000
@@ -86,12 +86,16 @@ else
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-lnssutil3 \
- -lsqlite3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
+ifdef NSS_USE_SYSTEM_SQLITE
+EXTRA_SHARED_LIBS += -lsqlite3
+else
+EXTRA_SHARED_LIBS += -lnsssqlite3
+endif
endif
ifeq ($(OS_TARGET),AIX)

View File

@ -6,6 +6,6 @@ includedir=${prefix}/include/nss3
Name: NSS
Description: Network Security Services
Version: %VERSION%
Requires: nspr >= 4.6.6
Libs: -Wl,-rpath-link,${libdir} -L${libdir} -lssl3 -lsmime3 -lnss3
Requires: nspr >= 4.7.1
Libs: -Wl,-rpath-link,${libdir} -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}

View File

@ -1,51 +0,0 @@
Index: security/nss/cmd/fipstest/fipstest.c
===================================================================
RCS file: /cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v
retrieving revision 1.3.2.21
diff -u -p -r1.3.2.21 fipstest.c
--- security/nss/cmd/fipstest/fipstest.c 25 Mar 2006 23:47:58 -0000 1.3.2.21
+++ security/nss/cmd/fipstest/fipstest.c 28 Jul 2006 05:09:07 -0000
@@ -2916,8 +2916,8 @@ void sha_test(char *reqfn)
unsigned char seed[HASH_LENGTH_MAX]; /* max size of seed 64 bytes */
unsigned char MD[HASH_LENGTH_MAX]; /* message digest */
- FILE *req; /* input stream from the REQUEST file */
- FILE *resp; /* output stream to the RESPONSE file */
+ FILE *req = NULL; /* input stream from the REQUEST file */
+ FILE *resp; /* output stream to the RESPONSE file */
buf = PORT_ZAlloc(bufSize);
if (buf == NULL) {
@@ -3013,7 +3013,9 @@ void sha_test(char *reqfn)
}
}
loser:
- fclose(req);
+ if (req) {
+ fclose(req);
+ }
if (buf) {
PORT_ZFree(buf, bufSize);
}
@@ -3088,8 +3090,8 @@ void hmac_test(char *reqfn)
unsigned char HMAC[HASH_LENGTH_MAX]; /* computed HMAC */
HASH_HashType hash_alg; /* HMAC type */
- FILE *req; /* input stream from the REQUEST file */
- FILE *resp; /* output stream to the RESPONSE file */
+ FILE *req = NULL; /* input stream from the REQUEST file */
+ FILE *resp; /* output stream to the RESPONSE file */
buf = PORT_ZAlloc(bufSize);
if (buf == NULL) {
@@ -3201,7 +3203,9 @@ void hmac_test(char *reqfn)
}
}
loser:
- fclose(req);
+ if (req) {
+ fclose(req);
+ }
if (buf) {
PORT_ZFree(buf, bufSize);
}