head 1.40; access; symbols OPENPKG_E1_MP_HEAD:1.23 OPENPKG_E1_MP:1.23 OPENPKG_E1_MP_2_STABLE:1.23 OPENPKG_E1_FP:1.23 OPENPKG_2_STABLE_MP:1.26 OPENPKG_2_STABLE_20061018:1.23 OPENPKG_2_STABLE_20060622:1.23 OPENPKG_2_STABLE:1.23.0.2 OPENPKG_2_STABLE_BP:1.23 OPENPKG_2_5_RELEASE:1.22 OPENPKG_2_5_SOLID:1.22.0.2 OPENPKG_2_5_SOLID_BP:1.22 OPENPKG_2_4_RELEASE:1.20 OPENPKG_2_4_SOLID:1.20.0.2 OPENPKG_2_4_SOLID_BP:1.20 OPENPKG_CW_FP:1.19 OPENPKG_2_3_RELEASE:1.17 OPENPKG_2_3_SOLID:1.17.0.2 OPENPKG_2_3_SOLID_BP:1.17 OPENPKG_2_2_RELEASE:1.16 OPENPKG_2_2_SOLID:1.16.0.4 OPENPKG_2_2_SOLID_BP:1.16 OPENPKG_2_1_RELEASE:1.16 OPENPKG_2_1_SOLID:1.16.0.2 OPENPKG_2_1_SOLID_BP:1.16 OPENPKG_2_0_RELEASE:1.13 OPENPKG_2_0_SOLID:1.13.0.2 OPENPKG_2_0_SOLID_BP:1.13 OPENPKG_1_3_RELEASE:1.7.2.3 OPENPKG_1_3_SOLID:1.7.2.3.0.2 OPENPKG_1_3_SOLID_BP:1.7.2.3 OPENPKG_1_2_SOLID:1.7.0.4 OPENPKG_1_2_SOLID_BP:1.7 OPENPKG_1_STABLE:1.7.0.2 OPENPKG_1_STABLE_BP:1.7 OPENPKG_1_1_RELEASE:1.6 OPENPKG_1_1_SOLID:1.6.0.2 OPENPKG_1_1_SOLID_BP:1.6; locks; strict; comment @# @; 1.40 date 2009.12.24.21.17.03; author rse; state Exp; branches; next 1.39; commitid oY7ZdrTo71JLHFgu; 1.39 date 2009.03.26.17.56.40; author rse; state Exp; branches; next 1.38; commitid TKw7uX4AB3s6nzHt; 1.38 date 2008.09.15.20.14.14; author rse; state Exp; branches; next 1.37; commitid KmGpGLa2sMDViUit; 1.37 date 2008.05.28.17.22.37; author rse; state Exp; branches; next 1.36; commitid 8wuEZxheKuVgTK4t; 1.36 date 2007.11.04.10.15.39; author rse; state Exp; branches; next 1.35; commitid ojR6D8ZoH2Jk9fEs; 1.35 date 2007.11.04.10.11.02; author rse; state Exp; branches; next 1.34; commitid 1GRviA0v8gpK7fEs; 1.34 date 2007.10.19.15.26.53; author cs; state Exp; branches; next 1.33; commitid zvwSnMEzT4QZndCs; 1.33 date 2007.10.18.15.28.50; author rse; state Exp; branches; next 1.32; commitid 2jCiERZ2pdCEq5Cs; 1.32 date 2007.10.17.08.01.04; author rse; state Exp; branches; next 1.31; commitid 53AcRatLfXs2ZUBs; 1.31 date 2007.10.17.06.58.06; author rse; state Exp; branches; next 1.30; commitid AGPZDz7f6k4rDUBs; 1.30 date 2007.10.11.20.40.35; author rse; state Exp; branches; next 1.29; commitid EeYJOJjDSYvyndBs; 1.29 date 2007.09.28.16.18.22; author cs; state Exp; branches; next 1.28; commitid aX2ExD6ZLcnulwzs; 1.28 date 2007.06.03.09.44.19; author rse; state Exp; branches; next 1.27; commitid agBUDe5KH8suVrks; 1.27 date 2007.05.23.09.41.03; author rse; state Exp; branches; next 1.26; commitid H2VlGSpc7tgig2js; 1.26 date 2007.03.05.12.38.17; author rse; state Exp; branches; next 1.25; commitid 8c6Hs4CW7WjxMT8s; 1.25 date 2007.03.02.18.18.28; author rse; state Exp; branches; next 1.24; commitid jr1W2u67QygdLx8s; 1.24 date 2007.02.28.17.04.16; author rse; state Exp; branches; next 1.23; commitid f8sG5Zlfqz5Kph8s; 1.23 date 2006.05.05.07.16.36; author rse; state Exp; branches 1.23.2.1; next 1.22; commitid 9INeaQWOdZO0MNvr; 1.22 date 2005.10.11.12.11.41; author rse; state Exp; branches 1.22.2.1; next 1.21; 1.21 date 2005.07.06.12.59.08; author rse; state Exp; branches; next 1.20; 1.20 date 2005.05.06.20.32.47; author rse; state Exp; branches 1.20.2.1; next 1.19; 1.19 date 2005.03.22.20.29.16; author rse; state Exp; branches; next 1.18; 1.18 date 2005.03.13.19.09.28; author rse; state Exp; branches; next 1.17; 1.17 date 2004.11.15.13.27.21; author rse; state Exp; branches 1.17.2.1; next 1.16; 1.16 date 2004.06.07.10.57.42; author tho; state Exp; branches; next 1.15; 1.15 date 2004.04.22.10.21.44; author rse; state Exp; branches; next 1.14; 1.14 date 2004.03.18.08.23.41; author thl; state Exp; branches; next 1.13; 1.13 date 2003.10.01.20.12.19; author rse; state Exp; branches 1.13.2.1; next 1.12; 1.12 date 2003.09.30.12.44.31; author thl; state Exp; branches; next 1.11; 1.11 date 2003.08.06.08.52.45; author rse; state Exp; branches; next 1.10; 1.10 date 2003.04.11.07.33.52; author rse; state dead; branches; next 1.9; 1.9 date 2003.03.20.19.54.08; author rse; state Exp; branches; next 1.8; 1.8 date 2003.03.17.14.30.21; author rse; state Exp; branches; next 1.7; 1.7 date 2002.12.31.09.56.24; author rse; state dead; branches 1.7.2.1 1.7.4.1; next 1.6; 1.6 date 2002.08.09.13.32.25; author rse; state Exp; branches 1.6.2.1; next 1.5; 1.5 date 2002.08.09.08.34.50; author rse; state Exp; branches; next 1.4; 1.4 date 2002.07.30.13.02.31; author rse; state Exp; branches; next 1.3; 1.3 date 2002.06.30.08.21.56; author rse; state Exp; branches; next 1.2; 1.2 date 2002.06.29.07.59.53; author rse; state Exp; branches; next 1.1; 1.1 date 2002.06.22.22.18.30; author rse; state Exp; branches; next ; 1.23.2.1 date 2007.03.03.20.17.43; author thl; state Exp; branches; next 1.23.2.2; commitid 0TSjLDzz8yr5oG8s; 1.23.2.2 date 2007.03.18.23.32.12; author thl; state Exp; branches; next ; commitid j886gsownDQWXCas; 1.22.2.1 date 2006.09.06.07.20.48; author cs; state Exp; branches; next 1.22.2.2; commitid duR3BzJSNT4lOJLr; 1.22.2.2 date 2006.09.28.12.47.56; author rse; state Exp; branches; next 1.22.2.3; commitid 3SkyNYkIWUYIUAOr; 1.22.2.3 date 2006.09.29.09.21.27; author rse; state Exp; branches; next ; commitid GB8ATlGu4sQSJHOr; 1.20.2.1 date 2005.10.11.14.23.47; author rse; state Exp; branches; next ; 1.17.2.1 date 2005.03.13.19.10.14; author rse; state Exp; branches; next 1.17.2.2; 1.17.2.2 date 2005.10.11.14.27.04; author rse; state Exp; branches; next ; 1.13.2.1 date 2004.03.18.09.21.34; author thl; state Exp; branches; next ; 1.7.2.1 date 2003.03.17.14.36.01; author rse; state Exp; branches; next 1.7.2.2; 1.7.2.2 date 2003.03.20.19.54.55; author rse; state Exp; branches; next 1.7.2.3; 1.7.2.3 date 2003.07.24.20.42.03; author rse; state dead; branches 1.7.2.3.2.1; next ; 1.7.2.3.2.1 date 2003.09.25.12.41.58; author rse; state Exp; branches; next 1.7.2.3.2.2; 1.7.2.3.2.2 date 2003.09.30.12.45.42; author thl; state Exp; branches; next 1.7.2.3.2.3; 1.7.2.3.2.3 date 2004.03.18.09.58.29; author thl; state Exp; branches; next ; 1.7.4.1 date 2003.02.19.15.15.18; author rse; state Exp; branches; next 1.7.4.2; 1.7.4.2 date 2003.03.17.14.54.13; author rse; state Exp; branches; next 1.7.4.3; 1.7.4.3 date 2003.03.20.20.09.39; author rse; state Exp; branches; next 1.7.4.4; 1.7.4.4 date 2003.09.30.12.46.23; author thl; state Exp; branches; next ; 1.6.2.1 date 2003.02.19.15.21.00; author thl; state Exp; branches; next 1.6.2.2; 1.6.2.2 date 2003.03.17.15.06.23; author rse; state Exp; branches; next 1.6.2.3; 1.6.2.3 date 2003.03.20.20.14.54; author rse; state Exp; branches; next ; desc @@ 1.40 log @apply OpenPKG bootstrap patches to the regular package, too @ text @Index: Configure --- Configure.orig 2009-02-16 09:44:22 +0100 +++ Configure 2009-12-18 20:55:32 +0100 @@@@ -36,6 +36,7 @@@@ # (Default: KRB5_DIR/include) # --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently # supported values are "MIT" and "Heimdal". A value is required. +# --with-cc compiler to use for $CC (useful if cc is a disguised gcc) # # --test-sanity Make a number of sanity checks on the data in this file. # This is a debugging tool for OpenSSL developers. @@@@ -122,6 +123,7 @@@@ #$bits2="THIRTY_TWO_BIT "; my $bits1="THIRTY_TWO_BIT "; my $bits2="SIXTY_FOUR_BIT "; +my $ccarg; my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o MAYBE-MO86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o rc4_skey.o:rm86-elf.o:r586-elf.o"; my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o MAYBE-MO86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o rc4_skey.o:rm86-cof.o:r586-cof.o"; @@@@ -414,8 +416,8 @@@@ #### IBM's AIX. "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", -"aix-gcc", "gcc:-O -DB_ENDIAN::-pthread:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", -"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", +"aix-gcc", "gcc:-O -DB_ENDIAN::-pthread:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", +"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE # at build time. $OBJECT_MODE is respected at ./config stage! "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", @@@@ -747,6 +749,10 @@@@ { exit(&test_sanity()); } + elsif (/^--with-cc=(.*)$/) + { + $ccarg=$1 + } elsif (/^reconfigure/ || /^reconf/) { if (open(IN,"<$Makefile")) @@@@ -952,7 +958,7 @@@@ &usage if (!defined($table{$target})); my @@fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); -my $cc = $fields[$idx_cc]; +my $cc = $ccarg ? $ccarg : $fields[$idx_cc]; # Allow environment CC to override compiler... if($ENV{CC}) { $cc = $ENV{CC}; Index: config --- config.orig 2009-02-16 09:43:41 +0100 +++ config 2009-12-18 20:57:38 +0100 @@@@ -269,6 +269,9 @@@@ Power*) echo "ppc-apple-darwin${VERSION}" ;; + x86_64 ) + echo "x86_64-apple-darwin${VERSION}" + ;; *) echo "i386-apple-darwin${VERSION}" ;; @@@@ -399,7 +402,7 @@@@ # this is where the translation occurs into SSLeay terms # --------------------------------------------------------------------------- -GCCVER=`(gcc -dumpversion) 2>/dev/null` +GCCVER=`(${CC-gcc} -dumpversion 2>/dev/null && exit; gcc -dumpversion 2>/dev/null && exit; cc --version 2>/dev/null | grep GCC >/dev/null && cc -dumpversion )` if [ "$GCCVER" != "" ]; then # then strip off whatever prefix egcs prepends the number with... # Hopefully, this will work for any future prefixes as well. @@@@ -417,8 +420,14 @@@@ # we fallback to whatever cc does on the system if [ "$GCCVER" != "" ]; then CC=gcc + SUFFIX=gcc else CC=cc + SUFFIX=cc + fi +else + if [ "$GCCVER" != "" ]; then + SUFFIX=gcc fi fi GCCVER=${GCCVER:-0} @@@@ -428,7 +437,7 @@@@ if [ $GCCVER -ge 30 ]; then # PA64 support only came in with gcc 3.0.x. # We check if the preprocessor symbol __LP64__ is defined... - if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then + if echo "__LP64__" | $CC -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then : # __LP64__ has slipped through, it therefore is not defined else GCC_BITS="64" @@@@ -439,13 +448,14 @@@@ if [ $GCCVER -ge 30 ]; then # 64-bit ABI isn't officially supported in gcc 3.0, but it appears # to be working, at the very least 'make test' passes... - if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then + if $CC -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then GCC_ARCH="-m64" else GCC_ARCH="-m32" fi fi # check for WorkShop C, expected output is "cc: blah-blah C x.x" + if [ $GCCVER -eq 0 ]; then CCVER=`(cc -V 2>&1) 2>/dev/null | \ egrep -e '^cc: .* C [0-9]\.[0-9]' | \ sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` @@@@ -458,6 +468,7 @@@@ sleep 5 fi fi + fi fi if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then @@@@ -475,6 +486,7 @@@@ if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc + (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc fi CCVER=${CCVER:-0} @@@@ -494,7 +506,7 @@@@ if [ $CPU -ge 4000 ]; then options="$options -mips2" fi - OUT="irix-$CC" + OUT="irix-$SUFFIX" ;; mips3-sgi-irix) #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` @@@@ -504,11 +516,11 @@@@ #else # options="$options -mips3" #fi - OUT="irix-mips3-$CC" + OUT="irix-mips3-$SUFFIX" ;; mips4-sgi-irix64) echo "WARNING! If you wish to build 64-bit library, then you have to" - echo " invoke './Configure irix64-mips4-$CC' *manually*." + echo " invoke './Configure irix64-mips4-$SUFFIX' *manually*." if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 @@@@ -520,18 +532,19 @@@@ #else # options="$options -mips3" #fi - OUT="irix-mips3-$CC" + OUT="irix-mips3-$SUFFIX" ;; ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; ppc-apple-darwin*) OUT="darwin-ppc-cc" ;; i386-apple-darwin*) OUT="darwin-i386-cc" ;; + x86_64-apple-darwin*) OUT="darwin64-x86_64-cc" ;; alpha-*-linux2) ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` case ${ISA:-generic} in - *[678]) OUT="linux-alpha+bwx-$CC" ;; - *) OUT="linux-alpha-$CC" ;; + *[678]) OUT="linux-alpha+bwx-$SUFFIX" ;; + *) OUT="linux-alpha-$SUFFIX" ;; esac - if [ "$CC" = "gcc" ]; then + if [ $GCCVER -gt 0 ]; then case ${ISA:-generic} in EV5|EV45) options="$options -mcpu=ev5";; EV56|PCA56) options="$options -mcpu=ev56";; @@@@ -598,7 +611,7 @@@@ s390x-*-linux2) OUT="linux-generic64"; options="$options -DB_ENDIAN" ;; x86_64-*-linux?) OUT="linux-x86_64" ;; *86-*-linux2) OUT="linux-elf" - if [ "$GCCVER" -gt 28 ]; then + if [ $GCCVER -gt 28 ]; then if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then options="$options -march=pentium" fi @@@@ -612,17 +625,17 @@@@ *-*-linux1) OUT="linux-aout" ;; *-*-linux2) OUT="linux-generic32" ;; sun4[uv]*-*-solaris2) - OUT="solaris-sparcv9-$CC" + OUT="solaris-sparcv9-$SUFFIX" ISA64=`(isalist) 2>/dev/null | grep sparcv9` if [ "$ISA64" != "" ]; then - if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then + if [ $GCCVER -eq 0 -a $CCVER -ge 50 ]; then echo "WARNING! If you wish to build 64-bit library, then you have to" echo " invoke './Configure solaris64-sparcv9-cc' *manually*." if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 fi - elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then + elif [ $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then # $GCC_ARCH denotes default ABI chosen by compiler driver # (first one found on the $PATH). I assume that user # expects certain consistency with the rest of his builds @@@@ -645,21 +658,21 @@@@ fi fi ;; - sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; - sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; - sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; + sun4m-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; + sun4d-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; + sun4*-*-solaris2) OUT="solaris-sparcv7-$SUFFIX" ;; *86*-*-solaris2) ISA64=`(isalist) 2>/dev/null | grep amd64` - if [ "$ISA64" != "" ]; then - OUT="solaris64-x86_64-$CC" + if [ "$ISA64" != "" -a $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then + OUT="solaris64-x86_64-$SUFFIX" else - OUT="solaris-x86-$CC" + OUT="solaris-x86-$SUFFIX" if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then options="$options no-sse2" fi fi ;; - *-*-sunos4) OUT="sunos-$CC" ;; + *-*-sunos4) OUT="sunos-$SUFFIX" ;; *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;; alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;; @@@@ -683,7 +696,7 @@@@ *-*-osf) OUT="osf1-alpha-cc" ;; *-*-tru64) OUT="tru64-alpha-cc" ;; *-*-[Uu]nix[Ww]are7) - if [ "$CC" = "gcc" ]; then + if [ $GCCVER -gt 0 ]; then OUT="unixware-7-gcc" ; options="$options no-sse2" else OUT="unixware-7" ; options="$options no-sse2 -D__i386__" @@@@ -694,12 +707,12 @@@@ *-*-vos) options="$options no-threads no-shared no-asm no-dso" EXE=".pm" - OUT="vos-$CC" ;; + OUT="vos-$SUFFIX" ;; BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; RM*-siemens-sysv4) OUT="ReliantUNIX" ;; *-siemens-sysv4) OUT="SINIX" ;; *-hpux1*) - if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then + if [ $GCCVER -gt 0 -a $GCC_BITS = "64" ]; then OUT="hpux64-parisc2-gcc" fi KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` @@@@ -717,8 +730,8 @@@@ fi OUT="hpux64-ia64-cc" elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU - OUT=${OUT:-"hpux-parisc2-${CC}"} - if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then + OUT=${OUT:-"hpux-parisc2-${SUFFIX}"} + if [ $KERNEL_BITS -eq 64 -a $GCCVER -eq 0 ]; then echo "WARNING! If you wish to build 64-bit library then you have to" echo " invoke './Configure hpux64-parisc2-cc' *manually*." if [ "$TEST" = "false" -a -t 1 ]; then @@@@ -727,19 +740,19 @@@@ fi fi elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU - OUT="hpux-parisc-${CC}" + OUT="hpux-parisc-${SUFFIX}" elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU - OUT="hpux-parisc-${CC}" + OUT="hpux-parisc-${SUFFIX}" else # Motorola(?) CPU - OUT="hpux-$CC" + OUT="hpux-$SUFFIX" fi options="$options -D_REENTRANT" ;; - *-hpux) OUT="hpux-parisc-$CC" ;; + *-hpux) OUT="hpux-parisc-$SUFFIX" ;; *-aix) KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` KERNEL_BITS=${KERNEL_BITS:-32} OBJECT_MODE=${OBJECT_MODE:-32} - if [ "$CC" = "gcc" ]; then + if [ $GCCVER -gt 0 ]; then OUT="aix-gcc" elif [ $OBJECT_MODE -eq 64 ]; then echo 'Your $OBJECT_MODE was found to be set to 64' @@@@ -834,7 +847,7 @@@@ #fi if [ -z "$OUT" ]; then - OUT="$CC" + OUT="$SUFFIX" fi if [ ".$PERL" = . ] ; then @@@@ -866,9 +879,9 @@@@ # compiler for the platform ... in which case we add it on # the end ... otherwise we leave it off -$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null +$PERL ./Configure LIST | grep "$OUT-$SUFFIX" > /dev/null if [ $? = "0" ]; then - OUT="$OUT-$CC" + OUT="$OUT-$SUFFIX" fi OUT="$PREFIX$OUT" @@@@ -878,9 +891,9 @@@@ echo Configuring for $OUT if [ "$TEST" = "true" ]; then - echo $PERL ./Configure $OUT $options + echo $PERL ./Configure $OUT --with-cc=$CC $options else - $PERL ./Configure $OUT $options + $PERL ./Configure $OUT --with-cc=$CC $options fi else echo "This system ($OUT) is not supported. See file INSTALL for details." @ 1.39 log @upgrading package: openssl 0.9.8j -> 0.9.8k @ text @d3 18 a20 2 +++ Configure 2009-03-26 18:50:24 +0100 @@@@ -414,8 +414,8 @@@@ d31 20 d53 69 a121 2 +++ config 2009-03-26 18:50:24 +0100 @@@@ -475,6 +475,7 @@@@ d129 87 a215 2 @@@@ -650,7 +651,7 @@@@ sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; d219 3 a221 2 + if [ "$ISA64" != "" -a "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then OUT="solaris64-x86_64-$CC" d223 105 a327 1 OUT="solaris-x86-$CC" @ 1.38 log @upgrading package: openssl 0.9.8h -> 0.9.8i @ text @d2 3 a4 3 --- Configure.orig 2008-09-12 16:47:00 +0200 +++ Configure 2008-09-15 22:08:42 +0200 @@@@ -407,8 +407,8 @@@@ d16 3 a18 3 --- config.orig 2007-08-01 13:21:35 +0200 +++ config 2008-09-15 22:08:03 +0200 @@@@ -469,6 +469,7 @@@@ d26 1 a26 1 @@@@ -644,7 +645,7 @@@@ @ 1.37 log @upgrading package: openssl 0.9.8g -> 0.9.8h @ text @d2 2 a3 2 --- Configure.orig 2008-05-02 01:11:30 +0200 +++ Configure 2008-05-28 19:20:07 +0200 d8 4 a11 4 -"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", -"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", +"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", +"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", d14 1 a14 1 "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", d17 1 a17 1 +++ config 2008-05-28 19:20:07 +0200 @ 1.36 log @one more upstream bugfix (again) @ text @d2 3 a4 3 --- Configure.orig 2007-09-16 14:24:17 +0200 +++ Configure 2007-10-17 10:00:11 +0200 @@@@ -402,8 +402,8 @@@@ d17 1 a17 1 +++ config 2007-10-17 09:59:48 +0200 a34 152 Index: crypto/rand/rand_lib.c --- crypto/rand/rand_lib.c.orig 2007-09-21 12:10:47 +0200 +++ crypto/rand/rand_lib.c 2007-10-17 09:59:48 +0200 @@@@ -154,6 +154,7 @@@@ int RAND_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); + memset(buf, 0, num); if (meth && meth->bytes) return meth->bytes(buf,num); return(-1); @@@@ -162,6 +163,7 @@@@ int RAND_pseudo_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); + memset(buf, 0, num); if (meth && meth->pseudorand) return meth->pseudorand(buf,num); return(-1); ----------------------------------------------------------------------------- A few patches from upstream OpenSSL CVS: Index: ssl/ssl_asn1.c --- ssl/ssl_asn1.c 12 Aug 2007 18:59:02 -0000 1.20.2.2 +++ ssl/ssl_asn1.c 17 Oct 2007 11:27:25 -0000 1.20.2.3 @@@@ -200,12 +200,13 @@@@ a.tlsext_tick.type=V_ASN1_OCTET_STRING; a.tlsext_tick.data=(unsigned char *)in->tlsext_tick; /* If we have a ticket set session ID to empty because - * it will be bogus. + * it will be bogus. If liftime hint is -1 treat as a special + * case because the session is being used as a container */ - if (in->tlsext_ticklen) + if (in->tlsext_ticklen && (in->tlsext_tick_lifetime_hint != -1)) a.session_id.length=0; } - if (in->tlsext_tick_lifetime_hint != 0) + if (in->tlsext_tick_lifetime_hint > 0) { a.tlsext_tick_lifetime.length=LSIZE2; a.tlsext_tick_lifetime.type=V_ASN1_INTEGER; @@@@ -235,7 +236,7 @@@@ M_ASN1_I2D_len_EXP_opt(&(a.verify_result),i2d_ASN1_INTEGER,5,v5); #ifndef OPENSSL_NO_TLSEXT - if (in->tlsext_tick_lifetime_hint) + if (in->tlsext_tick_lifetime_hint > 0) M_ASN1_I2D_len_EXP_opt(&a.tlsext_tick_lifetime, i2d_ASN1_INTEGER,9,v9); if (in->tlsext_tick) M_ASN1_I2D_len_EXP_opt(&(a.tlsext_tick), i2d_ASN1_OCTET_STRING,10,v10); @@@@ -268,7 +269,7 @@@@ #ifndef OPENSSL_NO_TLSEXT if (in->tlsext_hostname) M_ASN1_I2D_put_EXP_opt(&(a.tlsext_hostname), i2d_ASN1_OCTET_STRING,6,v6); - if (in->tlsext_tick_lifetime_hint) + if (in->tlsext_tick_lifetime_hint > 0) M_ASN1_I2D_put_EXP_opt(&a.tlsext_tick_lifetime, i2d_ASN1_INTEGER,9,v9); if (in->tlsext_tick) M_ASN1_I2D_put_EXP_opt(&(a.tlsext_tick), i2d_ASN1_OCTET_STRING,10,v10); @@@@ -464,8 +465,10 @@@@ ret->tlsext_tick_lifetime_hint=ASN1_INTEGER_get(aip); OPENSSL_free(ai.data); ai.data=NULL; ai.length=0; } + else if (ret->tlsext_ticklen && ret->session_id_length) + ret->tlsext_tick_lifetime_hint = -1; else - ret->tlsext_tick_lifetime_hint=0; + ret->tlsext_tick_lifetime_hint = 0; os.length=0; os.data=NULL; M_ASN1_D2I_get_EXP_opt(osp,d2i_ASN1_OCTET_STRING,10); Index: ssl/s3_clnt.c --- ssl/s3_clnt.c 14 Oct 2007 14:07:46 -0000 1.88.2.11 +++ ssl/s3_clnt.c 3 Nov 2007 13:07:39 -0000 1.88.2.12 @@@@ -273,7 +273,10 @@@@ if (ret == 2) { s->hit = 1; - s->state=SSL3_ST_CR_FINISHED_A; + if (s->tlsext_ticket_expected) + s->state=SSL3_ST_CR_SESSION_TICKET_A; + else + s->state=SSL3_ST_CR_FINISHED_A; s->init_num=0; break; } Index: crypto/bn/bn_mul.c --- crypto/bn/bn_mul.c 8 Jul 2007 18:54:30 -0000 1.36.2.1 +++ crypto/bn/bn_mul.c 3 Nov 2007 20:09:29 -0000 1.36.2.2 @@@@ -389,6 +389,7 @@@@ * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0]) * a[1]*b[1] */ +/* dnX may not be positive, but n2/2+dnX has to be */ void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, int dna, int dnb, BN_ULONG *t) { @@@@ -398,7 +399,7 @@@@ BN_ULONG ln,lo,*p; # ifdef BN_COUNT - fprintf(stderr," bn_mul_recursive %d * %d\n",n2,n2); + fprintf(stderr," bn_mul_recursive %d%+d * %d%+d\n",n2,dna,n2,dnb); # endif # ifdef BN_MUL_COMBA # if 0 @@@@ -545,6 +546,7 @@@@ /* n+tn is the word length * t needs to be n*4 is size, as does r */ +/* tnX may not be negative but less than n */ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, int tna, int tnb, BN_ULONG *t) { @@@@ -553,8 +555,8 @@@@ BN_ULONG ln,lo,*p; # ifdef BN_COUNT - fprintf(stderr," bn_mul_part_recursive (%d+%d) * (%d+%d)\n", - tna, n, tnb, n); + fprintf(stderr," bn_mul_part_recursive (%d%+d) * (%d%+d)\n", + n, tna, n, tnb); # endif if (n < 8) { @@@@ -655,16 +657,19 @@@@ for (;;) { i/=2; - if (i <= tna && tna == tnb) + /* these simplified conditions work + * exclusively because difference + * between tna and tnb is 1 or 0 */ + if (i < tna || i < tnb) { - bn_mul_recursive(&(r[n2]), + bn_mul_part_recursive(&(r[n2]), &(a[n]),&(b[n]), i,tna-i,tnb-i,p); break; } - else if (i < tna || i < tnb) + else if (i == tna || i == tnb) { - bn_mul_part_recursive(&(r[n2]), + bn_mul_recursive(&(r[n2]), &(a[n]),&(b[n]), i,tna-i,tnb-i,p); break; @ 1.35 log @one more upstream bugfix @ text @d124 63 @ 1.34 log @upgrading package: openssl 0.9.8f -> 0.9.8g @ text @d109 15 @ 1.33 log @apply a few upstream patches @ text @a108 39 Index: ssl/ssl_sess.c --- ssl/ssl_sess.c 12 Aug 2007 18:59:03 -0000 1.51.2.7 +++ ssl/ssl_sess.c 17 Oct 2007 17:30:15 -0000 1.51.2.8 @@@@ -320,10 +320,12 @@@@ fatal = 1; goto err; } - else if (r == 0) + else if (r == 0 || (!ret && !len)) goto err; else if (!ret && !(s->session_ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) #else + if (len == 0) + goto err; if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) #endif { Index: ssl/ssl.h --- ssl/ssl.h 12 Oct 2007 00:00:30 -0000 1.161.2.15 +++ ssl/ssl.h 17 Oct 2007 21:22:58 -0000 1.161.2.16 @@@@ -995,7 +995,6 @@@@ int first_packet; int client_version; /* what was passed, used for * SSLv3/TLS rollback check */ - unsigned int max_send_fragment; #ifndef OPENSSL_NO_TLSEXT /* TLS extension debug callback */ void (*tlsext_debug_cb)(SSL *s, int client_server, int type, Index: ssl/t1_lib.c --- ssl/t1_lib.c 12 Oct 2007 00:00:31 -0000 1.13.2.7 +++ ssl/t1_lib.c 18 Oct 2007 11:39:11 -0000 1.13.2.8 @@@@ -847,6 +847,7 @@@@ memcpy(sess->session_id, sess_id, sesslen); sess->session_id_length = sesslen; *psess = sess; + s->tlsext_ticket_expected = 0; return 1; } /* If session decrypt failure indicate a cache miss and set state to @ 1.32 log @fix patching @ text @d54 94 @ 1.31 log @modifying package: openssl-0.9.8f 20071011 -> 20071017 @ text @d2 2 a3 2 --- Configure.orig 2007-10-17 08:55:51 +0200 +++ Configure 2007-10-17 08:56:05 +0200 d7 2 a8 2 "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::RC4_CHAR:::", -"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", d10 1 a10 1 +"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", d14 1 a14 1 "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", d17 1 a17 1 +++ config 2007-10-17 08:55:51 +0200 d37 1 a37 1 +++ crypto/rand/rand_lib.c 2007-10-17 08:55:51 +0200 @ 1.30 log @upgrading package: openssl 0.9.8e -> 0.9.8f @ text @d1 14 d16 2 a17 2 --- config.orig 2005-09-20 14:16:30 +0200 +++ config 2006-04-07 19:17:06 +0200 d26 1 a26 1 @@@@ -640,7 +641,7 @@@@ d36 2 a37 2 --- crypto/rand/rand_lib.c 30 Jan 2003 17:39:23 -0000 1.16 +++ crypto/rand/rand_lib.c 2 Mar 2007 17:54:31 -0000 1.16.2.1 @ 1.29 log @lingering "security" fix @ text @a20 24 Index: doc/crypto/des_modes.pod --- doc/crypto/des_modes.pod.orig 2004-11-25 18:47:30 +0100 +++ doc/crypto/des_modes.pod 2006-04-07 19:15:27 +0200 @@@@ -4,7 +4,7 @@@@ =head1 NAME -Modes of DES - the variants of DES and other crypto algorithms of OpenSSL +des_modes - the variants of DES and other crypto algorithms of OpenSSL =head1 DESCRIPTION Index: crypto/evp/evp_lib.c --- crypto/evp/evp_lib.c.orig 2006-11-29 21:47:13 +0100 +++ crypto/evp/evp_lib.c 2007-02-28 17:19:31 +0100 @@@@ -225,7 +225,7 @@@@ int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) { - return ctx->cipher->key_len; + return ctx->key_len; } int EVP_CIPHER_nid(const EVP_CIPHER *cipher) a39 468 Index: crypto/rand/randfile.c --- crypto/rand/randfile.c 21 May 2005 17:39:52 -0000 1.47.2.1 +++ crypto/rand/randfile.c 2 Mar 2007 17:44:55 -0000 1.47.2.2 @@@@ -102,10 +102,8 @@@@ if (file == NULL) return(0); - i=stat(file,&sb); - /* If the state fails, put some crap in anyway */ + if (stat(file,&sb) < 0) return(0); RAND_add(&sb,sizeof(sb),0.0); - if (i < 0) return(0); if (bytes == 0) return(ret); in=fopen(file,"rb"); Index: crypto/x509v3/v3_pci.c --- crypto/x509v3/v3_pci.c.orig 2007-01-21 14:16:49 +0100 +++ crypto/x509v3/v3_pci.c 2007-03-05 13:36:31 +0100 @@@@ -286,12 +286,6 @@@@ X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); goto err; } - pci->proxyPolicy = PROXY_POLICY_new(); - if (!pci->proxyPolicy) - { - X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); - goto err; - } pci->proxyPolicy->policyLanguage = language; language = NULL; pci->proxyPolicy->policy = policy; policy = NULL; @@@@ -301,11 +295,6 @@@@ if (language) { ASN1_OBJECT_free(language); language = NULL; } if (pathlen) { ASN1_INTEGER_free(pathlen); pathlen = NULL; } if (policy) { ASN1_OCTET_STRING_free(policy); policy = NULL; } - if (pci && pci->proxyPolicy) - { - PROXY_POLICY_free(pci->proxyPolicy); - pci->proxyPolicy = NULL; - } if (pci) { PROXY_CERT_INFO_EXTENSION_free(pci); pci = NULL; } end: sk_CONF_VALUE_pop_free(vals, X509V3_conf_free); ----------------------------------------------------------------------------- Temporary fix for OpenSSL to work under GCC 4.2 world order. This especially fixes operations like "openssl genrsa" or "ssh-keygen" under some 64-bit platforms like FreeBSD/amd64. The OpenSSL team is already working on an official fix. -- rse 20070523 Derived from: http://dev.gentoo.org/~dirtyepic/patches/openssl-0.9.8e-gcc42.patch Index: crypto/asn1/a_d2i_fp.c --- crypto/asn1/a_d2i_fp.c.orig 2005-05-09 02:27:32 +0200 +++ crypto/asn1/a_d2i_fp.c 2007-05-23 11:35:26 +0200 @@@@ -81,6 +81,7 @@@@ BIO_free(b); return(ret); } +const void * __attribute__((unused)) __ASN1_d2i_fp=(const void*)openssl_fcast(ASN1_d2i_fp); #endif void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x) @@@@ -99,6 +100,7 @@@@ if (b != NULL) BUF_MEM_free(b); return(ret); } +const void * __attribute__((unused)) __ASN1_d2i_bio=(const void*)openssl_fcast(ASN1_d2i_bio); #endif Index: crypto/asn1/a_dup.c --- crypto/asn1/a_dup.c.orig 2005-05-09 02:27:32 +0200 +++ crypto/asn1/a_dup.c 2007-05-23 11:35:26 +0200 @@@@ -82,6 +82,7 @@@@ OPENSSL_free(b); return(ret); } +const void * __attribute__((unused)) __ASN1_dup=(const void*)openssl_fcast(ASN1_dup); #endif Index: crypto/asn1/a_i2d_fp.c --- crypto/asn1/a_i2d_fp.c.orig 2005-05-09 02:27:32 +0200 +++ crypto/asn1/a_i2d_fp.c 2007-05-23 11:35:26 +0200 @@@@ -79,6 +79,7 @@@@ BIO_free(b); return(ret); } +const void * __attribute__((unused)) __ASN1_i2d_fp=(const void*)openssl_fcast(ASN1_i2d_fp); #endif int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x) @@@@ -113,6 +114,7 @@@@ OPENSSL_free(b); return(ret); } +const void * __attribute__((unused)) __ASN1_i2d_bio=(const void*)openssl_fcast(ASN1_i2d_bio); #endif Index: crypto/asn1/asn1.h --- crypto/asn1/asn1.h.orig 2006-02-19 14:45:22 +0100 +++ crypto/asn1/asn1.h 2007-05-23 11:35:26 +0200 @@@@ -902,23 +902,26 @@@@ /* Used to implement other functions */ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x); +extern const void *__ASN1_dup; #define ASN1_dup_of(type,i2d,d2i,x) \ - ((type *(*)(I2D_OF(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2d,d2i,x) + ((type *(*)(I2D_OF(type),D2I_OF(type),type *))__ASN1_dup)(i2d,d2i,x) #define ASN1_dup_of_const(type,i2d,d2i,x) \ - ((type *(*)(I2D_OF_const(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2d,d2i,x) + ((type *(*)(I2D_OF_const(type),D2I_OF(type),type *))__ASN1_dup)(i2d,d2i,x) void *ASN1_item_dup(const ASN1_ITEM *it, void *x); #ifndef OPENSSL_NO_FP_API void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x); +extern const void *__ASN1_d2i_fp; #define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ - ((type *(*)(type *(*)(void),D2I_OF(type),FILE *,type **))openssl_fcast(ASN1_d2i_fp))(xnew,d2i,in,x) + ((type *(*)(type *(*)(void),D2I_OF(type),FILE *,type **))__ASN1_d2i_fp)(xnew,d2i,in,x) void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x); +extern const void *__ASN1_i2d_fp; #define ASN1_i2d_fp_of(type,i2d,out,x) \ - ((int (*)(I2D_OF(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out,x) + ((int (*)(I2D_OF(type),FILE *,type *))__ASN1_i2d_fp)(i2d,out,x) #define ASN1_i2d_fp_of_const(type,i2d,out,x) \ - ((int (*)(I2D_OF_const(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out,x) + ((int (*)(I2D_OF_const(type),FILE *,type *))__ASN1_i2d_fp)(i2d,out,x) int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); #endif @@@@ -927,14 +930,16 @@@@ #ifndef OPENSSL_NO_BIO void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x); +extern const void *__ASN1_d2i_bio; #define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ - ((type *(*)(type *(*)(void),D2I_OF(type),BIO *,type **))openssl_fcast(ASN1_d2i_bio))(xnew,d2i,in,x) + ((type *(*)(type *(*)(void),D2I_OF(type),BIO *,type **))__ASN1_d2i_bio)(xnew,d2i,in,x) void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x); +extern const void *__ASN1_i2d_bio; #define ASN1_i2d_bio_of(type,i2d,out,x) \ - ((int (*)(I2D_OF(type),BIO *,type *))openssl_fcast(ASN1_i2d_bio))(i2d,out,x) + ((int (*)(I2D_OF(type),BIO *,type *))__ASN1_i2d_bio)(i2d,out,x) #define ASN1_i2d_bio_of_const(type,i2d,out,x) \ - ((int (*)(I2D_OF_const(type),BIO *,const type *))openssl_fcast(ASN1_i2d_bio))(i2d,out,x) + ((int (*)(I2D_OF_const(type),BIO *,const type *))__ASN1_i2d_bio)(i2d,out,x) int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); @@@@ -977,8 +982,9 @@@@ void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_OCTET_STRING **oct); +extern const void *__ASN1_pack_string; #define ASN1_pack_string_of(type,obj,i2d,oct) \ - ((ASN1_STRING *(*)(type *,I2D_OF(type),ASN1_OCTET_STRING **))openssl_fcast(ASN1_pack_string))(obj,i2d,oct) + ((ASN1_STRING *(*)(type *,I2D_OF(type),ASN1_OCTET_STRING **))__ASN1_pack_string)(obj,i2d,oct) ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); void ASN1_STRING_set_default_mask(unsigned long mask); Index: crypto/asn1/asn_pack.c --- crypto/asn1/asn_pack.c.orig 2005-05-09 02:27:32 +0200 +++ crypto/asn1/asn_pack.c 2007-05-23 11:35:26 +0200 @@@@ -144,6 +144,7 @@@@ i2d (obj, &p); return octmp; } +const void * __attribute__((unused)) __ASN1_pack_string=(const void*)openssl_fcast(ASN1_pack_string); #endif Index: crypto/ocsp/ocsp.h --- crypto/ocsp/ocsp.h.orig 2005-05-13 01:01:43 +0200 +++ crypto/ocsp/ocsp.h 2007-05-23 11:35:26 +0200 @@@@ -468,8 +468,9 @@@@ ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, void *data, STACK_OF(ASN1_OBJECT) *sk); +extern const void *__ASN1_STRING_encode; #define ASN1_STRING_encode_of(type,s,i2d,data,sk) \ -((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))openssl_fcast(ASN1_STRING_encode))(s,i2d,data,sk) +((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))__ASN1_STRING_encode)(s,i2d,data,sk) X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim); Index: crypto/ocsp/ocsp_ext.c --- crypto/ocsp/ocsp_ext.c.orig 2005-03-31 15:57:53 +0200 +++ crypto/ocsp/ocsp_ext.c 2007-05-23 11:35:26 +0200 @@@@ -305,6 +305,7 @@@@ if (b) OPENSSL_free(b); return NULL; } +const void * __attribute__((unused)) __ASN1_STRING_encode=(const void*)openssl_fcast(ASN1_STRING_encode); /* Nonce handling functions */ Index: crypto/pem/pem.h --- crypto/pem/pem.h.orig 2006-12-19 20:47:36 +0100 +++ crypto/pem/pem.h 2007-05-23 11:35:26 +0200 @@@@ -220,19 +220,19 @@@@ #define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ { \ -return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read))(d2i_##asn1, str,fp,x,cb,u)); \ +return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))__PEM_ASN1_read)(d2i_##asn1, str,fp,x,cb,u)); \ } #define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, type *x) \ { \ -return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ +return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ } #define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, const type *x) \ { \ -return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ +return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ } #define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ @@@@ -240,7 +240,7 @@@@ unsigned char *kstr, int klen, pem_password_cb *cb, \ void *u) \ { \ - return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ + return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ } #define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ @@@@ -248,7 +248,7 @@@@ unsigned char *kstr, int klen, pem_password_cb *cb, \ void *u) \ { \ - return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ + return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ } #endif @@@@ -256,33 +256,33 @@@@ #define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ { \ -return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i_##asn1, str,bp,x,cb,u)); \ +return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))__PEM_ASN1_read_bio)(d2i_##asn1, str,bp,x,cb,u)); \ } #define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x) \ { \ -return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ +return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ } #define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, const type *x) \ { \ -return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ +return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ } #define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ { \ - return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ + return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ } #define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ { \ - return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ + return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ } #define IMPLEMENT_PEM_write(name, type, str, asn1) \ @@@@ -545,13 +545,15 @@@@ pem_password_cb *cb, void *u); void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, pem_password_cb *cb, void *u); +extern const void *__PEM_ASN1_read_bio; #define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \ -((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i,name,bp,x,cb,u) +((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))__PEM_ASN1_read_bio)(d2i,name,bp,x,cb,u) int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x, const EVP_CIPHER *enc,unsigned char *kstr,int klen, pem_password_cb *cb, void *u); +extern const void *__PEM_ASN1_write_bio; #define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \ - ((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d,name,bp,x,enc,kstr,klen,cb,u) + ((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d,name,bp,x,enc,kstr,klen,cb,u) STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, @@@@ -564,11 +566,13 @@@@ int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, pem_password_cb *cb, void *u); +extern const void *__PEM_ASN1_read; int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, char *x,const EVP_CIPHER *enc,unsigned char *kstr, int klen,pem_password_cb *callback, void *u); STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); +extern const void *__PEM_ASN1_write; #endif int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, Index: crypto/pem/pem_lib.c --- crypto/pem/pem_lib.c.orig 2007-02-21 14:48:49 +0100 +++ crypto/pem/pem_lib.c 2007-05-23 11:35:26 +0200 @@@@ -174,6 +174,7 @@@@ BIO_free(b); return(ret); } +const void * __attribute__((unused)) __PEM_ASN1_read=(const void*)openssl_fcast(PEM_ASN1_read); #endif static int check_pem(const char *nm, const char *name) @@@@ -277,6 +278,7 @@@@ BIO_free(b); return(ret); } +const void * __attribute__((unused)) __PEM_ASN1_write=(const void*)openssl_fcast(PEM_ASN1_write); #endif int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, @@@@ -381,6 +383,7 @@@@ } return(ret); } +const void * __attribute__((unused)) __PEM_ASN1_write_bio=(const void*)openssl_fcast(PEM_ASN1_write_bio); int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, pem_password_cb *callback,void *u) Index: crypto/pem/pem_oth.c --- crypto/pem/pem_oth.c.orig 2005-03-31 15:57:54 +0200 +++ crypto/pem/pem_oth.c 2007-05-23 11:35:26 +0200 @@@@ -84,3 +84,4 @@@@ OPENSSL_free(data); return(ret); } +const void * __attribute__((unused)) __PEM_ASN1_read_bio=(const void*)openssl_fcast(PEM_ASN1_read_bio); ----------------------------------------------------------------------------- Port to MacOS X. Index: Makefile.org --- Makefile.org.orig 2006-06-09 17:42:08.000000000 +0200 +++ Makefile.org 2007-05-28 17:25:21.000000000 +0200 @@@@ -550,6 +550,9 @@@@ if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \ filecase=-i; \ fi; \ + if [ "`uname`" = "Darwin" ]; then \ + filecase=-i; \ + fi; \ set -e; for i in doc/apps/*.pod; do \ fn=`basename $$i .pod`; \ sec=`$(PERL) util/extract-section.pl 1 < $$i`; \ Index: apps/Makefile --- apps/Makefile.orig 2007-02-23 02:01:03.000000000 +0100 +++ apps/Makefile 2007-05-28 17:56:48.000000000 +0200 @@@@ -2,6 +2,9 @@@@ # apps/Makefile # +# Case-insensitive HFS+ +.PHONY: install + DIR= apps TOP= .. CC= cc @@@@ -153,7 +156,7 @@@@ shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \ shlib_target="$(SHLIB_TARGET)"; \ fi; \ - if [ "$${shlib_target}" = "darwin-shared" ] ; then \ + if [ "$${shlib_target}" = "darwin-shared" -o "`uname`" = "Darwin" ] ; then \ LIBRARIES="$(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO)" ; \ else \ LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \ Index: crypto/bf/Makefile --- crypto/bf/Makefile.orig 2005-09-28 16:51:37.000000000 -0700 +++ crypto/bf/Makefile 2005-09-28 16:52:25.000000000 -0700 @@@@ -2,6 +2,9 @@@@ # OpenSSL/crypto/blowfish/Makefile # +# Case-insensitive HFS+ +.PHONY: install + DIR= bf TOP= ../.. CC= cc Index: crypto/des/Makefile --- crypto/des/Makefile.orig 2005-09-28 16:51:42.000000000 -0700 +++ crypto/des/Makefile 2005-09-28 16:52:15.000000000 -0700 @@@@ -2,6 +2,9 @@@@ # OpenSSL/crypto/des/Makefile # +# Case-insensitive HFS+ +.PHONY: install + DIR= des TOP= ../.. CC= cc ________________________________________________________________________ Lingering "security" fix http://cvs.openssl.org/chngview?cn=16587 Index: ssl/ssl_lib.c --- ssl/ssl_lib.c.orig 2006-11-29 21:47:15 +0100 +++ ssl/ssl_lib.c 2007-09-28 18:11:48 +0200 @@@@ -1201,7 +1201,6 @@@@ char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len) { char *p; - const char *cp; STACK_OF(SSL_CIPHER) *sk; SSL_CIPHER *c; int i; @@@@ -1214,20 +1213,21 @@@@ sk=s->session->ciphers; for (i=0; iname; *cp; ) + n=strlen(c->name); + if (n+1 > len) { - if (len-- <= 0) - { - *p='\0'; - return(buf); - } - else - *(p++)= *(cp++); + if (p != buf) + --p; + *p='\0'; + return buf; } + strcpy(p,c->name); + p+=n; *(p++)=':'; + len-=n+1; } p[-1]='\0'; return(buf); @ 1.28 log @better support Mac OS X @ text @d484 1 d486 46 @ 1.27 log @apply a temporary fix for the run-time problems when compiled with GCC 4.2.0 under 64-bit platforms @ text @d418 67 @ 1.26 log @apply an upstream patch to fix memory leaks @ text @d107 311 @ 1.25 log @apply two more of our upstream patches @ text @d79 28 @ 1.24 log @upgrade to 0.9.8e with the official fix applied (this especially fixed OpenSSH's SSH1 protocol) @ text @d45 34 @ 1.23 log @upgrading package: openssl 0.9.8a -> 0.9.8b @ text @d32 13 @ 1.23.2.1 log @MFC: make up leeway for 2_STABLE by virtue of build-time results @ text @a31 47 Index: crypto/evp/evp_lib.c --- crypto/evp/evp_lib.c.orig 2006-11-29 21:47:13 +0100 +++ crypto/evp/evp_lib.c 2007-02-28 17:19:31 +0100 @@@@ -225,7 +225,7 @@@@ int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) { - return ctx->cipher->key_len; + return ctx->key_len; } int EVP_CIPHER_nid(const EVP_CIPHER *cipher) Index: crypto/rand/rand_lib.c --- crypto/rand/rand_lib.c 30 Jan 2003 17:39:23 -0000 1.16 +++ crypto/rand/rand_lib.c 2 Mar 2007 17:54:31 -0000 1.16.2.1 @@@@ -154,6 +154,7 @@@@ int RAND_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); + memset(buf, 0, num); if (meth && meth->bytes) return meth->bytes(buf,num); return(-1); @@@@ -162,6 +163,7 @@@@ int RAND_pseudo_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); + memset(buf, 0, num); if (meth && meth->pseudorand) return meth->pseudorand(buf,num); return(-1); Index: crypto/rand/randfile.c --- crypto/rand/randfile.c 21 May 2005 17:39:52 -0000 1.47.2.1 +++ crypto/rand/randfile.c 2 Mar 2007 17:44:55 -0000 1.47.2.2 @@@@ -102,10 +102,8 @@@@ if (file == NULL) return(0); - i=stat(file,&sb); - /* If the state fails, put some crap in anyway */ + if (stat(file,&sb) < 0) return(0); RAND_add(&sb,sizeof(sb),0.0); - if (i < 0) return(0); if (bytes == 0) return(ret); in=fopen(file,"rb"); @ 1.23.2.2 log @MFC: make up leeway for 2_STABLE by virtue of build-time results @ text @a78 28 Index: crypto/x509v3/v3_pci.c --- crypto/x509v3/v3_pci.c.orig 2007-01-21 14:16:49 +0100 +++ crypto/x509v3/v3_pci.c 2007-03-05 13:36:31 +0100 @@@@ -286,12 +286,6 @@@@ X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); goto err; } - pci->proxyPolicy = PROXY_POLICY_new(); - if (!pci->proxyPolicy) - { - X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE); - goto err; - } pci->proxyPolicy->policyLanguage = language; language = NULL; pci->proxyPolicy->policy = policy; policy = NULL; @@@@ -301,11 +295,6 @@@@ if (language) { ASN1_OBJECT_free(language); language = NULL; } if (pathlen) { ASN1_INTEGER_free(pathlen); pathlen = NULL; } if (policy) { ASN1_OCTET_STRING_free(policy); policy = NULL; } - if (pci && pci->proxyPolicy) - { - PROXY_POLICY_free(pci->proxyPolicy); - pci->proxyPolicy = NULL; - } if (pci) { PROXY_CERT_INFO_EXTENSION_free(pci); pci = NULL; } end: sk_CONF_VALUE_pop_free(vals, X509V3_conf_free); @ 1.22 log @upgrading package: openssl 0.9.8 -> 0.9.8a @ text @d2 3 a4 3 --- config.orig 2005-06-26 20:10:20 +0200 +++ config 2005-07-06 08:53:56 +0200 @@@@ -471,6 +471,7 @@@@ d12 9 d23 1 a23 1 +++ doc/crypto/des_modes.pod 2005-07-06 08:54:01 +0200 @ 1.22.2.1 log @modifying package: openssl-0.9.8a 2.5.1 -> 2.5.2 @ text @a22 76 ----------------------------------------------------------------------------- RSA Signature Forgery (CVE-2006-4339) http://www.openssl.org/news/secadv_20060905.txt http://www.openssl.org/news/patch-CVE-2006-4339.txt Index: crypto/rsa/rsa.h --- crypto/rsa/rsa.h 9 Jan 2006 16:05:18 -0000 1.55.2.4 +++ crypto/rsa/rsa.h 4 Sep 2006 15:16:54 -0000 @@@@ -412,6 +412,7 @@@@ #define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 #define RSA_R_OAEP_DECODING_ERROR 121 #define RSA_R_PADDING_CHECK_FAILED 114 +#define RSA_R_PKCS1_PADDING_TOO_SHORT 105 #define RSA_R_P_NOT_PRIME 128 #define RSA_R_Q_NOT_PRIME 129 #define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130 Index: crypto/rsa/rsa_eay.c --- crypto/rsa/rsa_eay.c 14 Jun 2006 08:51:40 -0000 1.46.2.4 +++ crypto/rsa/rsa_eay.c 4 Sep 2006 15:16:56 -0000 @@@@ -640,6 +640,15 @@@@ { case RSA_PKCS1_PADDING: r=RSA_padding_check_PKCS1_type_1(to,num,buf,i,num); + /* Generally signatures should be at least 2/3 padding, though + this isn't possible for really short keys and some standard + signature schemes, so don't check if the unpadded data is + small. */ + if(r > 42 && 3*8*r >= BN_num_bits(rsa->n)) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_PKCS1_PADDING_TOO_SHORT); + goto err; + } break; case RSA_X931_PADDING: r=RSA_padding_check_X931(to,num,buf,i,num); Index: crypto/rsa/rsa_err.c --- crypto/rsa/rsa_err.c 9 Jan 2006 16:05:18 -0000 1.17.2.3 +++ crypto/rsa/rsa_err.c 4 Sep 2006 15:16:57 -0000 @@@@ -142,6 +142,7 @@@@ {ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"}, {ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"}, {ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"}, +{ERR_REASON(RSA_R_PKCS1_PADDING_TOO_SHORT),"pkcs1 padding too short"}, {ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"}, {ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"}, {ERR_REASON(RSA_R_RSA_OPERATIONS_NOT_SUPPORTED),"rsa operations not supported"}, Index: crypto/rsa/rsa_sign.c --- crypto/rsa/rsa_sign.c 26 Apr 2005 22:07:17 -0000 1.21 +++ crypto/rsa/rsa_sign.c 4 Sep 2006 15:16:57 -0000 @@@@ -185,6 +185,23 @@@@ sig=d2i_X509_SIG(NULL,&p,(long)i); if (sig == NULL) goto err; + + /* Excess data can be used to create forgeries */ + if(p != s+i) + { + RSAerr(RSA_F_RSA_VERIFY,RSA_R_BAD_SIGNATURE); + goto err; + } + + /* Parameters to the signature algorithm can also be used to + create forgeries */ + if(sig->algor->parameter + && sig->algor->parameter->type != V_ASN1_NULL) + { + RSAerr(RSA_F_RSA_VERIFY,RSA_R_BAD_SIGNATURE); + goto err; + } + sigtype=OBJ_obj2nid(sig->algor->algorithm); @ 1.22.2.2 log @Security Fixes (CVE-2006-2937 CVE-2006-2940 CVE-2006-3738 CVE-2006-4343) @ text @a98 409 ----------------------------------------------------------------------------- Security Fixes (OpenPKG-SA-2006.018-openssl) CVE-2006-2937 CVE-2006-2940 CVE-2006-3738 CVE-2006-4343 http://www.openssl.org/news/secadv_20060928.txt Index: crypto/asn1/tasn_dec.c --- crypto/asn1/tasn_dec.c 31 Aug 2006 20:11:09 -0000 1.26.2.4 +++ crypto/asn1/tasn_dec.c 26 Sep 2006 11:49:24 -0000 @@@@ -832,6 +832,7 @@@@ static int asn1_d2i_ex_primitive(ASN1_VA } else if (ret == -1) return -1; + ret = 0; /* SEQUENCE, SET and "OTHER" are left in encoded form */ if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) Index: crypto/dh/dh.h --- crypto/dh/dh.h 9 Jan 2006 16:05:22 -0000 1.37.2.2 +++ crypto/dh/dh.h 26 Sep 2006 11:49:24 -0000 @@@@ -73,6 +73,10 @@@@ #include #endif +#ifndef OPENSSL_DH_MAX_MODULUS_BITS +# define OPENSSL_DH_MAX_MODULUS_BITS 10000 +#endif + #define DH_FLAG_CACHE_MONT_P 0x01 #define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH * implementation now uses constant time @@@@ -221,6 +225,7 @@@@ void ERR_load_DH_strings(void); /* Reason codes. */ #define DH_R_BAD_GENERATOR 101 #define DH_R_NO_PRIVATE_VALUE 100 +#define DH_R_MODULUS_TOO_LARGE 103 #define DH_R_INVALID_PUBKEY 102 #ifdef __cplusplus Index: crypto/dh/dh_err.c --- crypto/dh/dh_err.c 9 Jan 2006 16:05:22 -0000 1.11.2.2 +++ crypto/dh/dh_err.c 26 Sep 2006 11:49:24 -0000 @@@@ -84,6 +84,7 @@@@ static ERR_STRING_DATA DH_str_reasons[]= { {ERR_REASON(DH_R_BAD_GENERATOR) ,"bad generator"}, {ERR_REASON(DH_R_NO_PRIVATE_VALUE) ,"no private value"}, +{ERR_REASON(DH_R_MODULUS_TOO_LARGE) ,"modulus too large"}, {ERR_REASON(DH_R_INVALID_PUBKEY) ,"invalid public key"}, {0,NULL} }; Index: crypto/dh/dh_key.c --- crypto/dh/dh_key.c 13 Mar 2006 23:12:06 -0000 1.24.2.3 +++ crypto/dh/dh_key.c 26 Sep 2006 11:49:24 -0000 @@@@ -179,6 +179,12 @@@@ static int compute_key(unsigned char *ke int ret= -1; int check_result; + if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) + { + DHerr(DH_F_COMPUTE_KEY,DH_R_MODULUS_TOO_LARGE); + goto err; + } + ctx = BN_CTX_new(); if (ctx == NULL) goto err; BN_CTX_start(ctx); Index: crypto/dsa/dsa.h --- crypto/dsa/dsa.h 16 May 2005 01:43:30 -0000 1.39 +++ crypto/dsa/dsa.h 26 Sep 2006 11:49:24 -0000 @@@@ -84,6 +84,10 @@@@ #endif #endif +#ifndef OPENSSL_DSA_MAX_MODULUS_BITS +# define OPENSSL_DSA_MAX_MODULUS_BITS 10000 +#endif + #define DSA_FLAG_CACHE_MONT_P 0x01 #define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA * implementation now uses constant time @@@@ -270,8 +274,10 @@@@ void ERR_load_DSA_strings(void); #define DSA_F_SIG_CB 114 /* Reason codes. */ +#define DSA_R_BAD_Q_VALUE 102 #define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100 #define DSA_R_MISSING_PARAMETERS 101 +#define DSA_R_MODULUS_TOO_LARGE 103 #ifdef __cplusplus } Index: crypto/dsa/dsa_err.c --- crypto/dsa/dsa_err.c 12 Apr 2005 16:15:12 -0000 1.13 +++ crypto/dsa/dsa_err.c 26 Sep 2006 11:49:24 -0000 @@@@ -89,8 +89,10 @@@@ static ERR_STRING_DATA DSA_str_functs[]= static ERR_STRING_DATA DSA_str_reasons[]= { +{ERR_REASON(DSA_R_BAD_Q_VALUE) ,"bad q value"}, {ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"}, {ERR_REASON(DSA_R_MISSING_PARAMETERS) ,"missing parameters"}, +{ERR_REASON(DSA_R_MODULUS_TOO_LARGE) ,"modulus too large"}, {0,NULL} }; Index: crypto/dsa/dsa_ossl.c --- crypto/dsa/dsa_ossl.c 26 May 2005 04:40:57 -0000 1.24.2.1 +++ crypto/dsa/dsa_ossl.c 26 Sep 2006 11:49:24 -0000 @@@@ -304,6 +304,18 @@@@ static int dsa_do_verify(const unsigned return -1; } + if (BN_num_bits(dsa->q) != 160) + { + DSAerr(DSA_F_DSA_DO_VERIFY,DSA_R_BAD_Q_VALUE); + return -1; + } + + if (BN_num_bits(dsa->p) > OPENSSL_DSA_MAX_MODULUS_BITS) + { + DSAerr(DSA_F_DSA_DO_VERIFY,DSA_R_MODULUS_TOO_LARGE); + return -1; + } + BN_init(&u1); BN_init(&u2); BN_init(&t1); Index: crypto/ec/ec.h --- crypto/ec/ec.h 8 Jan 2006 21:52:43 -0000 1.77.2.2 +++ crypto/ec/ec.h 26 Sep 2006 11:49:24 -0000 @@@@ -93,6 +93,10 @@@@ extern "C" { #endif +#ifndef OPENSSL_ECC_MAX_FIELD_BITS +# define OPENSSL_ECC_MAX_FIELD_BITS 661 +#endif + typedef enum { /* values as defined in X9.62 (ECDSA) and elsewhere */ POINT_CONVERSION_COMPRESSED = 2, @@@@ -482,6 +486,7 @@@@ void ERR_load_EC_strings(void); #define EC_R_D2I_ECPKPARAMETERS_FAILURE 117 #define EC_R_DISCRIMINANT_IS_ZERO 118 #define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119 +#define EC_R_FIELD_TOO_LARGE 138 #define EC_R_GROUP2PKPARAMETERS_FAILURE 120 #define EC_R_I2D_ECPKPARAMETERS_FAILURE 121 #define EC_R_INCOMPATIBLE_OBJECTS 101 @@@@ -492,7 +497,9 @@@@ void ERR_load_EC_strings(void); #define EC_R_INVALID_FIELD 103 #define EC_R_INVALID_FORM 104 #define EC_R_INVALID_GROUP_ORDER 122 +#define EC_R_INVALID_PENTANOMIAL_BASIS 132 #define EC_R_INVALID_PRIVATE_KEY 123 +#define EC_R_INVALID_TRINOMIAL_BASIS 137 #define EC_R_MISSING_PARAMETERS 124 #define EC_R_MISSING_PRIVATE_KEY 125 #define EC_R_NOT_A_NIST_PRIME 135 Index: crypto/ec/ec_asn1.c --- crypto/ec/ec_asn1.c 8 Feb 2006 19:16:13 -0000 1.19.2.1 +++ crypto/ec/ec_asn1.c 26 Sep 2006 11:49:25 -0000 @@@@ -741,6 +741,7 @@@@ static EC_GROUP *ec_asn1_parameters2grou EC_GROUP *ret = NULL; BIGNUM *p = NULL, *a = NULL, *b = NULL; EC_POINT *point=NULL; + long field_bits; if (!params->fieldID || !params->fieldID->fieldType || !params->fieldID->p.ptr) @@@@ -779,6 +780,13 @@@@ static EC_GROUP *ec_asn1_parameters2grou char_two = params->fieldID->p.char_two; + field_bits = char_two->m; + if (field_bits > OPENSSL_ECC_MAX_FIELD_BITS) + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_FIELD_TOO_LARGE); + goto err; + } + if ((p = BN_new()) == NULL) { ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_MALLOC_FAILURE); @@@@ -799,6 +807,13 @@@@ static EC_GROUP *ec_asn1_parameters2grou } tmp_long = ASN1_INTEGER_get(char_two->p.tpBasis); + + if (!(char_two->m > tmp_long && tmp_long > 0)) + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_INVALID_TRINOMIAL_BASIS); + goto err; + } + /* create the polynomial */ if (!BN_set_bit(p, (int)char_two->m)) goto err; @@@@ -817,6 +832,13 @@@@ static EC_GROUP *ec_asn1_parameters2grou ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_ERROR); goto err; } + + if (!(char_two->m > penta->k3 && penta->k3 > penta->k2 && penta->k2 > penta->k1 && penta->k1 > 0)) + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_INVALID_PENTANOMIAL_BASIS); + goto err; + } + /* create the polynomial */ if (!BN_set_bit(p, (int)char_two->m)) goto err; if (!BN_set_bit(p, (int)penta->k1)) goto err; @@@@ -853,6 +875,20 @@@@ static EC_GROUP *ec_asn1_parameters2grou ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_ASN1_LIB); goto err; } + + if (BN_is_negative(p) || BN_is_zero(p)) + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_INVALID_FIELD); + goto err; + } + + field_bits = BN_num_bits(p); + if (field_bits > OPENSSL_ECC_MAX_FIELD_BITS) + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_FIELD_TOO_LARGE); + goto err; + } + /* create the EC_GROUP structure */ ret = EC_GROUP_new_curve_GFp(p, a, b, NULL); } @@@@ -910,6 +946,16 @@@@ static EC_GROUP *ec_asn1_parameters2grou ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_ASN1_LIB); goto err; } + if (BN_is_negative(a) || BN_is_zero(a)) + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_INVALID_GROUP_ORDER); + goto err; + } + if (BN_num_bits(a) > (int)field_bits + 1) /* Hasse bound */ + { + ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_INVALID_GROUP_ORDER); + goto err; + } /* extract the cofactor (optional) */ if (params->cofactor == NULL) Index: crypto/ec/ec_err.c --- crypto/ec/ec_err.c 9 Jan 2006 16:05:20 -0000 1.36.2.2 +++ crypto/ec/ec_err.c 26 Sep 2006 11:49:25 -0000 @@@@ -188,6 +188,7 @@@@ static ERR_STRING_DATA EC_str_reasons[]= {ERR_REASON(EC_R_D2I_ECPKPARAMETERS_FAILURE),"d2i ecpkparameters failure"}, {ERR_REASON(EC_R_DISCRIMINANT_IS_ZERO) ,"discriminant is zero"}, {ERR_REASON(EC_R_EC_GROUP_NEW_BY_NAME_FAILURE),"ec group new by name failure"}, +{ERR_REASON(EC_R_FIELD_TOO_LARGE) ,"field too large"}, {ERR_REASON(EC_R_GROUP2PKPARAMETERS_FAILURE),"group2pkparameters failure"}, {ERR_REASON(EC_R_I2D_ECPKPARAMETERS_FAILURE),"i2d ecpkparameters failure"}, {ERR_REASON(EC_R_INCOMPATIBLE_OBJECTS) ,"incompatible objects"}, @@@@ -198,7 +199,9 @@@@ static ERR_STRING_DATA EC_str_reasons[]= {ERR_REASON(EC_R_INVALID_FIELD) ,"invalid field"}, {ERR_REASON(EC_R_INVALID_FORM) ,"invalid form"}, {ERR_REASON(EC_R_INVALID_GROUP_ORDER) ,"invalid group order"}, +{ERR_REASON(EC_R_INVALID_PENTANOMIAL_BASIS),"invalid pentanomial basis"}, {ERR_REASON(EC_R_INVALID_PRIVATE_KEY) ,"invalid private key"}, +{ERR_REASON(EC_R_INVALID_TRINOMIAL_BASIS),"invalid trinomial basis"}, {ERR_REASON(EC_R_MISSING_PARAMETERS) ,"missing parameters"}, {ERR_REASON(EC_R_MISSING_PRIVATE_KEY) ,"missing private key"}, {ERR_REASON(EC_R_NOT_A_NIST_PRIME) ,"not a NIST prime"}, Index: crypto/rsa/rsa.h --- crypto/rsa/rsa.h 6 Sep 2006 06:43:25 -0000 1.55.2.6 +++ crypto/rsa/rsa.h 26 Sep 2006 11:49:25 -0000 @@@@ -159,6 +159,17 @@@@ struct rsa_st BN_BLINDING *mt_blinding; }; +#ifndef OPENSSL_RSA_MAX_MODULUS_BITS +# define OPENSSL_RSA_MAX_MODULUS_BITS 16384 +#endif + +#ifndef OPENSSL_RSA_SMALL_MODULUS_BITS +# define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 +#endif +#ifndef OPENSSL_RSA_MAX_PUBEXP_BITS +# define OPENSSL_RSA_MAX_PUBEXP_BITS 64 /* exponent limit enforced for "large" modulus only */ +#endif + #define RSA_3 0x3L #define RSA_F4 0x10001L @@@@ -407,6 +418,7 @@@@ void ERR_load_RSA_strings(void); #define RSA_R_IQMP_NOT_INVERSE_OF_Q 126 #define RSA_R_KEY_SIZE_TOO_SMALL 120 #define RSA_R_LAST_OCTET_INVALID 134 +#define RSA_R_MODULUS_TOO_LARGE 105 #define RSA_R_NO_PUBLIC_EXPONENT 140 #define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 #define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 Index: crypto/rsa/rsa_eay.c --- crypto/rsa/rsa_eay.c 6 Sep 2006 06:43:25 -0000 1.46.2.6 +++ crypto/rsa/rsa_eay.c 26 Sep 2006 11:49:25 -0000 @@@@ -168,6 +168,28 @@@@ static int RSA_eay_public_encrypt(int fl unsigned char *buf=NULL; BN_CTX *ctx=NULL; + if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_MODULUS_TOO_LARGE); + return -1; + } + + if (BN_ucmp(rsa->n, rsa->e) <= 0) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_BAD_E_VALUE); + return -1; + } + + /* for large moduli, enforce exponent limit */ + if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) + { + if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_BAD_E_VALUE); + return -1; + } + } + if ((ctx=BN_CTX_new()) == NULL) goto err; BN_CTX_start(ctx); f = BN_CTX_get(ctx); @@@@ -597,6 +619,28 @@@@ static int RSA_eay_public_decrypt(int fl unsigned char *buf=NULL; BN_CTX *ctx=NULL; + if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_MODULUS_TOO_LARGE); + return -1; + } + + if (BN_ucmp(rsa->n, rsa->e) <= 0) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_BAD_E_VALUE); + return -1; + } + + /* for large moduli, enforce exponent limit */ + if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) + { + if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) + { + RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_BAD_E_VALUE); + return -1; + } + } + if((ctx = BN_CTX_new()) == NULL) goto err; BN_CTX_start(ctx); f = BN_CTX_get(ctx); Index: crypto/rsa/rsa_err.c --- crypto/rsa/rsa_err.c 6 Sep 2006 06:43:26 -0000 1.17.2.5 +++ crypto/rsa/rsa_err.c 26 Sep 2006 11:49:25 -0000 @@@@ -137,6 +137,7 @@@@ static ERR_STRING_DATA RSA_str_reasons[] {ERR_REASON(RSA_R_IQMP_NOT_INVERSE_OF_Q) ,"iqmp not inverse of q"}, {ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"}, {ERR_REASON(RSA_R_LAST_OCTET_INVALID) ,"last octet invalid"}, +{ERR_REASON(RSA_R_MODULUS_TOO_LARGE) ,"modulus too large"}, {ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT) ,"no public exponent"}, {ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"}, {ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"}, Index: ssl/s2_clnt.c --- ssl/s2_clnt.c 5 Dec 2005 17:32:20 -0000 1.51.2.2 +++ ssl/s2_clnt.c 26 Sep 2006 11:49:25 -0000 @@@@ -520,7 +520,8 @@@@ static int get_server_hello(SSL *s) CRYPTO_add(&s->session->peer->references, 1, CRYPTO_LOCK_X509); } - if (s->session->peer != s->session->sess_cert->peer_key->x509) + if (s->session->sess_cert == NULL + || s->session->peer != s->session->sess_cert->peer_key->x509) /* can't happen */ { ssl2_return_error(s, SSL2_PE_UNDEFINED_ERROR); Index: ssl/s3_srvr.c --- ssl/s3_srvr.c 8 Feb 2006 19:16:33 -0000 1.126.2.7 +++ ssl/s3_srvr.c 26 Sep 2006 11:49:25 -0000 @@@@ -2003,7 +2003,7 @@@@ int ssl3_get_client_key_exchange(SSL *s) if (kssl_ctx->client_princ) { - int len = strlen(kssl_ctx->client_princ); + size_t len = strlen(kssl_ctx->client_princ); if ( len < SSL_MAX_KRB5_PRINCIPAL_LENGTH ) { s->session->krb5_client_princ_len = len; Index: ssl/ssl_lib.c --- ssl/ssl_lib.c 5 Dec 2005 17:32:21 -0000 1.133.2.6 +++ ssl/ssl_lib.c 26 Sep 2006 11:49:26 -0000 @@@@ -1219,7 +1219,7 @@@@ char *SSL_get_shared_ciphers(const SSL * c=sk_SSL_CIPHER_value(sk,i); for (cp=c->name; *cp; ) { - if (len-- == 0) + if (len-- <= 0) { *p='\0'; return(buf); @ 1.22.2.3 log @official fix for the the official security fix @ text @d152 1 a152 8 @@@@ -173,12 +173,18 @@@@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) { - BN_CTX *ctx; + BN_CTX *ctx = NULL; BN_MONT_CTX *mont=NULL; BIGNUM *tmp; @ 1.21 log @upgrading package: openssl 0.9.7g -> 0.9.8 @ text @a22 1 @ 1.20 log @apply a fix from OpenSSL 0.9.8's CVS versions to get the 'csp' package working: multiple variables on the same configuration line were incorrectly expanded @ text @a0 30 Index: Configure --- Configure.orig 2005-03-12 12:28:21 +0100 +++ Configure 2005-03-22 21:25:59 +0100 @@@@ -403,12 +403,23 @@@@ "linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/ia64.o::::asm/sha1-ia64.o::asm/rc4-ia64.o:::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-amd64.o:::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-em64t", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.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)", +"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-arm", "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-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 -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)", "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-sparc64","gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "FreeBSD-ia64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64-cpp.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"FreeBSD-amd64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/x86_64-gcc.o:::::::::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}", "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", d2 10 a11 40 --- config.orig 2005-02-06 14:09:51 +0100 +++ config 2005-03-22 21:24:34 +0100 @@@@ -656,6 +656,7 @@@@ sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; *86*-*-solaris2) OUT="solaris-x86-$CC" ;; *-*-sunos4) OUT="sunos-$CC" ;; + amd64*-*-freebsd*) OUT="FreeBSD-amd64" ;; alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;; sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;; ia64-*-freebsd*) OUT="FreeBSD-ia64" ;; @@@@ -663,7 +664,7 @@@@ *-freebsd[1-2]*) OUT="FreeBSD" ;; *86*-*-netbsd) OUT="NetBSD-x86" ;; sun3*-*-netbsd) OUT="NetBSD-m68" ;; - *-*-netbsd) OUT="NetBSD-sparc" ;; + *-*-netbsd) OUT="NetBSD-${MACHINE}" ;; alpha*-*-openbsd) OUT="OpenBSD-alpha" ;; *86*-*-openbsd) OUT="OpenBSD-i386" ;; m68k*-*-openbsd) OUT="OpenBSD-m68k" ;; @@@@ -678,7 +679,7 @@@@ *-*-openbsd) OUT="OpenBSD" ;; *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;; *-*-osf) OUT="alphaold-cc" ;; - *-*-tru64) OUT="alpha-cc" ;; + *-*-tru64) OUT="alpha-gcc" ;; *-*-OpenUNIX*) if [ "$CC" = "gcc" ]; then OUT="OpenUNIX-8-gcc" Index: crypto/bn/bn_prime.pl --- crypto/bn/bn_prime.pl.orig 2000-02-16 14:24:06 +0100 +++ crypto/bn/bn_prime.pl 2005-03-22 21:24:34 +0100 @@@@ -11,7 +11,7 @@@@ $p+=2; $s=int(sqrt($p)); - for ($i=0; $primes[$i]<=$s; $i++) + for ($i=0; defined($primes[$i]) && $primes[$i]<=$s; $i++) { next loop if (($p%$primes[$i]) == 0); } d13 3 a15 3 --- doc/crypto/des_modes.pod.orig 2002-03-05 16:30:13 +0100 +++ doc/crypto/des_modes.pod 2005-03-22 21:24:34 +0100 @@@@ -2,7 +2,7 @@@@ a23 12 Index: crypto/conf/conf_def.c --- crypto/conf/conf_def.c 6 May 2004 09:31:31 -0000 1.12.2.6 +++ crypto/conf/conf_def.c 6 May 2005 20:27:50 -0000 @@@@ -629,7 +629,7 @@@@ CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); goto err; } - BUF_MEM_grow_clean(buf,(strlen(p)+len-(e-from))); + BUF_MEM_grow_clean(buf,(strlen(p)+buf->length-(e-from))); while (*p) buf->data[to++]= *(p++); @ 1.20.2.1 log @apply Security Fix (CAN-2005-2969) @ text @a95 33 ----------------------------------------------------------------------------- Security Fix (CAN-2005-2969) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING (part of SSL_OP_ALL). This option used to disable the countermeasure against man-in-the-middle protocol-version rollback in the SSL 2.0 server implementation, which is a bad idea. Index: ssl/s23_srvr.c --- ssl/s23_srvr.c.orig 2002-11-13 16:43:17 +0100 +++ ssl/s23_srvr.c 2005-10-11 14:06:55 +0200 @@@@ -268,9 +268,6 @@@@ int n=0,j; int type=0; int v[2]; -#ifndef OPENSSL_NO_RSA - int use_sslv2_strong=0; -#endif if (s->state == SSL23_ST_SR_CLNT_HELLO_A) { @@@@ -519,9 +516,7 @@@@ } s->state=SSL2_ST_GET_CLIENT_HELLO_A; - if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) || - use_sslv2_strong || - (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3)) + if (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3) s->s2->ssl2_rollback=0; else /* reject SSL 2.0 session if client supports SSL 3.0 or TLS 1.0 @ 1.19 log @upgrading package: openssl 0.9.7e -> 0.9.7f @ text @d84 12 @ 1.18 log @Opening /dev/random with O_NOFOLLOW is not appropriate because at least under Solaris 10 O_NOFOLLOW exists and /dev/random is an (automatically) generated symlink. The same change was applied to OpenSSL 0.9.8-dev on 13-Jan-2005, too @ text @d1 30 a30 24 Index: crypto/bn/bn_prime.pl --- crypto/bn/bn_prime.pl.orig 2000-02-16 14:24:06.000000000 +0100 +++ crypto/bn/bn_prime.pl 2003-10-01 22:06:50.000000000 +0200 @@@@ -11,7 +11,7 @@@@ $p+=2; $s=int(sqrt($p)); - for ($i=0; $primes[$i]<=$s; $i++) + for ($i=0; defined($primes[$i]) && $primes[$i]<=$s; $i++) { next loop if (($p%$primes[$i]) == 0); } Index: doc/crypto/des_modes.pod --- doc/crypto/des_modes.pod.orig 2002-03-05 16:30:13.000000000 +0100 +++ doc/crypto/des_modes.pod 2003-10-01 22:06:50.000000000 +0200 @@@@ -2,7 +2,7 @@@@ =head1 NAME -Modes of DES - the variants of DES and other crypto algorithms of OpenSSL +des_modes - the variants of DES and other crypto algorithms of OpenSSL =head1 DESCRIPTION d32 3 a34 3 --- config.orig 2004-06-29 00:01:05 +0200 +++ config 2004-11-15 14:22:20 +0100 @@@@ -649,6 +649,7 @@@@ d42 1 a42 1 @@@@ -656,7 +657,7 @@@@ d51 1 a51 1 @@@@ -671,7 +672,7 @@@@ d60 24 a83 43 Index: Configure --- Configure.orig 2004-10-01 13:34:28 +0200 +++ Configure 2004-11-15 14:22:03 +0100 @@@@ -400,12 +400,23 @@@@ "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)", "linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.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)", +"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-arm", "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-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 -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)", "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-sparc64","gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "FreeBSD-ia64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64-cpp.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"FreeBSD-amd64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/x86_64-gcc.o:::::::::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}", "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Index: crypto/rand/rand_unix.c --- crypto/rand/rand_unix.c.orig 2003-12-27 17:01:52.000000000 +0100 +++ crypto/rand/rand_unix.c 2005-03-13 20:05:25.927977714 +0100 @@@@ -172,9 +172,6 @@@@ our controlling tty */ |O_NOCTTY #endif -#ifdef O_NOFOLLOW /* Fail if the file is a symbolic link */ - |O_NOFOLLOW -#endif )) >= 0) { struct timeval t = { 0, 10*1000 }; /* Spend 10ms on @ 1.17 log @add support for amd64-freebsd5.3 @ text @d84 13 @ 1.17.2.1 log @MFC: Opening /dev/random with O_NOFOLLOW is not appropriate because at least under Solaris 10 O_NOFOLLOW exists and /dev/random is an (automatically) generated symlink. The same change was applied to OpenSSL 0.9.8-dev on 13-Jan-2005, too @ text @a83 13 Index: crypto/rand/rand_unix.c --- crypto/rand/rand_unix.c.orig 2003-12-27 17:01:52.000000000 +0100 +++ crypto/rand/rand_unix.c 2005-03-13 20:05:25.927977714 +0100 @@@@ -172,9 +172,6 @@@@ our controlling tty */ |O_NOCTTY #endif -#ifdef O_NOFOLLOW /* Fail if the file is a symbolic link */ - |O_NOFOLLOW -#endif )) >= 0) { struct timeval t = { 0, 10*1000 }; /* Spend 10ms on @ 1.17.2.2 log @apply Security Fix (CAN-2005-2969) @ text @a96 34 ----------------------------------------------------------------------------- Security Fix (CAN-2005-2969) Remove the functionality of SSL_OP_MSIE_SSLV2_RSA_PADDING (part of SSL_OP_ALL). This option used to disable the countermeasure against man-in-the-middle protocol-version rollback in the SSL 2.0 server implementation, which is a bad idea. Index: ssl/s23_srvr.c --- ssl/s23_srvr.c.orig 2002-11-13 16:43:17 +0100 +++ ssl/s23_srvr.c 2005-10-11 14:06:55 +0200 @@@@ -268,9 +268,6 @@@@ int n=0,j; int type=0; int v[2]; -#ifndef OPENSSL_NO_RSA - int use_sslv2_strong=0; -#endif if (s->state == SSL23_ST_SR_CLNT_HELLO_A) { @@@@ -519,9 +516,7 @@@@ } s->state=SSL2_ST_GET_CLIENT_HELLO_A; - if ((s->options & SSL_OP_MSIE_SSLV2_RSA_PADDING) || - use_sslv2_strong || - (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3)) + if (s->options & SSL_OP_NO_TLSv1 && s->options & SSL_OP_NO_SSLv3) s->s2->ssl2_rollback=0; else /* reject SSL 2.0 session if client supports SSL 3.0 or TLS 1.0 @ 1.16 log @make it work on NetBSD-sparc64 @ text @d26 11 a36 3 --- config.orig 2004-01-21 10:58:17.000000000 +0100 +++ config 2004-06-04 17:00:10.000000000 +0200 @@@@ -647,7 +647,7 @@@@ d45 1 a45 1 @@@@ -662,7 +662,7 @@@@ d55 3 a57 3 --- Configure.orig 2004-06-07 08:57:58.000000000 +0200 +++ Configure 2004-06-07 08:58:43.000000000 +0200 @@@@ -393,9 +393,19 @@@@ d80 4 @ 1.15 log @we are requiring 'gcc' unconditionally for OpenSSL, so we have to use alpha-gcc instead of alpha-cc on Tru64 @ text @d27 10 a36 1 +++ config 2004-04-22 12:20:05.000000000 +0200 d46 26 @ 1.14 log @SA-2004.007-openssl; CAN-2004-0079, CAN-2004-0112 @ text @d25 12 @ 1.13 log @upgrading package: openssl 0.9.7b -> 0.9.7c @ text @a24 48 Index: doc/crypto/ui.pod --- doc/crypto/ui.pod.orig 2001-10-25 18:55:17.000000000 +0200 +++ doc/crypto/ui.pod 2003-10-01 22:07:42.000000000 +0200 @@@@ -5,7 +5,7 @@@@ UI_new, UI_new_method, UI_free, UI_add_input_string, UI_dup_input_string, UI_add_verify_string, UI_dup_verify_string, UI_add_input_boolean, UI_dup_input_boolean, UI_add_info_string, UI_dup_info_string, -UI_add_error_string, UI_dup_error_string, UI_construct_prompt +UI_add_error_string, UI_dup_error_string, UI_construct_prompt, UI_add_user_data, UI_get0_user_data, UI_get0_result, UI_process, UI_ctrl, UI_set_default_method, UI_get_default_method, UI_get_method, UI_set_method, UI_OpenSSL, ERR_load_UI_strings - New User Interface Index: doc/crypto/EVP_DigestInit.pod --- doc/crypto/EVP_DigestInit.pod.orig 2002-07-18 20:55:04.000000000 +0200 +++ doc/crypto/EVP_DigestInit.pod 2003-10-01 22:08:09.000000000 +0200 @@@@ -4,7 +4,7 @@@@ EVP_MD_CTX_init, EVP_MD_CTX_create, EVP_DigestInit_ex, EVP_DigestUpdate, EVP_DigestFinal_ex, EVP_MD_CTX_cleanup, EVP_MD_CTX_destroy, EVP_MAX_MD_SIZE, -EVP_MD_CTX_copy_ex EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, +EVP_MD_CTX_copy_ex, EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size, EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_md_null, EVP_md2, EVP_md5, EVP_sha, EVP_sha1, EVP_dss, EVP_dss1, EVP_mdc2, EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj - Index: Makefile.ssl --- Makefile.ssl.orig 2003-09-30 14:38:13.000000000 +0200 +++ Makefile.ssl 2003-10-01 22:06:50.000000000 +0200 @@@@ -834,7 +834,7 @@@@ fi; \ fi cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc install_docs: @@$(PERL) $(TOP)/util/mkdir-p.pl \ Index: Makefile.org --- Makefile.org.orig 2003-08-11 11:37:17.000000000 +0200 +++ Makefile.org 2003-10-01 22:06:50.000000000 +0200 @@@@ -832,7 +832,7 @@@@ fi; \ fi cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig - chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig + chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc install_docs: @@$(PERL) $(TOP)/util/mkdir-p.pl \ @ 1.13.2.1 log @SA-2004.007-openssl; CAN-2004-0079, CAN-2004-0112 @ text @a72 74 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0079 The do_change_cipher_spec function in OpenSSL 0.9.6c to 0.9.6k, and 0.9.7a to 0.9.7c, allows remote attackers to cause a denial of service (crash) via a crafted SSL/TLS handshake that causes a null-pointer assignment. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0112 The SSL/TLS handshaking code in OpenSSL 0.9.7a, 0.9.7b, and 0.9.7c, when using Kerberos ciphersuites, allows remote attackers to cause a denial of service (crash) via a crafted SSL/TLS handshake, which causes an out-of-bounds read. http://cvs.openssl.org/chngview?cn=12033 Index: ssl/s3_pkt.c =================================================================== RCS file: /e/openssl/cvs/openssl/ssl/s3_pkt.c,v retrieving revision 1.46.2.5 diff -u -p -u -r1.46.2.5 s3_pkt.c --- ssl/s3_pkt.c 19 Feb 2003 12:04:16 -0000 1.46.2.5 +++ ssl/s3_pkt.c 16 Mar 2004 14:09:14 -0000 @@@@ -1085,6 +1085,14 @@@@ start: goto err; } + /* Check we have a cipher to change to */ + if (s->s3->tmp.new_cipher == NULL) + { + i=SSL_AD_UNEXPECTED_MESSAGE; + SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY); + goto err; + } + rr->length=0; if (s->msg_callback) Index: ssl/s3_srvr.c =================================================================== RCS file: /e/openssl/cvs/openssl/ssl/s3_srvr.c,v retrieving revision 1.85.2.19 diff -u -p -u -r1.85.2.19 s3_srvr.c --- ssl/s3_srvr.c 27 Dec 2003 16:09:58 -0000 1.85.2.19 +++ ssl/s3_srvr.c 16 Mar 2004 14:09:15 -0000 @@@@ -1588,11 +1588,27 @@@@ static int ssl3_get_client_key_exchange( n2s(p,i); enc_ticket.length = i; + + if (n < enc_ticket.length + 6) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_DATA_LENGTH_TOO_LONG); + goto err; + } + enc_ticket.data = (char *)p; p+=enc_ticket.length; n2s(p,i); authenticator.length = i; + + if (n < enc_ticket.length + authenticator.length + 6) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_DATA_LENGTH_TOO_LONG); + goto err; + } + authenticator.data = (char *)p; p+=authenticator.length; @ 1.12 log @SA-2003.044-openssl; CAN-2003-0543, CAN-2003-0544, CAN-2003-0545 @ text @d1 3 a3 2 --- crypto/bn/bn_prime.pl.orig Wed Feb 16 14:24:06 2000 +++ crypto/bn/bn_prime.pl Wed Aug 6 10:49:34 2003 d13 60 a72 66 ----------------------------------------------------------------------------- Security Bugfixes OpenPKG-SA-2003.044-openssl http://www.openssl.org/news/secadv_20030930.txt CAN-2003-0543, CAN-2003-0544, CAN-2003-0545 --- crypto/asn1/asn1_lib.c Sun Sep 28 14:20:55 2003 +++ crypto/asn1/asn1_lib.c Fri Sep 26 13:51:38 2003 @@@@ -104,10 +104,12 @@@@ l<<=7L; l|= *(p++)&0x7f; if (--max == 0) goto err; + if (l > (INT_MAX >> 7L)) goto err; } l<<=7L; l|= *(p++)&0x7f; tag=(int)l; + if (--max == 0) goto err; } else { --- crypto/asn1/tasn_dec.c Sun Sep 28 14:20:55 2003 +++ crypto/asn1/tasn_dec.c Fri Sep 26 13:51:38 2003 @@@@ -691,6 +691,7 @@@@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) { + ASN1_VALUE **opval = NULL; ASN1_STRING *stmp; ASN1_TYPE *typ = NULL; int ret = 0; @@@@ -705,6 +706,7 @@@@ *pval = (ASN1_VALUE *)typ; } else typ = (ASN1_TYPE *)*pval; if(utype != typ->type) ASN1_TYPE_set(typ, utype, NULL); + opval = pval; pval = (ASN1_VALUE **)&typ->value.ptr; } switch(utype) { @@@@ -796,7 +798,12 @@@@ ret = 1; err: - if(!ret) ASN1_TYPE_free(typ); + if(!ret) + { + ASN1_TYPE_free(typ); + if (opval) + *opval = NULL; + } return ret; } --- crypto/x509/x509_vfy.c Sun Sep 28 14:20:55 2003 +++ crypto/x509/x509_vfy.c Fri Sep 26 13:51:38 2003 @@@@ -674,7 +674,7 @@@@ ok=(*cb)(0,ctx); if (!ok) goto end; } - if (X509_verify(xs,pkey) <= 0) + else if (X509_verify(xs,pkey) <= 0) /* XXX For the final trusted self-signed cert, * this is a waste of time. That check should * optional so that e.g. 'openssl x509' can be @ 1.11 log @not all platform like zero modulus operations, so fix the loop @ text @d12 66 @ 1.10 log @upgrading package: openssl 0.9.7a -> 0.9.7b @ text @d1 10 a10 35 Index: crypto/rsa/rsa_eay.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_eay.c,v retrieving revision 1.28.2.3 diff -u -r1.28.2.3 rsa_eay.c --- crypto/rsa/rsa_eay.c 30 Jan 2003 17:37:46 -0000 1.28.2.3 +++ crypto/rsa/rsa_eay.c 16 Mar 2003 10:34:13 -0000 @@@@ -195,6 +195,25 @@@@ return(r); } +static int rsa_eay_blinding(RSA *rsa, BN_CTX *ctx) + { + int ret = 1; + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + /* Check again inside the lock - the macro's check is racey */ + if(rsa->blinding == NULL) + ret = RSA_blinding_on(rsa, ctx); + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + return ret; + } + +#define BLINDING_HELPER(rsa, ctx, err_instr) \ + do { \ + if(((rsa)->flags & RSA_FLAG_BLINDING) && \ + ((rsa)->blinding == NULL) && \ + !rsa_eay_blinding(rsa, ctx)) \ + err_instr \ + } while(0) + /* signing */ static int RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) @@@@ -239,8 +258,8 @@@@ goto err; a11 97 - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; @@@@ -318,8 +337,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; Index: crypto/rsa/rsa_lib.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_lib.c,v retrieving revision 1.30.2.2 diff -u -r1.30.2.2 rsa_lib.c --- crypto/rsa/rsa_lib.c 30 Jan 2003 17:37:46 -0000 1.30.2.2 +++ crypto/rsa/rsa_lib.c 16 Mar 2003 10:34:13 -0000 @@@@ -72,7 +72,13 @@@@ RSA *RSA_new(void) { - return(RSA_new_method(NULL)); + RSA *r=RSA_new_method(NULL); + +#ifndef OPENSSL_NO_FORCE_RSA_BLINDING + r->flags|=RSA_FLAG_BLINDING; +#endif + + return r; } void RSA_set_default_method(const RSA_METHOD *meth) Index: ssl/s3_srvr.c ============================================================================ $ cvs diff -u -r1.104 -r1.105 s3_srvr.c --- ssl/s3_srvr.c 28 Feb 2003 15:37:10 -0000 1.104 +++ ssl/s3_srvr.c 19 Mar 2003 19:19:53 -0000 1.105 @@@@ -1684,7 +1684,7 @@@@ if (i != SSL_MAX_MASTER_KEY_LENGTH) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); */ } if ((al == -1) && !((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff)))) @@@@ -1700,30 +1700,29 @@@@ (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff)))) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); - goto f_err; + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); */ + + /* The Klima-Pokorny-Rosa extension of Bleichenbacher's attack + * (http://eprint.iacr.org/2003/052/) exploits the version + * number check as a "bad version oracle" -- an alert would + * reveal that the plaintext corresponding to some ciphertext + * made up by the adversary is properly formatted except + * that the version number is wrong. To avoid such attacks, + * we should treat this just like any other decryption error. */ + p[0] = (char)(int) "CAN-2003-0131 patch 2003-03-20"; } } if (al != -1) { -#if 0 - goto f_err; -#else /* Some decryption failure -- use random value instead as countermeasure * against Bleichenbacher's attack on PKCS #1 v1.5 RSA padding - * (see RFC 2246, section 7.4.7.1). - * But note that due to length and protocol version checking, the - * attack is impractical anyway (see section 5 in D. Bleichenbacher: - * "Chosen Ciphertext Attacks Against Protocols Based on the RSA - * Encryption Standard PKCS #1", CRYPTO '98, LNCS 1462, pp. 1-12). - */ + * (see RFC 2246, section 7.4.7.1). */ ERR_clear_error(); i = SSL_MAX_MASTER_KEY_LENGTH; p[0] = s->client_version >> 8; p[1] = s->client_version & 0xff; RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */ -#endif } s->session->master_key_length= @ 1.9 log @include OpenSSL security fix (OpenPKG-SA-2003.026-openssl) @ text @@ 1.8 log @apply official OpenSSL RSA blinding security patch @ text @d78 56 @ 1.7 log @Upgrade to OpenSSL 0.9.7! This is not a small upgrade as with the 0.9.6 versions, hence I performed a full rebuild-test of all packages which depend on "openssl". The result is promising: 1. packages which failed (I'll investigate): - w3m/w3m.spec (https://www.openssl.org/ -> Segmentation fault (core dumped)) - curl/curl.spec (conflicting types for `ENGINE') - imapd/imapd.spec ( Cannot continue without libsasl2. because of DES API changes in OpenSSL and hence sasl) - rdesktop/rdesktop.spec (/cw/include/openssl/bn.h:234: parse error before "BN_ULONG") 2. packages which failed, but not because of OpenSSL: . cadaver/cadaver.spec (multiple definition of `optarg') . cpu/cpu.spec (undefined reference to `ldap_init') . dsniff/dsniff.spec (`ETH_H' undeclared (first use in this function) 3. packages which compiles correctly: + apache/apache.spec + bind/bind.spec + c-client/c-client.spec + cfengine/cfengine.spec + easysoap/easysoap.spec + ethereal/ethereal.spec + exim/exim.spec (but: tls-openssl.c:343: warning: assignment from incompatible pointer type) + fetchmail/fetchmail.spec + inn/inn.spec + linc/linc.spec + links/links.spec + lynx/lynx.spec + mozilla/mozilla.spec + mutt/mutt.spec + neon/neon.spec + openldap/openldap.spec + openssh/openssh.spec + openvpn/openvpn.spec + perl-ssl/perl-ssl.spec + postfix/postfix.spec + postgresql/postgresql.spec + qpopper/qpopper.spec + samba/samba.spec + sasl/sasl.spec + scanssh/scanssh.spec + sendmail/sendmail.spec + siege/siege.spec + sitecopy/sitecopy.spec + snmp/snmp.spec + socat/socat.spec + stunnel/stunnel.spec + subversion/subversion.spec + sysmon/sysmon.spec + tcpdump/tcpdump.spec + wget/wget.spec @ text @d1 77 a77 31 --- config.orig Fri Mar 15 17:47:23 2002 +++ config Sat Jun 29 09:55:45 2002 @@@@ -562,6 +564,7 @@@@ *-freebsd[1-2]*) OUT="FreeBSD" ;; *86*-*-netbsd) OUT="NetBSD-x86" ;; sun3*-*-netbsd) OUT="NetBSD-m68" ;; + sparc64-*-netbsd) OUT="NetBSD-sparc64" ;; *-*-netbsd) OUT="NetBSD-sparc" ;; *86*-*-openbsd) OUT="OpenBSD-x86" ;; alpha*-*-openbsd) OUT="OpenBSD-alpha" ;; --- Configure.orig Fri May 10 01:05:49 2002 +++ Configure Sat Jun 29 09:56:35 2002 @@@@ -346,12 +346,13 @@@@ "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-sparc64","gcc:-DTERMIOS -O3 -fomit-frame-pointer -m64 -mcpu=v9 -Wall -DB_ENDIAN::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC1::::::::::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}", -"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -march=i486 -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 -march=i486 -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 -march=i486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", +"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -march=i486::(unknown)::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}", +"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown):-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "nextstep", "cc:-O -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", "nextstep3.3", "cc:-O3 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # NCR MP-RAS UNIX ver 02.03.01 @ 1.7.2.1 log @MFC: apply official OpenSSL security patch for RSA blinding @ text @d1 31 a31 77 Index: crypto/rsa/rsa_eay.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_eay.c,v retrieving revision 1.28.2.3 diff -u -r1.28.2.3 rsa_eay.c --- crypto/rsa/rsa_eay.c 30 Jan 2003 17:37:46 -0000 1.28.2.3 +++ crypto/rsa/rsa_eay.c 16 Mar 2003 10:34:13 -0000 @@@@ -195,6 +195,25 @@@@ return(r); } +static int rsa_eay_blinding(RSA *rsa, BN_CTX *ctx) + { + int ret = 1; + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + /* Check again inside the lock - the macro's check is racey */ + if(rsa->blinding == NULL) + ret = RSA_blinding_on(rsa, ctx); + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + return ret; + } + +#define BLINDING_HELPER(rsa, ctx, err_instr) \ + do { \ + if(((rsa)->flags & RSA_FLAG_BLINDING) && \ + ((rsa)->blinding == NULL) && \ + !rsa_eay_blinding(rsa, ctx)) \ + err_instr \ + } while(0) + /* signing */ static int RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) @@@@ -239,8 +258,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; @@@@ -318,8 +337,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; Index: crypto/rsa/rsa_lib.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_lib.c,v retrieving revision 1.30.2.2 diff -u -r1.30.2.2 rsa_lib.c --- crypto/rsa/rsa_lib.c 30 Jan 2003 17:37:46 -0000 1.30.2.2 +++ crypto/rsa/rsa_lib.c 16 Mar 2003 10:34:13 -0000 @@@@ -72,7 +72,13 @@@@ RSA *RSA_new(void) { - return(RSA_new_method(NULL)); + RSA *r=RSA_new_method(NULL); + +#ifndef OPENSSL_NO_FORCE_RSA_BLINDING + r->flags|=RSA_FLAG_BLINDING; +#endif + + return r; } void RSA_set_default_method(const RSA_METHOD *meth) @ 1.7.2.2 log @include OpenSSL security fix (OpenPKG-SA-2003.026-openssl) @ text @a77 56 Index: ssl/s3_srvr.c ============================================================================ $ cvs diff -u -r1.104 -r1.105 s3_srvr.c --- ssl/s3_srvr.c 28 Feb 2003 15:37:10 -0000 1.104 +++ ssl/s3_srvr.c 19 Mar 2003 19:19:53 -0000 1.105 @@@@ -1684,7 +1684,7 @@@@ if (i != SSL_MAX_MASTER_KEY_LENGTH) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); */ } if ((al == -1) && !((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff)))) @@@@ -1700,30 +1700,29 @@@@ (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff)))) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); - goto f_err; + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); */ + + /* The Klima-Pokorny-Rosa extension of Bleichenbacher's attack + * (http://eprint.iacr.org/2003/052/) exploits the version + * number check as a "bad version oracle" -- an alert would + * reveal that the plaintext corresponding to some ciphertext + * made up by the adversary is properly formatted except + * that the version number is wrong. To avoid such attacks, + * we should treat this just like any other decryption error. */ + p[0] = (char)(int) "CAN-2003-0131 patch 2003-03-20"; } } if (al != -1) { -#if 0 - goto f_err; -#else /* Some decryption failure -- use random value instead as countermeasure * against Bleichenbacher's attack on PKCS #1 v1.5 RSA padding - * (see RFC 2246, section 7.4.7.1). - * But note that due to length and protocol version checking, the - * attack is impractical anyway (see section 5 in D. Bleichenbacher: - * "Chosen Ciphertext Attacks Against Protocols Based on the RSA - * Encryption Standard PKCS #1", CRYPTO '98, LNCS 1462, pp. 1-12). - */ + * (see RFC 2246, section 7.4.7.1). */ ERR_clear_error(); i = SSL_MAX_MASTER_KEY_LENGTH; p[0] = s->client_version >> 8; p[1] = s->client_version & 0xff; RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */ -#endif } s->session->master_key_length= @ 1.7.2.3 log @mass Merge-From-CURRENT (MFC) in preparation for OpenPKG 1.3 [class CORE only] @ text @@ 1.7.2.3.2.1 log @MFC: make sure some Perl versions do not break on division by zero @ text @d1 35 a35 10 --- crypto/bn/bn_prime.pl.orig Wed Feb 16 14:24:06 2000 +++ crypto/bn/bn_prime.pl Wed Aug 6 10:49:34 2003 @@@@ -11,7 +11,7 @@@@ $p+=2; $s=int(sqrt($p)); - for ($i=0; $primes[$i]<=$s; $i++) + for ($i=0; defined($primes[$i]) && $primes[$i]<=$s; $i++) { next loop if (($p%$primes[$i]) == 0); d37 97 @ 1.7.2.3.2.2 log @SA-2003.044-openssl; CAN-2003-0543, CAN-2003-0544, CAN-2003-0545 @ text @a11 66 ----------------------------------------------------------------------------- Security Bugfixes OpenPKG-SA-2003.044-openssl http://www.openssl.org/news/secadv_20030930.txt CAN-2003-0543, CAN-2003-0544, CAN-2003-0545 --- crypto/asn1/asn1_lib.c Sun Sep 28 14:20:55 2003 +++ crypto/asn1/asn1_lib.c Fri Sep 26 13:51:38 2003 @@@@ -104,10 +104,12 @@@@ l<<=7L; l|= *(p++)&0x7f; if (--max == 0) goto err; + if (l > (INT_MAX >> 7L)) goto err; } l<<=7L; l|= *(p++)&0x7f; tag=(int)l; + if (--max == 0) goto err; } else { --- crypto/asn1/tasn_dec.c Sun Sep 28 14:20:55 2003 +++ crypto/asn1/tasn_dec.c Fri Sep 26 13:51:38 2003 @@@@ -691,6 +691,7 @@@@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) { + ASN1_VALUE **opval = NULL; ASN1_STRING *stmp; ASN1_TYPE *typ = NULL; int ret = 0; @@@@ -705,6 +706,7 @@@@ *pval = (ASN1_VALUE *)typ; } else typ = (ASN1_TYPE *)*pval; if(utype != typ->type) ASN1_TYPE_set(typ, utype, NULL); + opval = pval; pval = (ASN1_VALUE **)&typ->value.ptr; } switch(utype) { @@@@ -796,7 +798,12 @@@@ ret = 1; err: - if(!ret) ASN1_TYPE_free(typ); + if(!ret) + { + ASN1_TYPE_free(typ); + if (opval) + *opval = NULL; + } return ret; } --- crypto/x509/x509_vfy.c Sun Sep 28 14:20:55 2003 +++ crypto/x509/x509_vfy.c Fri Sep 26 13:51:38 2003 @@@@ -674,7 +674,7 @@@@ ok=(*cb)(0,ctx); if (!ok) goto end; } - if (X509_verify(xs,pkey) <= 0) + else if (X509_verify(xs,pkey) <= 0) /* XXX For the final trusted self-signed cert, * this is a waste of time. That check should * optional so that e.g. 'openssl x509' can be @ 1.7.2.3.2.3 log @SA-2004.007-openssl; CAN-2004-0079, CAN-2004-0112 @ text @a77 76 ----------------------------------------------------------------------------- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0079 The do_change_cipher_spec function in OpenSSL 0.9.6c to 0.9.6k, and 0.9.7a to 0.9.7c, allows remote attackers to cause a denial of service (crash) via a crafted SSL/TLS handshake that causes a null-pointer assignment. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0112 The SSL/TLS handshaking code in OpenSSL 0.9.7a, 0.9.7b, and 0.9.7c, when using Kerberos ciphersuites, allows remote attackers to cause a denial of service (crash) via a crafted SSL/TLS handshake, which causes an out-of-bounds read. http://cvs.openssl.org/chngview?cn=12033 Index: ssl/s3_pkt.c =================================================================== RCS file: /e/openssl/cvs/openssl/ssl/s3_pkt.c,v retrieving revision 1.46.2.5 diff -u -p -u -r1.46.2.5 s3_pkt.c --- ssl/s3_pkt.c 19 Feb 2003 12:04:16 -0000 1.46.2.5 +++ ssl/s3_pkt.c 16 Mar 2004 14:09:14 -0000 @@@@ -1085,6 +1085,14 @@@@ start: goto err; } + /* Check we have a cipher to change to */ + if (s->s3->tmp.new_cipher == NULL) + { + i=SSL_AD_UNEXPECTED_MESSAGE; + SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY); + goto err; + } + rr->length=0; if (s->msg_callback) Index: ssl/s3_srvr.c =================================================================== RCS file: /e/openssl/cvs/openssl/ssl/s3_srvr.c,v retrieving revision 1.85.2.19 diff -u -p -u -r1.85.2.19 s3_srvr.c --- ssl/s3_srvr.c 27 Dec 2003 16:09:58 -0000 1.85.2.19 +++ ssl/s3_srvr.c 16 Mar 2004 14:09:15 -0000 @@@@ -1588,11 +1588,27 @@@@ static int ssl3_get_client_key_exchange( n2s(p,i); enc_ticket.length = i; + + if (n < enc_ticket.length + 6) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_DATA_LENGTH_TOO_LONG); + goto err; + } + enc_ticket.data = (char *)p; p+=enc_ticket.length; n2s(p,i); authenticator.length = i; + + if (n < enc_ticket.length + authenticator.length + 6) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + SSL_R_DATA_LENGTH_TOO_LONG); + goto err; + } + authenticator.data = (char *)p; p+=authenticator.length; @ 1.7.4.1 log @add security patch (OpenPKG-SA-2003.013, CAN-2003-0078) @ text @d1 31 a31 98 Index: ssl/s3_pkt.c =================================================================== RCS file: /e/openssl/cvs/openssl/ssl/s3_pkt.c,v retrieving revision 1.46.2.4 diff -u -r1.46.2.4 s3_pkt.c --- ssl/s3_pkt.c 10 Jul 2002 06:57:49 -0000 1.46.2.4 +++ ssl/s3_pkt.c 18 Feb 2003 16:38:29 -0000 @@@@ -238,6 +238,8 @@@@ unsigned int mac_size; int clear=0; size_t extra; + int decryption_failed_or_bad_record_mac = 0; + unsigned char *mac = NULL; rr= &(s->s3->rrec); sess=s->session; @@@@ -353,8 +355,11 @@@@ /* SSLerr() and ssl3_send_alert() have been called */ goto err; - /* otherwise enc_err == -1 */ - goto decryption_failed_or_bad_record_mac; + /* Otherwise enc_err == -1, which indicates bad padding + * (rec->length has not been changed in this case). + * To minimize information leaked via timing, we will perform + * the MAC computation anyway. */ + decryption_failed_or_bad_record_mac = 1; } #ifdef TLS_DEBUG @@@@ -380,28 +385,46 @@@@ SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG); goto f_err; #else - goto decryption_failed_or_bad_record_mac; + decryption_failed_or_bad_record_mac = 1; #endif } /* check the MAC for rr->input (it's in mac_size bytes at the tail) */ - if (rr->length < mac_size) + if (rr->length >= mac_size) { + rr->length -= mac_size; + mac = &rr->data[rr->length]; + } + else + { + /* record (minus padding) is too short to contain a MAC */ #if 0 /* OK only for stream ciphers */ al=SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT); goto f_err; #else - goto decryption_failed_or_bad_record_mac; + decryption_failed_or_bad_record_mac = 1; + rr->length = 0; #endif } - rr->length-=mac_size; i=s->method->ssl3_enc->mac(s,md,0); - if (memcmp(md,&(rr->data[rr->length]),mac_size) != 0) + if (mac == NULL || memcmp(md, mac, mac_size) != 0) { - goto decryption_failed_or_bad_record_mac; + decryption_failed_or_bad_record_mac = 1; } } + if (decryption_failed_or_bad_record_mac) + { + /* A separate 'decryption_failed' alert was introduced with TLS 1.0, + * SSL 3.0 only has 'bad_record_mac'. But unless a decryption + * failure is directly visible from the ciphertext anyway, + * we should not reveal which kind of error occured -- this + * might become visible to an attacker (e.g. via a logfile) */ + al=SSL_AD_BAD_RECORD_MAC; + SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC); + goto f_err; + } + /* r->length is now just compressed */ if (s->expand != NULL) { @@@@ -443,14 +466,6 @@@@ return(1); -decryption_failed_or_bad_record_mac: - /* Separate 'decryption_failed' alert was introduced with TLS 1.0, - * SSL 3.0 only has 'bad_record_mac'. But unless a decryption - * failure is directly visible from the ciphertext anyway, - * we should not reveal which kind of error occured -- this - * might become visible to an attacker (e.g. via logfile) */ - al=SSL_AD_BAD_RECORD_MAC; - SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC); f_err: ssl3_send_alert(s,SSL3_AL_FATAL,al); err: @ 1.7.4.2 log @MFS: apply official OpenSSL security patch for RSA blinding @ text @a98 77 Index: crypto/rsa/rsa_eay.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_eay.c,v retrieving revision 1.28.2.3 diff -u -r1.28.2.3 rsa_eay.c --- crypto/rsa/rsa_eay.c 30 Jan 2003 17:37:46 -0000 1.28.2.3 +++ crypto/rsa/rsa_eay.c 16 Mar 2003 10:34:13 -0000 @@@@ -195,6 +195,25 @@@@ return(r); } +static int rsa_eay_blinding(RSA *rsa, BN_CTX *ctx) + { + int ret = 1; + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + /* Check again inside the lock - the macro's check is racey */ + if(rsa->blinding == NULL) + ret = RSA_blinding_on(rsa, ctx); + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + return ret; + } + +#define BLINDING_HELPER(rsa, ctx, err_instr) \ + do { \ + if(((rsa)->flags & RSA_FLAG_BLINDING) && \ + ((rsa)->blinding == NULL) && \ + !rsa_eay_blinding(rsa, ctx)) \ + err_instr \ + } while(0) + /* signing */ static int RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) @@@@ -239,8 +258,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; @@@@ -318,8 +337,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; Index: crypto/rsa/rsa_lib.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_lib.c,v retrieving revision 1.30.2.2 diff -u -r1.30.2.2 rsa_lib.c --- crypto/rsa/rsa_lib.c 30 Jan 2003 17:37:46 -0000 1.30.2.2 +++ crypto/rsa/rsa_lib.c 16 Mar 2003 10:34:13 -0000 @@@@ -72,7 +72,13 @@@@ RSA *RSA_new(void) { - return(RSA_new_method(NULL)); + RSA *r=RSA_new_method(NULL); + +#ifndef OPENSSL_NO_FORCE_RSA_BLINDING + r->flags|=RSA_FLAG_BLINDING; +#endif + + return r; } void RSA_set_default_method(const RSA_METHOD *meth) @ 1.7.4.3 log @include OpenSSL security fix (OpenPKG-SA-2003.026-openssl) @ text @a175 56 Index: ssl/s3_srvr.c ============================================================================ $ cvs diff -u -r1.104 -r1.105 s3_srvr.c --- ssl/s3_srvr.c 28 Feb 2003 15:37:10 -0000 1.104 +++ ssl/s3_srvr.c 19 Mar 2003 19:19:53 -0000 1.105 @@@@ -1684,7 +1684,7 @@@@ if (i != SSL_MAX_MASTER_KEY_LENGTH) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); */ } if ((al == -1) && !((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff)))) @@@@ -1700,30 +1700,29 @@@@ (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff)))) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); - goto f_err; + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); */ + + /* The Klima-Pokorny-Rosa extension of Bleichenbacher's attack + * (http://eprint.iacr.org/2003/052/) exploits the version + * number check as a "bad version oracle" -- an alert would + * reveal that the plaintext corresponding to some ciphertext + * made up by the adversary is properly formatted except + * that the version number is wrong. To avoid such attacks, + * we should treat this just like any other decryption error. */ + p[0] = (char)(int) "CAN-2003-0131 patch 2003-03-20"; } } if (al != -1) { -#if 0 - goto f_err; -#else /* Some decryption failure -- use random value instead as countermeasure * against Bleichenbacher's attack on PKCS #1 v1.5 RSA padding - * (see RFC 2246, section 7.4.7.1). - * But note that due to length and protocol version checking, the - * attack is impractical anyway (see section 5 in D. Bleichenbacher: - * "Chosen Ciphertext Attacks Against Protocols Based on the RSA - * Encryption Standard PKCS #1", CRYPTO '98, LNCS 1462, pp. 1-12). - */ + * (see RFC 2246, section 7.4.7.1). */ ERR_clear_error(); i = SSL_MAX_MASTER_KEY_LENGTH; p[0] = s->client_version >> 8; p[1] = s->client_version & 0xff; RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */ -#endif } s->session->master_key_length= @ 1.7.4.4 log @SA-2003.044-openssl; CAN-2003-0543, CAN-2003-0544, CAN-2003-0545 @ text @a231 66 ----------------------------------------------------------------------------- Security Bugfixes OpenPKG-SA-2003.044-openssl http://www.openssl.org/news/secadv_20030930.txt CAN-2003-0543, CAN-2003-0544, CAN-2003-0545 --- crypto/asn1/asn1_lib.c Sun Sep 28 14:20:55 2003 +++ crypto/asn1/asn1_lib.c Fri Sep 26 13:51:38 2003 @@@@ -104,10 +104,12 @@@@ l<<=7L; l|= *(p++)&0x7f; if (--max == 0) goto err; + if (l > (INT_MAX >> 7L)) goto err; } l<<=7L; l|= *(p++)&0x7f; tag=(int)l; + if (--max == 0) goto err; } else { --- crypto/asn1/tasn_dec.c Sun Sep 28 14:20:55 2003 +++ crypto/asn1/tasn_dec.c Fri Sep 26 13:51:38 2003 @@@@ -691,6 +691,7 @@@@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it) { + ASN1_VALUE **opval = NULL; ASN1_STRING *stmp; ASN1_TYPE *typ = NULL; int ret = 0; @@@@ -705,6 +706,7 @@@@ *pval = (ASN1_VALUE *)typ; } else typ = (ASN1_TYPE *)*pval; if(utype != typ->type) ASN1_TYPE_set(typ, utype, NULL); + opval = pval; pval = (ASN1_VALUE **)&typ->value.ptr; } switch(utype) { @@@@ -796,7 +798,12 @@@@ ret = 1; err: - if(!ret) ASN1_TYPE_free(typ); + if(!ret) + { + ASN1_TYPE_free(typ); + if (opval) + *opval = NULL; + } return ret; } --- crypto/x509/x509_vfy.c Sun Sep 28 14:20:55 2003 +++ crypto/x509/x509_vfy.c Fri Sep 26 13:51:38 2003 @@@@ -674,7 +674,7 @@@@ ok=(*cb)(0,ctx); if (!ok) goto end; } - if (X509_verify(xs,pkey) <= 0) + else if (X509_verify(xs,pkey) <= 0) /* XXX For the final trusted self-signed cert, * this is a waste of time. That check should * optional so that e.g. 'openssl x509' can be @ 1.6 log @upgrading package: openssl 0.9.6f -> 0.9.6g @ text @@ 1.6.2.1 log @SA-2003.013-openssl; CAN-2003-0078 @ text @a31 93 --- ssl/s3_pkt.c 6 May 2002 10:42:56 -0000 1.37.2.10 +++ ssl/s3_pkt.c 18 Feb 2003 16:38:22 -0000 @@@@ -238,6 +238,8 @@@@ unsigned int mac_size; int clear=0; size_t extra; + int decryption_failed_or_bad_record_mac = 0; + unsigned char *mac = NULL; rr= &(s->s3->rrec); sess=s->session; @@@@ -353,8 +355,11 @@@@ /* SSLerr() and ssl3_send_alert() have been called */ goto err; - /* otherwise enc_err == -1 */ - goto decryption_failed_or_bad_record_mac; + /* Otherwise enc_err == -1, which indicates bad padding + * (rec->length has not been changed in this case). + * To minimize information leaked via timing, we will perform + * the MAC computation anyway. */ + decryption_failed_or_bad_record_mac = 1; } #ifdef TLS_DEBUG @@@@ -380,28 +385,46 @@@@ SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG); goto f_err; #else - goto decryption_failed_or_bad_record_mac; + decryption_failed_or_bad_record_mac = 1; #endif } /* check the MAC for rr->input (it's in mac_size bytes at the tail) */ - if (rr->length < mac_size) + if (rr->length >= mac_size) { + rr->length -= mac_size; + mac = &rr->data[rr->length]; + } + else + { + /* record (minus padding) is too short to contain a MAC */ #if 0 /* OK only for stream ciphers */ al=SSL_AD_DECODE_ERROR; SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT); goto f_err; #else - goto decryption_failed_or_bad_record_mac; + decryption_failed_or_bad_record_mac = 1; + rr->length = 0; #endif } - rr->length-=mac_size; i=s->method->ssl3_enc->mac(s,md,0); - if (memcmp(md,&(rr->data[rr->length]),mac_size) != 0) + if (mac == NULL || memcmp(md, mac, mac_size) != 0) { - goto decryption_failed_or_bad_record_mac; + decryption_failed_or_bad_record_mac = 1; } } + if (decryption_failed_or_bad_record_mac) + { + /* A separate 'decryption_failed' alert was introduced with TLS 1.0, + * SSL 3.0 only has 'bad_record_mac'. But unless a decryption + * failure is directly visible from the ciphertext anyway, + * we should not reveal which kind of error occured -- this + * might become visible to an attacker (e.g. via a logfile) */ + al=SSL_AD_BAD_RECORD_MAC; + SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC); + goto f_err; + } + /* r->length is now just compressed */ if (s->expand != NULL) { @@@@ -443,14 +466,6 @@@@ return(1); -decryption_failed_or_bad_record_mac: - /* Separate 'decryption_failed' alert was introduced with TLS 1.0, - * SSL 3.0 only has 'bad_record_mac'. But unless a decryption - * failure is directly visible from the ciphertext anyway, - * we should not reveal which kind of error occured -- this - * might become visible to an attacker (e.g. via logfile) */ - al=SSL_AD_BAD_RECORD_MAC; - SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC); f_err: ssl3_send_alert(s,SSL3_AL_FATAL,al); err: @ 1.6.2.2 log @MFS: apply official OpenSSL security patch for RSA blinding @ text @a124 77 Index: crypto/rsa/rsa_eay.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_eay.c,v retrieving revision 1.28.2.3 diff -u -r1.28.2.3 rsa_eay.c --- crypto/rsa/rsa_eay.c 30 Jan 2003 17:37:46 -0000 1.28.2.3 +++ crypto/rsa/rsa_eay.c 16 Mar 2003 10:34:13 -0000 @@@@ -195,6 +195,25 @@@@ return(r); } +static int rsa_eay_blinding(RSA *rsa, BN_CTX *ctx) + { + int ret = 1; + CRYPTO_w_lock(CRYPTO_LOCK_RSA); + /* Check again inside the lock - the macro's check is racey */ + if(rsa->blinding == NULL) + ret = RSA_blinding_on(rsa, ctx); + CRYPTO_w_unlock(CRYPTO_LOCK_RSA); + return ret; + } + +#define BLINDING_HELPER(rsa, ctx, err_instr) \ + do { \ + if(((rsa)->flags & RSA_FLAG_BLINDING) && \ + ((rsa)->blinding == NULL) && \ + !rsa_eay_blinding(rsa, ctx)) \ + err_instr \ + } while(0) + /* signing */ static int RSA_eay_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) @@@@ -239,8 +258,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; @@@@ -318,8 +337,8 @@@@ goto err; } - if ((rsa->flags & RSA_FLAG_BLINDING) && (rsa->blinding == NULL)) - RSA_blinding_on(rsa,ctx); + BLINDING_HELPER(rsa, ctx, goto err;); + if (rsa->flags & RSA_FLAG_BLINDING) if (!BN_BLINDING_convert(&f,rsa->blinding,ctx)) goto err; Index: crypto/rsa/rsa_lib.c =================================================================== RCS file: /e/openssl/cvs/openssl/crypto/rsa/rsa_lib.c,v retrieving revision 1.30.2.2 diff -u -r1.30.2.2 rsa_lib.c --- crypto/rsa/rsa_lib.c 30 Jan 2003 17:37:46 -0000 1.30.2.2 +++ crypto/rsa/rsa_lib.c 16 Mar 2003 10:34:13 -0000 @@@@ -72,7 +72,13 @@@@ RSA *RSA_new(void) { - return(RSA_new_method(NULL)); + RSA *r=RSA_new_method(NULL); + +#ifndef OPENSSL_NO_FORCE_RSA_BLINDING + r->flags|=RSA_FLAG_BLINDING; +#endif + + return r; } void RSA_set_default_method(const RSA_METHOD *meth) @ 1.6.2.3 log @include OpenSSL security fix (OpenPKG-SA-2003.026-openssl) @ text @a201 56 Index: ssl/s3_srvr.c ============================================================================ $ cvs diff -u -r1.104 -r1.105 s3_srvr.c --- ssl/s3_srvr.c 28 Feb 2003 15:37:10 -0000 1.104 +++ ssl/s3_srvr.c 19 Mar 2003 19:19:53 -0000 1.105 @@@@ -1684,7 +1684,7 @@@@ if (i != SSL_MAX_MASTER_KEY_LENGTH) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_RSA_DECRYPT); */ } if ((al == -1) && !((p[0] == (s->client_version>>8)) && (p[1] == (s->client_version & 0xff)))) @@@@ -1700,30 +1700,29 @@@@ (p[0] == (s->version>>8)) && (p[1] == (s->version & 0xff)))) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); - goto f_err; + /* SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_BAD_PROTOCOL_VERSION_NUMBER); */ + + /* The Klima-Pokorny-Rosa extension of Bleichenbacher's attack + * (http://eprint.iacr.org/2003/052/) exploits the version + * number check as a "bad version oracle" -- an alert would + * reveal that the plaintext corresponding to some ciphertext + * made up by the adversary is properly formatted except + * that the version number is wrong. To avoid such attacks, + * we should treat this just like any other decryption error. */ + p[0] = (char)(int) "CAN-2003-0131 patch 2003-03-20"; } } if (al != -1) { -#if 0 - goto f_err; -#else /* Some decryption failure -- use random value instead as countermeasure * against Bleichenbacher's attack on PKCS #1 v1.5 RSA padding - * (see RFC 2246, section 7.4.7.1). - * But note that due to length and protocol version checking, the - * attack is impractical anyway (see section 5 in D. Bleichenbacher: - * "Chosen Ciphertext Attacks Against Protocols Based on the RSA - * Encryption Standard PKCS #1", CRYPTO '98, LNCS 1462, pp. 1-12). - */ + * (see RFC 2246, section 7.4.7.1). */ ERR_clear_error(); i = SSL_MAX_MASTER_KEY_LENGTH; p[0] = s->client_version >> 8; p[1] = s->client_version & 0xff; RAND_pseudo_bytes(p+2, i-2); /* should be RAND_bytes, but we cannot work around a failure */ -#endif } s->session->master_key_length= @ 1.5 log @upgrading package: openssl 0.9.6e -> 0.9.6f @ text @a31 20 --- Makefile.org.orig 2002-08-08 23:12:47.000000000 +0200 +++ Makefile.org 2002-08-09 10:24:18.000000000 +0200 @@@@ -686,7 +686,7 @@@@ $(INSTALL_PREFIX)$(MANDIR)/man3 \ $(INSTALL_PREFIX)$(MANDIR)/man5 \ $(INSTALL_PREFIX)$(MANDIR)/man7 - @@pod2man=`cd ../../util; ./pod2mantest ignore`; \ + @@pod2man=`cd util; ./pod2mantest ignore`; \ for i in doc/apps/*.pod; do \ fn=`basename $$i .pod`; \ if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \ @@@@ -697,7 +697,7 @@@@ --release=$(VERSION) `basename $$i`") \ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \ done; \ - @@for i in doc/crypto/*.pod doc/ssl/*.pod; do \ + for i in doc/crypto/*.pod doc/ssl/*.pod; do \ fn=`basename $$i .pod`; \ if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \ echo "installing man$$sec/`basename $$i .pod`.$$sec"; \ @ 1.4 log @upgrade to security fixed version @ text @d32 20 @ 1.3 log @finally fix support for sparc64-NetBSD @ text @a2 13 @@@@ -381,9 +381,11 @@@@ # figure out if gcc is available and if so we use it otherwise # we fallback to whatever cc does on the system -GCCVER=`(gcc --version) 2>/dev/null` +GCCVER=`(gcc --version) 2>/dev/null | head -1` if [ "$GCCVER" != "" ]; then CC=gcc + # then strip off whatever prefix GCC 3.1 and higher prepends the number with... + GCCVER=`echo $GCCVER | sed 's/^gcc (GCC) //'` # then strip off whatever prefix Cygnus prepends the number with... GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'` # peak single digit before and after first dot, e.g. 2.95.1 gives 29 a12 39 @@@@ -119,10 +119,10 @@@@ "debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown):::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DBIO_PAIR_DEBUG -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", -"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn", +"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DBIO_PAIR_DEBUG -g -march=i486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", +"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -march=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", +"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -march=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", +"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -march=i486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn", "dist", "cc:-O::(unknown):::::", # Basic configs that should work on any (32 and less bit) box @@@@ -135,7 +135,7 @@@@ # surrounds it with #APP #NO_APP comment pair which (at least Solaris # 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic" # error message. -"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -march=i486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### Solaris x86 with Sun C setups "solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@@@ -334,10 +334,10 @@@@ # The intel boxes :-), It would be worth seeing if bsdi-gcc can use the # bn86-elf.o file file since it is hand tweaked assembler. -"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", -"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", +"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", +"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", "linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::", "linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::", "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", a31 33 @@@@ -379,7 +380,7 @@@@ "unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::", "unixware-7-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::", "unixware-7-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::", -"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT:-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # OpenUNIX 8 "OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread:-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::", @@@@ -468,11 +469,11 @@@@ # Mingw32 # (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl # and its library files in util/pl/*) -"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", +"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", # Cygwin -"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", -"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll", +"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -march=i486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", +"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -march=i486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll", # Ultrix from Bernhard Simon "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::", @@@@ -482,7 +483,7 @@@@ # Some OpenBSD from Bob Beck "OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @ 1.2 log @add support for sparc64-NetBSD-1.6 @ text @d69 1 a69 1 +"NetBSD-sparc64","gcc:-DTERMIOS -O3 -fomit-frame-pointer -m64 -mcpu=v9 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @ 1.1 log @add missing patch to CVS @ text @d2 1 a2 1 +++ config Tue Jun 4 09:00:37 2002 d16 10 a25 2 --- Configure.orig Tue Jun 4 09:06:27 2002 +++ Configure Tue Jun 4 09:08:36 2002 d65 2 a66 1 @@@@ -347,11 +347,11 @@@@ d69 1 d84 1 a84 1 @@@@ -379,7 +379,7 @@@@ d93 1 a93 1 @@@@ -468,11 +468,11 @@@@ d108 1 a108 1 @@@@ -482,7 +482,7 @@@@ @