Commit 6295f48f authored by Chaoting Liu's avatar Chaoting Liu

nss: rebuild to follow Arch

parent f220e46c
......@@ -3,40 +3,44 @@
pkgbase=nss
pkgname=(nss ca-certificates-mozilla)
pkgver=3.32
pkgrel=1
pkgdesc="Mozilla Network Security Services"
arch=('x86_64')
url="http://www.mozilla.org/projects/security/pki/nss/"
license=('MPL' 'GPL')
pkgrel=2
pkgdesc="Network Security Services"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
arch=(i686 x86_64)
license=(MPL GPL)
_nsprver=4.16
depends=("nspr>=${_nsprver}" 'sqlite3' 'zlib' 'sh' 'p11-kit')
makedepends=('perl' 'python2')
options=('!strip' '!makeflags' 'staticlibs')
source=("https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${pkgbase}-${pkgver}.tar.gz"
certdata2pem.py
bundle.sh
nss.pc.in
nss-config.in)
depends=("nspr>=${_nsprver}" sqlite3 zlib sh p11-kit)
makedepends=(perl python2 xmlto docbook-xsl gyp)
options=(!strip !makeflags staticlibs)
source=("https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/nss-${pkgver}.tar.gz"
certdata2pem.py bundle.sh nss.pc.in nss-config.in nss-config.xml enable-libpkix.patch no-plt.diff)
sha256sums=('35c6f381cc96bb25e4f924469f6ba3e57b3a16e0c2fb7e295a284a00d57ed335'
'880b10445a9472826698fd186ca870a6492c1bbd264bbeed95cbedc6ee6041b2'
'045f520403f715a4cc7f3607b4e2c9bcc88fee5bce58d462fddaa2fdb0e4c180'
'b9f1428ca2305bf30b109507ff335fa00bce5a7ce0434b50acd26ad7c47dd5bd'
'e44ac5095b4d88f24ec7b2e6a9f1581560bd3ad41a3d198596d67ef22f67adb9')
'512b12a2f13129be62c008b4df0153f527dd7d71c2c5183de99dfa2a1c49dd8a'
'e412463cfa32bd38a97c1c3664e70c8eb211b676d9192e45f44fbccb0422e87d'
'f2208c4f70373ff9b60f53d733f8071d4e390c384b776dfc04bf26c306882faf'
'e44ac5095b4d88f24ec7b2e6a9f1581560bd3ad41a3d198596d67ef22f67adb9'
'98ace873c63e8e870286bce3ed53249aa2655cc1f53e7049061476e650ab06f1'
'0b68c5ffbfeec090e950e5703e6b0519eafcb7eaf4fe2f64c355d0ddf17eed30'
'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa')
prepare() {
mkdir certs
mkdir certs path
ln -s /usr/bin/python2 path/python
echo -n "$(date +"%e %B %Y")" >date.xml
echo -n "$pkgver" >version.xml
xmlto man nss-config.xml
cd nss-$pkgver
# Respect LDFLAGS
sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/' \
-i nss/coreconf/rules.mk
patch -Np1 -i ../enable-libpkix.patch
patch -Np2 -i ../no-plt.diff
ln -sr nss/lib/ckfw/builtins/certdata.txt ../certs/
ln -sr nss/lib/ckfw/builtins/nssckbi.h ../certs/
}
build() {
cd certs
python2 ../certdata2pem.py
......@@ -45,26 +49,14 @@ build() {
sh bundle.sh
cd nss-$pkgver/nss
export BUILD_OPT=1
export NSS_USE_SYSTEM_SQLITE=1
export NSS_ENABLE_ECC=1
export NSPR_INCLUDE_DIR="`nspr-config --includedir`"
export NSPR_LIB_DIR="`nspr-config --libdir`"
export XCFLAGS="${CFLAGS}"
export USE_64=1
make -C coreconf
make -C lib/dbm
make
PATH="$srcdir/path:$PATH" ./build.sh --opt --system-sqlite --system-nspr --disable-tests
}
package_nss() {
cd nss-$pkgver
install -d "$pkgdir"/usr/{bin,include/nss,lib/pkgconfig}
NSS_VMAJOR=$(grep '#define.*NSS_VMAJOR' nss/lib/nss/nss.h | awk '{print $3}')
NSS_VMINOR=$(grep '#define.*NSS_VMINOR' nss/lib/nss/nss.h | awk '{print $3}')
NSS_VPATCH=$(grep '#define.*NSS_VPATCH' nss/lib/nss/nss.h | awk '{print $3}')
{ read _vmajor; read _vminor; read _vpatch; } \
< <(awk '/#define.*NSS_V(MAJOR|MINOR|PATCH)/ {print $3}' nss/lib/nss/nss.h)
sed ../nss.pc.in \
-e "s,%libdir%,/usr/lib,g" \
......@@ -72,8 +64,8 @@ package_nss() {
-e "s,%exec_prefix%,/usr/bin,g" \
-e "s,%includedir%,/usr/include/nss,g" \
-e "s,%NSPR_VERSION%,${_nsprver},g" \
-e "s,%NSS_VERSION%,${pkgver},g" \
> "$pkgdir/usr/lib/pkgconfig/nss.pc"
-e "s,%NSS_VERSION%,${pkgver},g" |
install -Dm644 /dev/stdin "$pkgdir/usr/lib/pkgconfig/nss.pc"
ln -s nss.pc "$pkgdir/usr/lib/pkgconfig/mozilla-nss.pc"
sed ../nss-config.in \
......@@ -81,33 +73,33 @@ package_nss() {
-e "s,@prefix@,/usr/bin,g" \
-e "s,@exec_prefix@,/usr/bin,g" \
-e "s,@includedir@,/usr/include/nss,g" \
-e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \
-e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
-e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
> "$pkgdir/usr/bin/nss-config"
chmod 755 "$pkgdir/usr/bin/nss-config"
-e "s,@MOD_MAJOR_VERSION@,${_vmajor},g" \
-e "s,@MOD_MINOR_VERSION@,${_vminor},g" \
-e "s,@MOD_PATCH_VERSION@,${_vpatch},g" |
install -D /dev/stdin "$pkgdir/usr/bin/nss-config"
install -Dt "$pkgdir/usr/share/man/man1" -m644 ../nss-config.1
cd dist/*.OBJ/bin
install -t "$pkgdir/usr/bin" *util shlibsign signtool signver ssltap
cd nss/doc/nroff
install -Dt "$pkgdir/usr/share/man/man1" -m644 *util.1 signtool.1 signver.1 ssltap.1
cd ../lib
install -t "$pkgdir/usr/lib" *.so
install -t "$pkgdir/usr/lib" -m644 libcrmf.a *.chk
cd ../../../dist
install -Dt "$pkgdir/usr/include/nss" -m644 public/nss/*.h
cd Release/bin
install -Dt "$pkgdir/usr/bin" *util shlibsign signtool signver ssltap
cd ../../public/nss
install -t "$pkgdir/usr/include/nss" -m644 *.h
cd ../lib
install -Dt "$pkgdir/usr/lib" *.so
install -Dt "$pkgdir/usr/lib" -m644 *.chk
rm "$pkgdir/usr/lib/libnssckbi.so"
ln -s pkcs11/p11-kit-trust.so "$pkgdir/usr/lib/libnssckbi.so"
ln -sf libnssckbi-p11-kit.so "$pkgdir/usr/lib/libnssckbi.so"
}
package_ca-certificates-mozilla() {
pkgdesc="Mozilla's set of trusted CA certificates"
depends=("ca-certificates-utils>=20140923-1")
depends=(ca-certificates-utils)
install=ca-certificates-mozilla.install
local _certdir="$pkgdir/usr/share/ca-certificates/trust-source"
install -Dm644 ca-bundle.trust.crt "$_certdir/mozilla.trust.crt"
install -Dm644 ca-bundle.neutral-trust.crt "$_certdir/mozilla.neutral-trust.crt"
install -Dm644 ca-bundle.supplement.p11-kit "$_certdir/mozilla.supplement.p11-kit"
install -Dm644 ca-bundle.trust.p11-kit \
"$pkgdir/usr/share/ca-certificates/trust-source/mozilla.trust.p11-kit"
}
This diff is collapsed.
......@@ -5,11 +5,8 @@
cat <<EOF
# This is a bundle of X.509 certificates of public Certificate
# Authorities. It was generated from the Mozilla root CA list.
# These certificates are in the OpenSSL "TRUSTED CERTIFICATE"
# format and have trust bits set accordingly.
# An exception are auxiliary certificates, without positive or negative
# trust, but are used to assist in finding a preferred trust path.
# Those neutral certificates use the plain BEGIN CERTIFICATE format.
# These certificates and trust/distrust attributes use the file format accepted
# by the p11-kit-trust module.
#
# Source: nss/lib/ckfw/builtins/certdata.txt
# Source: nss/lib/ckfw/builtins/nssckbi.h
......@@ -18,37 +15,8 @@
EOF
cat certs/nssckbi.h | grep -w NSS_BUILTINS_LIBRARY_VERSION | awk '{print "# " $2 " " $3}'
echo '#'
) > ca-bundle.trust.crt
for f in certs/*.crt; do
echo "processing $f"
tbits=`sed -n '/^# openssl-trust/{s/^.*=//;p;}' $f`
distbits=`sed -n '/^# openssl-distrust/{s/^.*=//;p;}' $f`
alias=`sed -n '/^# alias=/{s/^.*=//;p;q;}' $f | sed "s/'//g" | sed 's/"//g'`
targs=""
if [ -n "$tbits" ]; then
for t in $tbits; do
targs="${targs} -addtrust $t"
done
fi
if [ -n "$distbits" ]; then
for t in $distbits; do
targs="${targs} -addreject $t"
done
fi
if [ -n "$targs" ]; then
echo "trust flags $targs for $f" >> info.trust
openssl x509 -text -in "$f" -trustout $targs -setalias "$alias" >> ca-bundle.trust.crt
else
echo "no trust flags for $f" >> info.notrust
# p11-kit-trust defines empty trust lists as "rejected for all purposes".
# That's why we use the simple file format
# (BEGIN CERTIFICATE, no trust information)
# because p11-kit-trust will treat it as a certificate with neutral trust.
# This means we cannot use the -setalias feature for neutral trust certs.
openssl x509 -text -in "$f" >> ca-bundle.neutral-trust.crt
fi
done
) > ca-bundle.trust.p11-kit
for p in certs/*.p11-kit; do
cat "$p" >> ca-bundle.supplement.p11-kit
for p in certs/*.tmp-p11-kit; do
cat "$p" >> ca-bundle.trust.p11-kit
done
This diff is collapsed.
diff -u -r nss-3.31/nss/build.sh nss-3.31-libpkix/nss/build.sh
--- nss-3.31/nss/build.sh 2017-06-08 12:53:01.000000000 +0200
+++ nss-3.31-libpkix/nss/build.sh 2017-06-09 19:11:21.746133040 +0200
@@ -52,7 +52,7 @@
no_local_nspr=0
armhf=0
-gyp_params=(--depth="$cwd" --generator-output=".")
+gyp_params=(--depth="$cwd" --generator-output="." -Ddisable_libpkix=0)
nspr_params=()
ninja_params=()
This diff is collapsed.
diff --git i/security/nss/lib/freebl/mpi/mpi_x86.s w/security/nss/lib/freebl/mpi/mpi_x86.s
index 8f7e2130c3264754..b3ca1ce5b41b3771 100644
--- i/security/nss/lib/freebl/mpi/mpi_x86.s
+++ w/security/nss/lib/freebl/mpi/mpi_x86.s
@@ -22,22 +22,41 @@ is_sse: .long -1
#
.ifndef NO_PIC
.macro GET var,reg
- movl \var@GOTOFF(%ebx),\reg
+ call thunk.ax
+ addl $_GLOBAL_OFFSET_TABLE_, %eax
+ movl \var@GOTOFF(%eax),\reg
.endm
.macro PUT reg,var
- movl \reg,\var@GOTOFF(%ebx)
+ call thunk.dx
+ addl $_GLOBAL_OFFSET_TABLE_, %edx
+ movl \reg,\var@GOTOFF(%edx)
.endm
.else
.macro GET var,reg
movl \var,\reg
.endm
.macro PUT reg,var
movl \reg,\var
.endm
.endif
.text
+.ifndef NO_PIC
+.globl thunk.ax
+.hidden thunk.ax
+.type thunk.ax, @function
+thunk.ax:
+ movl (%esp),%eax
+ ret
+
+.globl thunk.dx
+.hidden thunk.dx
+.type thunk.dx, @function
+thunk.dx:
+ movl (%esp),%edx
+ ret
+.endif
# ebp - 36: caller's esi
# ebp - 32: caller's edi
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY date SYSTEM "date.xml">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="nss-config">
<refentryinfo>
<date>&date;</date>
<title>Network Security Services</title>
<productname>nss</productname>
<productnumber>&version;</productnumber>
</refentryinfo>
<refmeta>
<refentrytitle>nss-config</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>nss-config</refname>
<refpurpose>Return meta information about nss libraries</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>nss-config</command>
<arg><option>--prefix</option></arg>
<arg><option>--exec-prefix</option></arg>
<arg><option>--includedir</option></arg>
<arg><option>--libs</option></arg>
<arg><option>--cflags</option></arg>
<arg><option>--libdir</option></arg>
<arg><option>--version</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection id="description">
<title>Description</title>
<para><command>nss-config</command> is a shell scrip
tool which can be used to obtain gcc options for building client pacakges of nspt. </para>
</refsection>
<refsection>
<title>Options</title>
<variablelist>
<varlistentry>
<term><option>--prefix</option></term>
<listitem><simpara>Returns the top level system directory under which the nss libraries are installed.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--exec-prefix</option></term>
<listitem><simpara>returns the top level system directory under which any nss binaries would be installed.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--includedir</option> <replaceable>count</replaceable></term>
<listitem><simpara>returns the path to the directory were the nss libraries are installed.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--version</option></term>
<listitem><simpara>returns the upstream version of nss in the form major_version-minor_version-patch_version.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--libs</option></term>
<listitem><simpara>returns the compiler linking flags.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--cflags</option></term>
<listitem><simpara>returns the compiler include flags.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>--libdir</option></term>
<listitem><simpara>returns the path to the directory were the nss libraries are installed.</simpara></listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Examples</title>
<para>The following example will query for both include path and linkage flags:
<programlisting>
/usr/bin/nss-config --cflags --libs
</programlisting>
</para>
</refsection>
<refsection>
<title>Files</title>
<para><filename>/usr/bin/nss-config</filename></para>
</refsection>
<refsection>
<title>See also</title>
<para>pkg-config(1)</para>
</refsection>
<refsection id="authors">
<title>Authors</title>
<para>The nss liraries were written and maintained by developers with Netscape, Red Hat, Sun, Oracle, Mozilla, and Google.</para>
<para>
Authors: Elio Maldonado &lt;emaldona@redhat.com>.
</para>
</refsection>
<!-- don't change -->
<refsection id="license">
<title>LICENSE</title>
<para>Licensed under the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
</para>
</refsection>
</refentry>
......@@ -7,5 +7,5 @@ Name: NSS
Description: Network Security Services
Version: %NSS_VERSION%
Requires: nspr >= %NSPR_VERSION%
Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includedir}
Enable transitional scheme for ssl renegotiation:
(from mozilla/security/nss/lib/ssl/ssl.h)
Disallow unsafe renegotiation in server sockets only, but allow clients
to continue to renegotiate with vulnerable servers.
This value should only be used during the transition period when few
servers have been upgraded.
diff --git a/mozilla/security/nss/lib/ssl/sslsock.c b/mozilla/security/nss/lib/ssl/sslsock.c
index f1d1921..c074360 100644
--- a/mozilla/security/nss/lib/ssl/sslsock.c
+++ b/mozilla/security/nss/lib/ssl/sslsock.c
@@ -181,7 +181,7 @@ static sslOptions ssl_defaults = {
PR_FALSE, /* noLocks */
PR_FALSE, /* enableSessionTickets */
PR_FALSE, /* enableDeflate */
- 2, /* enableRenegotiation (default: requires extension) */
+ 3, /* enableRenegotiation (default: transitional) */
PR_FALSE, /* requireSafeNegotiation */
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment