diff options
author | fredb <fredb@pkgsrc.org> | 2002-08-04 15:47:43 +0000 |
---|---|---|
committer | fredb <fredb@pkgsrc.org> | 2002-08-04 15:47:43 +0000 |
commit | d78c8fae4b7bde9d1a807fe757bd05207e15934d (patch) | |
tree | ee6a0575eb2345de5de1b37a57459a79ab918ccf /security/openssl/patches | |
parent | 7b0570927c13ca5050fae8216f8f4ed37a1f8ba0 (diff) | |
download | pkgsrc-d78c8fae4b7bde9d1a807fe757bd05207e15934d.tar.gz |
Update openssl to 0.9.6e. This update fixes multiple vulnerabilities,
and also changes the ABI of "libcrypto" and "libssl". (So the shared
library majors and buildlink requirements are bumped, too.) The code
base is now synced perfectly with NetBSD HEAD and netbsd-1-6 branches
as of 2002-08-04, the optimization levels are reduced to "-O2", but
I've retained some of the processor optimization flags and different code
path #defines in the "Configure" script, just to keep things interesting.
The default "certs" directory on NetBSD is now "/etc/openssl/certs", to
give continuity to those who find themselves using the package system's
"openssl" after upgrading a package that formerly used the base system's.
[Suggested by itojun.] The best way to avoid such problems, however, is
to upgrade your base system *first*.
I'm making use of the new and improved build system as much as possible.
This gives us a cleaner way to make shared libraries and real man pages,
but loses many of the symlinks to the openssl binary.
I've culled items from the "CHANGES" file that appear to have security
implications or are particularly interesting for NetBSD users, below.
My comments are marked off with '===>'.
===> This is from the netbsd-20020804-patch
*) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
and get fix the header length calculation.
[Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>,
Alon Kantor <alonk@checkpoint.com> (and others),
Steve Henson]
Changes between 0.9.6d and 0.9.6e [30 Jul 2002]
*) New option
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
for disabling the SSL 3.0/TLS 1.0 CBC vulnerability countermeasure
that was added in OpenSSL 0.9.6d.
As the countermeasure turned out to be incompatible with some
broken SSL implementations, the new option is part of SSL_OP_ALL.
SSL_OP_ALL is usually employed when compatibility with weird SSL
implementations is desired (e.g. '-bugs' option to 's_client' and
's_server'), so the new option is automatically set in many
applications.
[Bodo Moeller]
*) Changes in security patch:
Changes marked "(CHATS)" were sponsored by the Defense Advanced
Research Projects Agency (DARPA) and Air Force Research Laboratory,
Air Force Materiel Command, USAF, under agreement number
F30602-01-2-0537.
*) Add various sanity checks to asn1_get_length() to reject
the ASN1 length bytes if they exceed sizeof(long), will appear
negative or the content length exceeds the length of the
supplied buffer.
[Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
*) Assertions for various potential buffer overflows, not known to
happen in practice.
[Ben Laurie (CHATS)]
*) Various temporary buffers to hold ASCII versions of integers were
too small for 64 bit platforms. (CAN-2002-0655)
[Matthew Byng-Maddick <mbm@aldigital.co.uk> and Ben Laurie (CHATS)>
*) Remote buffer overflow in SSL3 protocol - an attacker could
supply an oversized session ID to a client. (CAN-2002-0656)
[Ben Laurie (CHATS)]
*) Remote buffer overflow in SSL2 protocol - an attacker could
supply an oversized client master key. (CAN-2002-0656)
[Ben Laurie (CHATS)]
Changes between 0.9.6c and 0.9.6d [9 May 2002]
*) Implement a countermeasure against a vulnerability recently found
in CBC ciphersuites in SSL 3.0/TLS 1.0: Send an empty fragment
before application data chunks to avoid the use of known IVs
with data potentially chosen by the attacker.
[Bodo Moeller]
Changes between 0.9.6a and 0.9.6b [9 Jul 2001]
*) Change ssleay_rand_bytes (crypto/rand/md_rand.c)
to avoid a SSLeay/OpenSSL PRNG weakness pointed out by
Markku-Juhani O. Saarinen <markku-juhani.saarinen@nokia.com>:
PRNG state recovery was possible based on the output of
one PRNG request appropriately sized to gain knowledge on
'md' followed by enough consecutive 1-byte PRNG requests
to traverse all of 'state'.
1. When updating 'md_local' (the current thread's copy of 'md')
during PRNG output generation, hash all of the previous
'md_local' value, not just the half used for PRNG output.
2. Make the number of bytes from 'state' included into the hash
independent from the number of PRNG bytes requested.
The first measure alone would be sufficient to avoid
Markku-Juhani's attack. (Actually it had never occurred
to me that the half of 'md_local' used for chaining was the
half from which PRNG output bytes were taken -- I had always
assumed that the secret half would be used.) The second
measure makes sure that additional data from 'state' is never
mixed into 'md_local' in small portions; this heuristically
further strengthens the PRNG.
[Bodo Moeller]
*) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5
RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5
when fixing the server behaviour for backwards-compatible 'client
hello' messages. (Note that the attack is impractical against
SSL 3.0 and TLS 1.0 anyway because length and version checking
means that the probability of guessing a valid ciphertext is
around 2^-40; see section 5 in Bleichenbacher's CRYPTO '98
paper.)
Before 0.9.5, the countermeasure (hide the error by generating a
random 'decryption result') did not work properly because
ERR_clear_error() was missing, meaning that SSL_get_error() would
detect the supposedly ignored error.
Both problems are now fixed.
[Bodo Moeller]
Changes between 0.9.6 and 0.9.6a [5 Apr 2001]
===> This is our ABI change.
*) Rename 'des_encrypt' to 'des_encrypt1'. This avoids the clashes
with des_encrypt() defined on some operating systems, like Solaris
and UnixWare.
[Richard Levitte]
*) Don't use getenv in library functions when run as setuid/setgid.
New function OPENSSL_issetugid().
[Ulf Moeller]
*) Store verify_result within SSL_SESSION also for client side to
avoid potential security hole. (Re-used sessions on the client side
always resulted in verify_result==X509_V_OK, not using the original
result of the server certificate verification.)
[Lutz Jaenicke]
===> package doesn't doesn't do this. We'll bump major versions
===> as necessary.
*) Make sure that shared libraries get the internal name engine with
the full version number and not just 0. This should mark the
shared libraries as not backward compatible. Of course, this should
be changed again when we can guarantee backward binary compatibility.
[Richard Levitte]
*) Rework the system to generate shared libraries:
- Make note of the expected extension for the shared libraries and
if there is a need for symbolic links from for example libcrypto.so.0
to libcrypto.so.0.9.7. There is extended info in Configure for
that.
- Make as few rebuilds of the shared libraries as possible.
- Still avoid linking the OpenSSL programs with the shared libraries.
- When installing, install the shared libraries separately from the
static ones.
Diffstat (limited to 'security/openssl/patches')
-rw-r--r-- | security/openssl/patches/patch-aa | 65 | ||||
-rw-r--r-- | security/openssl/patches/patch-ab | 89 | ||||
-rw-r--r-- | security/openssl/patches/patch-ac | 39 | ||||
-rw-r--r-- | security/openssl/patches/patch-ad | 21 | ||||
-rw-r--r-- | security/openssl/patches/patch-ae | 15 | ||||
-rw-r--r-- | security/openssl/patches/patch-af | 36 | ||||
-rw-r--r-- | security/openssl/patches/patch-ag | 25 | ||||
-rw-r--r-- | security/openssl/patches/patch-ai | 13 | ||||
-rw-r--r-- | security/openssl/patches/patch-aj | 18 |
9 files changed, 151 insertions, 170 deletions
diff --git a/security/openssl/patches/patch-aa b/security/openssl/patches/patch-aa index 844617fe4eb..7a44be0f9c8 100644 --- a/security/openssl/patches/patch-aa +++ b/security/openssl/patches/patch-aa @@ -1,63 +1,24 @@ -$NetBSD: patch-aa,v 1.8 2002/07/28 05:36:30 schmonz Exp $ +$NetBSD: patch-aa,v 1.9 2002/08/04 15:47:46 fredb Exp $ ---- config.orig Thu Sep 21 05:23:14 2000 +--- config.orig Sun Jun 16 05:32:14 2002 +++ config -@@ -83,6 +83,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ - echo "${MACHINE}-ibm-aix"; exit 0 - ;; - -+ Darwin:*) -+ echo "`uname -p`-apple-darwin${RELEASE}"; exit 0 -+ ;; -+ - dgux:*) - echo "${MACHINE}-dg-dgux"; exit 0 - ;; -@@ -167,10 +171,14 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${ - echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0 - ;; - -- NetBSD:*:*:*386*) -- echo "`/usr/sbin/sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0 -+ NetBSD:*:*:i386) -+ if echo __ELF__ | cc -E - | grep -q __ELF__; then -+ echo "i386-whatever-netbsd"; exit 0 -+ else -+ echo "i386elf-whatever-netbsd"; exit 0 -+ fi - ;; -- -+ - NetBSD:*) - echo "${MACHINE}-whatever-netbsd"; exit 0 - ;; -@@ -330,6 +338,7 @@ else +@@ -388,7 +388,7 @@ + # does give us what we want though, so we use that. We just just the + # major and minor version numbers. + # peak single digit before and after first dot, e.g. 2.95.1 gives 29 +- GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` ++ GCCVER=`echo $GCCVER | sed 's/[^.]*\([0-9]\)\.\([0-9]\).*/\1\2/'` + else CC=cc fi - -+if false; then - if [ "$SYSTEM" = "SunOS" ]; then - # check for WorkShop C, expected output is "cc: blah-blah C x.x" - CCVER=`(cc -V 2>&1) 2>/dev/null | \ -@@ -347,6 +356,7 @@ if [ "$SYSTEM" = "SunOS" ]; then - CC=sc3 - fi - fi -+fi - - if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then - # check for Compaq C, expected output is "blah-blah C Vx.x" -@@ -454,9 +464,10 @@ case "$GUESSOS" in - alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;; +@@ -577,8 +577,8 @@ *-freebsd[3-9]*) OUT="FreeBSD-elf" ;; *-freebsd[1-2]*) OUT="FreeBSD" ;; -- *86*-*-netbsd) OUT="NetBSD-x86" ;; + *86*-*-netbsd) OUT="NetBSD-x86" ;; - sun3*-*-netbsd) OUT="NetBSD-m68" ;; - *-*-netbsd) OUT="NetBSD-sparc" ;; -+ *86elf*-*-netbsd) OUT="NetBSD-i386elf" ;; -+ *86-*-netbsd) OUT="NetBSD-i386" ;; -+ *-netbsd) OUT="NetBSD-`sysctl -n hw.machine_arch`" ;; -+ *-*-darwin*) OUT="Darwin" ;; ++ sun3*-*-netbsd) OUT="NetBSD-m68k" ;; ++ *-*-netbsd) OUT="NetBSD-`sysctl -n hw.machine_arch`" ;; *86*-*-openbsd) OUT="OpenBSD-x86" ;; alpha*-*-openbsd) OUT="OpenBSD-alpha" ;; pmax*-*-openbsd) OUT="OpenBSD-mips" ;; diff --git a/security/openssl/patches/patch-ab b/security/openssl/patches/patch-ab index 1d5b8797271..832c6b4da1c 100644 --- a/security/openssl/patches/patch-ab +++ b/security/openssl/patches/patch-ab @@ -1,82 +1,13 @@ -$NetBSD: patch-ab,v 1.7 2001/07/11 01:26:10 wiz Exp $ +$NetBSD: patch-ab,v 1.8 2002/08/04 15:47:46 fredb Exp $ ---- crypto/rand/md_rand.c.orig Mon Sep 11 14:42:39 2000 -+++ crypto/rand/md_rand.c -@@ -308,6 +308,7 @@ - { - static volatile int stirred_pool = 0; - int i,j,k,st_num,st_idx; -+ int num_ceil; - int ok; - long md_c[2]; - unsigned char local_md[MD_DIGEST_LENGTH]; -@@ -328,6 +329,12 @@ - } - #endif +--- crypto/opensslv.h.orig Tue Jul 30 05:34:28 2002 ++++ crypto/opensslv.h +@@ -79,7 +79,7 @@ + * should only keep the versions that are binary compatible with the current. + */ + #define SHLIB_VERSION_HISTORY "" +-#define SHLIB_VERSION_NUMBER "0.9.6" ++#define SHLIB_VERSION_NUMBER "300.0" -+ if (num <= 0) -+ return 1; -+ -+ /* round upwards to multiple of MD_DIGEST_LENGTH/2 */ -+ num_ceil = (1 + (num-1)/(MD_DIGEST_LENGTH/2)) * (MD_DIGEST_LENGTH/2); -+ - /* - * (Based on the rand(3) manpage:) - * -@@ -409,11 +416,11 @@ - md_c[1] = md_count[1]; - memcpy(local_md, md, sizeof md); - -- state_index+=num; -+ state_index+=num_ceil; - if (state_index > state_num) - state_index %= state_num; - -- /* state[st_idx], ..., state[(st_idx + num - 1) % st_num] -+ /* state[st_idx], ..., state[(st_idx + num_ceil - 1) % st_num] - * are now ours (but other threads may use them too) */ - - md_count[0] += 1; -@@ -424,6 +431,7 @@ - - while (num > 0) - { -+ /* num_ceil -= MD_DIGEST_LENGTH/2 */ - j=(num >= MD_DIGEST_LENGTH/2)?MD_DIGEST_LENGTH/2:num; - num-=j; - MD_Init(&m); -@@ -434,27 +442,28 @@ - curr_pid = 0; - } - #endif -- MD_Update(&m,&(local_md[MD_DIGEST_LENGTH/2]),MD_DIGEST_LENGTH/2); -+ MD_Update(&m,local_md,MD_DIGEST_LENGTH); - MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); - #ifndef PURIFY - MD_Update(&m,buf,j); /* purify complains */ - #endif -- k=(st_idx+j)-st_num; -+ k=(st_idx+MD_DIGEST_LENGTH/2)-st_num; - if (k > 0) - { -- MD_Update(&m,&(state[st_idx]),j-k); -+ MD_Update(&m,&(state[st_idx]),MD_DIGEST_LENGTH/2-k); - MD_Update(&m,&(state[0]),k); - } - else -- MD_Update(&m,&(state[st_idx]),j); -+ MD_Update(&m,&(state[st_idx]),MD_DIGEST_LENGTH/2); - MD_Final(local_md,&m); - -- for (i=0; i<j; i++) -+ for (i=0; i<MD_DIGEST_LENGTH/2; i++) - { - state[st_idx++]^=local_md[i]; /* may compete with other threads */ -- *(buf++)=local_md[i+MD_DIGEST_LENGTH/2]; - if (st_idx >= st_num) - st_idx=0; -+ if (i < j) -+ *(buf++)=local_md[i+MD_DIGEST_LENGTH/2]; - } - } + #endif /* HEADER_OPENSSLV_H */ diff --git a/security/openssl/patches/patch-ac b/security/openssl/patches/patch-ac index 2721ed5687b..6e0d2b3833e 100644 --- a/security/openssl/patches/patch-ac +++ b/security/openssl/patches/patch-ac @@ -1,12 +1,35 @@ -$NetBSD: patch-ac,v 1.4 2002/07/28 05:36:30 schmonz Exp $ +$NetBSD: patch-ac,v 1.5 2002/08/04 15:47:46 fredb Exp $ ---- Configure.orig Thu Jul 25 20:08:05 2002 +--- Configure.orig Thu Aug 1 14:11:00 2002 +++ Configure -@@ -404,6 +404,7 @@ my %table=( +@@ -347,9 +347,6 @@ + "linux-s390", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::", + "linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +-"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +-"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +-"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", + "bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown)::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}", +@@ -500,6 +482,20 @@ - ##### MacOS X (a.k.a. Rhapsody) setup - "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", -+"Darwin","cc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DUSE_TOD::(unknown):::::::::::::darwin-shared:-fno-common:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", + ##### VxWorks for various targets + "vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DVXWORKS -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::-r:::::", ++ ++##### NetBSD ++"NetBSD-alpha", "gcc:-DTERMIOS -O2 -Wall::(unknown):-Wl,-R\$(INSTALLTOP)/lib:SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-arm32", "gcc:-DTERMIOS -O2 -Wall -DL_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-m68000", "gcc:-DTERMIOS -O2 -Wall -DB_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-m68k", "gcc:-DTERMIOS -O2 -m68020-40 -Wall -DB_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-mipseb", "gcc:-DTERMIOS -O2 -Wall -DB_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-mipsel", "gcc:-DTERMIOS -O2 -Wall -DL_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-ns32k", "gcc:-DTERMIOS -O2 -Wall -DL_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-powerpc", "gcc:-DTERMIOS -O2 -Wall -DB_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-sparc", "gcc:-DTERMIOS -O2 -mv8 -Wall -DB_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-sparc64", "gcc:-DTERMIOS -O2 -Wall::(unknown):-Wl,-R\$(INSTALLTOP)/lib:SIXTY_FOUR_BIT_LONG DES_INT DES_RISC1::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-vax", "gcc:-DTERMIOS -O2 -Wall -DL_ENDIAN::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"NetBSD-x86", "gcc:-DTERMIOS -O2 -Wall::(unknown):-Wl,-R\$(INSTALLTOP)/lib:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + + ); - ##### Sony NEWS-OS 4.x - "newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::", diff --git a/security/openssl/patches/patch-ad b/security/openssl/patches/patch-ad new file mode 100644 index 00000000000..c1d46b8488c --- /dev/null +++ b/security/openssl/patches/patch-ad @@ -0,0 +1,21 @@ +$NetBSD: patch-ad,v 1.6 2002/08/04 15:47:46 fredb Exp $ + +--- apps/Makefile.ssl.orig Tue Jul 30 04:29:57 2002 ++++ apps/Makefile.ssl +@@ -99,11 +100,11 @@ + @for i in $(SCRIPTS); \ + do \ + (echo installing $$i; \ +- cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \ +- chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ +- done +- @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR); \ +- chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf ++ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/share/examples/openssl/$$i; \ ++ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/share/examples/openssl/$$i ); \ ++ done; ++ @cp openssl.cnf $(INSTALL_PREFIX)$(INSTALLTOP)/share/examples/openssl/; \ ++ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/share/examples/openssl/openssl.cnf + + tags: + ctags $(SRC) diff --git a/security/openssl/patches/patch-ae b/security/openssl/patches/patch-ae new file mode 100644 index 00000000000..99febec539e --- /dev/null +++ b/security/openssl/patches/patch-ae @@ -0,0 +1,15 @@ +$NetBSD: patch-ae,v 1.5 2002/08/04 15:47:46 fredb Exp $ + +--- tools/Makefile.ssl.orig Thu Apr 29 16:52:08 1999 ++++ tools/Makefile.ssl +@@ -31,8 +31,8 @@ + done; + @for i in $(MISC_APPS) ; \ + do \ +- (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \ +- chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ ++ (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ ++ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ + done; + + files: diff --git a/security/openssl/patches/patch-af b/security/openssl/patches/patch-af new file mode 100644 index 00000000000..e23a3936201 --- /dev/null +++ b/security/openssl/patches/patch-af @@ -0,0 +1,36 @@ +$NetBSD: patch-af,v 1.4 2002/08/04 15:47:47 fredb Exp $ + +--- Makefile.org.orig Fri Jul 19 11:33:26 2002 ++++ Makefile.org +@@ -169,7 +169,7 @@ + MAKEFILE= Makefile.ssl + MAKE= make -f Makefile.ssl + +-MANDIR=$(OPENSSLDIR)/man ++MANDIR=$(INSTALLTOP)/man + MAN1=1 + MAN3=3 + SHELL=/bin/sh +@@ -261,7 +261,7 @@ + libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \ + ( set -x; ${CC} ${SHARED_LDFLAGS} \ + -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ +- -Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ ++ -Wl,-soname=lib$$i.so.${SHLIB_MAJOR} \ + -Wl,-Bsymbolic \ + -Wl,--whole-archive lib$$i.a \ + -Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \ +@@ -631,10 +631,10 @@ + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ + $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ + $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ +- $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ ++ $(INSTALL_PREFIX)$(INSTALLTOP)/share/examples/openssl \ ++ $(INSTALL_PREFIX)$(OPENSSLDIR) \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ +- $(INSTALL_PREFIX)$(OPENSSLDIR)/private \ +- $(INSTALL_PREFIX)$(OPENSSLDIR)/lib ++ $(INSTALL_PREFIX)$(OPENSSLDIR)/private + @for i in $(EXHEADER) ;\ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ diff --git a/security/openssl/patches/patch-ag b/security/openssl/patches/patch-ag new file mode 100644 index 00000000000..cef3e9c6646 --- /dev/null +++ b/security/openssl/patches/patch-ag @@ -0,0 +1,25 @@ +$NetBSD: patch-ag,v 1.4 2002/08/04 15:47:47 fredb Exp $ + +--- e_os.h.orig Fri Aug 2 15:08:30 2002 ++++ e_os.h +@@ -431,6 +431,20 @@ + (((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum]) + #endif + ++#if defined(__NetBSD_Version__) ++#define NetBSD_1_4_3 104000300 ++#define NetBSD_1_4A 104010000 ++#define NetBSD_1_4K 104110000 ++#if (__NetBSD_Version__ < NetBSD_1_4_3) || \ ++ (__NetBSD_Version__ >= NetBSD_1_4A) && (__NetBSD_Version__ <= NetBSD_1_4K) ++#include <string.h> ++# define strlcat(s2,s1,n) \ ++ (strncat(s2,s1,n); n ? memset(s2[n-1],0,1) : 0; strlen(s1) + strlen(s2)) ++# define strlcpy(s2,s1,n) \ ++ (strncpy(s2,s1,n); n ? memset(s2[n-1],0,1) : 0; strlen(s1)) ++#endif ++#endif /* __NetBSD_Version__ */ ++ + /***********************************************/ + + /* do we need to do this for getenv. diff --git a/security/openssl/patches/patch-ai b/security/openssl/patches/patch-ai deleted file mode 100644 index e5749d1e7fe..00000000000 --- a/security/openssl/patches/patch-ai +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ai,v 1.2 1999/11/25 18:51:47 erh Exp $ - ---- apps/ca.c.orig Fri Aug 6 16:47:09 1999 -+++ apps/ca.c Wed Oct 20 17:49:43 1999 -@@ -98,7 +98,7 @@ - #define PROG ca_main - - #define BASE_SECTION "ca" --#define CONFIG_FILE "openssl.cnf" -+#define CONFIG_FILE "etc/openssl.cnf" - - #define ENV_DEFAULT_CA "default_ca" - diff --git a/security/openssl/patches/patch-aj b/security/openssl/patches/patch-aj deleted file mode 100644 index 19faff6cc56..00000000000 --- a/security/openssl/patches/patch-aj +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-aj,v 1.5 2001/05/11 22:14:11 tron Exp $ - ---- e_os.h.orig Thu Sep 21 11:23:14 2000 -+++ e_os.h Sat May 12 00:03:27 2001 -@@ -1,4 +1,3 @@ --/* e_os.h */ - /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * -@@ -297,7 +296,7 @@ - typedef unsigned long clock_t; - # endif - --# define OPENSSL_CONF "openssl.cnf" -+# define OPENSSL_CONF "etc/openssl.cnf" - # define SSLEAY_CONF OPENSSL_CONF - # define RFILE ".rnd" - # define LIST_SEPARATOR_CHAR ':' |