From b608c7f2b175e121f2c22d53341a317153afdc8e Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 15 Apr 2000 06:18:51 +0000 Subject: OpenSSL 0.9.5a merge --- src/lib/libcrypto/util/libeay.num | 3 +++ src/lib/libcrypto/util/mk1mf.pl | 3 +++ src/lib/libcrypto/util/mkerr.pl | 26 +++++++++++++++++++++----- src/lib/libcrypto/util/pl/BC-32.pl | 2 +- src/lib/libcrypto/util/pl/Mingw32.pl | 25 ++++++++++++++++++++++++- src/lib/libcrypto/util/selftest.pl | 20 +++++++++++++++++--- src/lib/libcrypto/util/sep_lib.sh | 34 ---------------------------------- 7 files changed, 69 insertions(+), 44 deletions(-) (limited to 'src/lib/libcrypto/util') diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index e3818ef6e4..f611d6b283 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num @@ -2227,3 +2227,6 @@ BIO_callback_ctrl 2252 RAND_egd 2253 RAND_status 2254 bn_dump1 2255 +des_check_key_parity 2256 +lh_num_items 2257 +RAND_event 2258 diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl index 6fbf3ceca6..100d76f279 100644 --- a/src/lib/libcrypto/util/mk1mf.pl +++ b/src/lib/libcrypto/util/mk1mf.pl @@ -8,6 +8,7 @@ $INSTALLTOP="/usr/local/ssl"; $OPTIONS=""; $ssl_version=""; +$banner="\t\@echo Building OpenSSL"; open(IN,") { @@ -59,6 +60,7 @@ and [options] can be one of just-ssl - remove all non-ssl keys/digest no-asm - No x86 asm nasm - Use NASM for x86 asm + gaswin - Use GNU as with Mingw32 no-socks - No socket code no-err - No error strings dll/shlib - Build shared libraries (MS) @@ -850,6 +852,7 @@ sub read_options elsif (/^no-hmac$/) { $no_hmac=1; } elsif (/^no-asm$/) { $no_asm=1; } elsif (/^nasm$/) { $nasm=1; } + elsif (/^gaswin$/) { $gaswin=1; } elsif (/^no-ssl2$/) { $no_ssl2=1; } elsif (/^no-ssl3$/) { $no_ssl3=1; } elsif (/^no-err$/) { $no_err=1; } diff --git a/src/lib/libcrypto/util/mkerr.pl b/src/lib/libcrypto/util/mkerr.pl index ebc059ef22..8e18f3c2df 100644 --- a/src/lib/libcrypto/util/mkerr.pl +++ b/src/lib/libcrypto/util/mkerr.pl @@ -284,6 +284,17 @@ EOF # Rewrite the C source file containing the error details. + # First, read any existing reason string definitions: + my %err_reason_strings; + if (open(IN,"<$cfile")) { + while () { + if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) { + $err_reason_strings{$1} = $2; + } + } + close(IN); + } + my $hincf; if($static) { $hfile =~ /([^\/]+)$/; @@ -352,7 +363,8 @@ EOF */ /* NOTE: this file was auto generated by the mkerr.pl script: any changes - * made to it will be overwritten when the script next updates this file. + * made to it will be overwritten when the script next updates this file, + * only reason strings will be preserved. */ #include @@ -385,9 +397,13 @@ EOF foreach $i (@reasons) { my $rn; my $nspc = 0; - $i =~ /^${lib}_R_(\S+)$/; - $rn = $1; - $rn =~ tr/_[A-Z]/ [a-z]/; + if (exists $err_reason_strings{$i}) { + $rn = $err_reason_strings{$i}; + } else { + $i =~ /^${lib}_R_(\S+)$/; + $rn = $1; + $rn =~ tr/_[A-Z]/ [a-z]/; + } $nspc = 40 - length($i) unless length($i) > 40; $nspc = " " x $nspc; print OUT "{${i}${nspc},\"$rn\"},\n"; @@ -465,7 +481,7 @@ EOF } close OUT; - + undef %err_reason_strings; } if($debug && defined(%notrans)) { diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl index df6e2c742e..7f57809a16 100644 --- a/src/lib/libcrypto/util/pl/BC-32.pl +++ b/src/lib/libcrypto/util/pl/BC-32.pl @@ -109,7 +109,7 @@ sub do_lib_rule { # $ret.="\t\$(RM) \$(O_$Name)\n"; $ret.="\techo LIB $<\n"; - $ret.="\t\$(MKLIB) $lfile$target \$(addprefix +, $objs)\n"; + $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n"; } else { diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl index 585cacd820..c687d9b118 100644 --- a/src/lib/libcrypto/util/pl/Mingw32.pl +++ b/src/lib/libcrypto/util/pl/Mingw32.pl @@ -21,6 +21,30 @@ if ($debug) else { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } +if ($gaswin and !$no_asm) + { + $bn_asm_obj='$(OBJ_D)/bn-win32.o'; + $bn_asm_src='crypto/bn/asm/bn-win32.s'; + $des_enc_obj='$(OBJ_D)/d-win32.o $(OBJ_D)/y-win32.o'; + $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s'; + $bf_enc_obj='$(OBJ_D)/b-win32.o'; + $bf_enc_src='crypto/bf/asm/b-win32.s'; +# $cast_enc_obj='$(OBJ_D)/c-win32.o'; +# $cast_enc_src='crypto/cast/asm/c-win32.s'; + $rc4_enc_obj='$(OBJ_D)/r4-win32.o'; + $rc4_enc_src='crypto/rc4/asm/r4-win32.s'; + $rc5_enc_obj='$(OBJ_D)/r5-win32.o'; + $rc5_enc_src='crypto/rc5/asm/r5-win32.s'; + $md5_asm_obj='$(OBJ_D)/m5-win32.o'; + $md5_asm_src='crypto/md5/asm/m5-win32.s'; + $rmd160_asm_obj='$(OBJ_D)/rm-win32.o'; + $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s'; + $sha1_asm_obj='$(OBJ_D)/s1-win32.o'; + $sha1_asm_src='crypto/sha/asm/s1-win32.s'; + $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; + } + + $obj='.o'; $ofile='-o '; @@ -76,4 +100,3 @@ sub do_link_rule return($ret); } 1; - diff --git a/src/lib/libcrypto/util/selftest.pl b/src/lib/libcrypto/util/selftest.pl index 91e962a312..04b4425d7e 100644 --- a/src/lib/libcrypto/util/selftest.pl +++ b/src/lib/libcrypto/util/selftest.pl @@ -25,7 +25,7 @@ open(OUT,">$report") or die; print OUT "OpenSSL self-test report:\n\n"; $uname=`uname -a`; -$uname="??" if $uname eq ""; +$uname="??\n" if $uname eq ""; $c=`sh config -t`; foreach $_ (split("\n",$c)) { @@ -83,6 +83,11 @@ if (open(TEST,">cctest.c")) { print OUT "Compiler doesn't work.\n"; goto err; } + system("ar r cctest.a /dev/null"); + if (not -f "cctest.a") { + print OUT "Check your archive tool (ar).\n"; + goto err; + } } else { print OUT "Can't create cctest.c\n"; } @@ -129,14 +134,14 @@ if (/no-/) } print "Running make test...\n"; -if (system("make test 2>&1 | tee make.log") > 255) +if (system("make test 2>&1 | tee maketest.log") > 255) { print OUT "make test failed!\n"; } else { $ok=1; } -if ($ok and open(IN,") { $ok=2 if /^platform: $platform/; } @@ -155,6 +160,15 @@ if ($ok != 2) { } else { print OUT "make.log not found!\n"; } + if (open(IN,") { + print OUT; + } + close(IN); + print OUT $sep; + } else { + print OUT "maketest.log not found!\n"; + } } else { print OUT "Test passed.\n"; } diff --git a/src/lib/libcrypto/util/sep_lib.sh b/src/lib/libcrypto/util/sep_lib.sh index 34c2c9f8ba..e69de29bb2 100644 --- a/src/lib/libcrypto/util/sep_lib.sh +++ b/src/lib/libcrypto/util/sep_lib.sh @@ -1,34 +0,0 @@ -#!/bin/sh - -cwd=`pwd` -/bin/rm -fr tmp/* - -cd crypto/des -make -f Makefile.uni tar -make -f Makefile.uni tar_lit -/bin/mv libdes.tgz $cwd/tmp -/bin/mv libdes-l.tgz $cwd/tmp -cd $cwd - -for name in md5 sha cast bf idea rc4 rc2 -do - echo doing $name - (cd crypto; tar cfh - $name)|(cd tmp; tar xf -) - cd tmp/$name - /bin/rm -f Makefile - /bin/rm -f Makefile.ssl - /bin/rm -f Makefile.ssl.orig - /bin/rm -f *.old - /bin/mv Makefile.uni Makefile - - if [ -d asm ]; then - mkdir asm/perlasm - cp $cwd/crypto/perlasm/*.pl asm/perlasm - fi - cd .. - tar cf - $name|gzip >$name.tgz -# /bin/rm -fr $name - cd $cwd -done - - -- cgit v1.2.3-55-g6feb