diff options
Diffstat (limited to 'src/lib/libcrypto/util')
-rw-r--r-- | src/lib/libcrypto/util/libeay.num | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/util/mk1mf.pl | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/util/mkerr.pl | 26 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pl/BC-32.pl | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pl/Mingw32.pl | 25 | ||||
-rw-r--r-- | src/lib/libcrypto/util/selftest.pl | 20 | ||||
-rw-r--r-- | src/lib/libcrypto/util/sep_lib.sh | 34 |
7 files changed, 69 insertions, 44 deletions
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 | |||
2227 | RAND_egd 2253 | 2227 | RAND_egd 2253 |
2228 | RAND_status 2254 | 2228 | RAND_status 2254 |
2229 | bn_dump1 2255 | 2229 | bn_dump1 2255 |
2230 | des_check_key_parity 2256 | ||
2231 | lh_num_items 2257 | ||
2232 | 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 @@ | |||
8 | $INSTALLTOP="/usr/local/ssl"; | 8 | $INSTALLTOP="/usr/local/ssl"; |
9 | $OPTIONS=""; | 9 | $OPTIONS=""; |
10 | $ssl_version=""; | 10 | $ssl_version=""; |
11 | $banner="\t\@echo Building OpenSSL"; | ||
11 | 12 | ||
12 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | 13 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; |
13 | while(<IN>) { | 14 | while(<IN>) { |
@@ -59,6 +60,7 @@ and [options] can be one of | |||
59 | just-ssl - remove all non-ssl keys/digest | 60 | just-ssl - remove all non-ssl keys/digest |
60 | no-asm - No x86 asm | 61 | no-asm - No x86 asm |
61 | nasm - Use NASM for x86 asm | 62 | nasm - Use NASM for x86 asm |
63 | gaswin - Use GNU as with Mingw32 | ||
62 | no-socks - No socket code | 64 | no-socks - No socket code |
63 | no-err - No error strings | 65 | no-err - No error strings |
64 | dll/shlib - Build shared libraries (MS) | 66 | dll/shlib - Build shared libraries (MS) |
@@ -850,6 +852,7 @@ sub read_options | |||
850 | elsif (/^no-hmac$/) { $no_hmac=1; } | 852 | elsif (/^no-hmac$/) { $no_hmac=1; } |
851 | elsif (/^no-asm$/) { $no_asm=1; } | 853 | elsif (/^no-asm$/) { $no_asm=1; } |
852 | elsif (/^nasm$/) { $nasm=1; } | 854 | elsif (/^nasm$/) { $nasm=1; } |
855 | elsif (/^gaswin$/) { $gaswin=1; } | ||
853 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | 856 | elsif (/^no-ssl2$/) { $no_ssl2=1; } |
854 | elsif (/^no-ssl3$/) { $no_ssl3=1; } | 857 | elsif (/^no-ssl3$/) { $no_ssl3=1; } |
855 | elsif (/^no-err$/) { $no_err=1; } | 858 | 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 | |||
284 | 284 | ||
285 | # Rewrite the C source file containing the error details. | 285 | # Rewrite the C source file containing the error details. |
286 | 286 | ||
287 | # First, read any existing reason string definitions: | ||
288 | my %err_reason_strings; | ||
289 | if (open(IN,"<$cfile")) { | ||
290 | while (<IN>) { | ||
291 | if (/\b(${lib}_R_\w*)\b.*\"(.*)\"/) { | ||
292 | $err_reason_strings{$1} = $2; | ||
293 | } | ||
294 | } | ||
295 | close(IN); | ||
296 | } | ||
297 | |||
287 | my $hincf; | 298 | my $hincf; |
288 | if($static) { | 299 | if($static) { |
289 | $hfile =~ /([^\/]+)$/; | 300 | $hfile =~ /([^\/]+)$/; |
@@ -352,7 +363,8 @@ EOF | |||
352 | */ | 363 | */ |
353 | 364 | ||
354 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | 365 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes |
355 | * made to it will be overwritten when the script next updates this file. | 366 | * made to it will be overwritten when the script next updates this file, |
367 | * only reason strings will be preserved. | ||
356 | */ | 368 | */ |
357 | 369 | ||
358 | #include <stdio.h> | 370 | #include <stdio.h> |
@@ -385,9 +397,13 @@ EOF | |||
385 | foreach $i (@reasons) { | 397 | foreach $i (@reasons) { |
386 | my $rn; | 398 | my $rn; |
387 | my $nspc = 0; | 399 | my $nspc = 0; |
388 | $i =~ /^${lib}_R_(\S+)$/; | 400 | if (exists $err_reason_strings{$i}) { |
389 | $rn = $1; | 401 | $rn = $err_reason_strings{$i}; |
390 | $rn =~ tr/_[A-Z]/ [a-z]/; | 402 | } else { |
403 | $i =~ /^${lib}_R_(\S+)$/; | ||
404 | $rn = $1; | ||
405 | $rn =~ tr/_[A-Z]/ [a-z]/; | ||
406 | } | ||
391 | $nspc = 40 - length($i) unless length($i) > 40; | 407 | $nspc = 40 - length($i) unless length($i) > 40; |
392 | $nspc = " " x $nspc; | 408 | $nspc = " " x $nspc; |
393 | print OUT "{${i}${nspc},\"$rn\"},\n"; | 409 | print OUT "{${i}${nspc},\"$rn\"},\n"; |
@@ -465,7 +481,7 @@ EOF | |||
465 | } | 481 | } |
466 | 482 | ||
467 | close OUT; | 483 | close OUT; |
468 | 484 | undef %err_reason_strings; | |
469 | } | 485 | } |
470 | 486 | ||
471 | if($debug && defined(%notrans)) { | 487 | 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 | |||
109 | { | 109 | { |
110 | # $ret.="\t\$(RM) \$(O_$Name)\n"; | 110 | # $ret.="\t\$(RM) \$(O_$Name)\n"; |
111 | $ret.="\techo LIB $<\n"; | 111 | $ret.="\techo LIB $<\n"; |
112 | $ret.="\t\$(MKLIB) $lfile$target \$(addprefix +, $objs)\n"; | 112 | $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n"; |
113 | } | 113 | } |
114 | else | 114 | else |
115 | { | 115 | { |
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) | |||
21 | else | 21 | else |
22 | { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } | 22 | { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } |
23 | 23 | ||
24 | if ($gaswin and !$no_asm) | ||
25 | { | ||
26 | $bn_asm_obj='$(OBJ_D)/bn-win32.o'; | ||
27 | $bn_asm_src='crypto/bn/asm/bn-win32.s'; | ||
28 | $des_enc_obj='$(OBJ_D)/d-win32.o $(OBJ_D)/y-win32.o'; | ||
29 | $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s'; | ||
30 | $bf_enc_obj='$(OBJ_D)/b-win32.o'; | ||
31 | $bf_enc_src='crypto/bf/asm/b-win32.s'; | ||
32 | # $cast_enc_obj='$(OBJ_D)/c-win32.o'; | ||
33 | # $cast_enc_src='crypto/cast/asm/c-win32.s'; | ||
34 | $rc4_enc_obj='$(OBJ_D)/r4-win32.o'; | ||
35 | $rc4_enc_src='crypto/rc4/asm/r4-win32.s'; | ||
36 | $rc5_enc_obj='$(OBJ_D)/r5-win32.o'; | ||
37 | $rc5_enc_src='crypto/rc5/asm/r5-win32.s'; | ||
38 | $md5_asm_obj='$(OBJ_D)/m5-win32.o'; | ||
39 | $md5_asm_src='crypto/md5/asm/m5-win32.s'; | ||
40 | $rmd160_asm_obj='$(OBJ_D)/rm-win32.o'; | ||
41 | $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s'; | ||
42 | $sha1_asm_obj='$(OBJ_D)/s1-win32.o'; | ||
43 | $sha1_asm_src='crypto/sha/asm/s1-win32.s'; | ||
44 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; | ||
45 | } | ||
46 | |||
47 | |||
24 | $obj='.o'; | 48 | $obj='.o'; |
25 | $ofile='-o '; | 49 | $ofile='-o '; |
26 | 50 | ||
@@ -76,4 +100,3 @@ sub do_link_rule | |||
76 | return($ret); | 100 | return($ret); |
77 | } | 101 | } |
78 | 1; | 102 | 1; |
79 | |||
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; | |||
25 | print OUT "OpenSSL self-test report:\n\n"; | 25 | print OUT "OpenSSL self-test report:\n\n"; |
26 | 26 | ||
27 | $uname=`uname -a`; | 27 | $uname=`uname -a`; |
28 | $uname="??" if $uname eq ""; | 28 | $uname="??\n" if $uname eq ""; |
29 | 29 | ||
30 | $c=`sh config -t`; | 30 | $c=`sh config -t`; |
31 | foreach $_ (split("\n",$c)) { | 31 | foreach $_ (split("\n",$c)) { |
@@ -83,6 +83,11 @@ if (open(TEST,">cctest.c")) { | |||
83 | print OUT "Compiler doesn't work.\n"; | 83 | print OUT "Compiler doesn't work.\n"; |
84 | goto err; | 84 | goto err; |
85 | } | 85 | } |
86 | system("ar r cctest.a /dev/null"); | ||
87 | if (not -f "cctest.a") { | ||
88 | print OUT "Check your archive tool (ar).\n"; | ||
89 | goto err; | ||
90 | } | ||
86 | } else { | 91 | } else { |
87 | print OUT "Can't create cctest.c\n"; | 92 | print OUT "Can't create cctest.c\n"; |
88 | } | 93 | } |
@@ -129,14 +134,14 @@ if (/no-/) | |||
129 | } | 134 | } |
130 | 135 | ||
131 | print "Running make test...\n"; | 136 | print "Running make test...\n"; |
132 | if (system("make test 2>&1 | tee make.log") > 255) | 137 | if (system("make test 2>&1 | tee maketest.log") > 255) |
133 | { | 138 | { |
134 | print OUT "make test failed!\n"; | 139 | print OUT "make test failed!\n"; |
135 | } else { | 140 | } else { |
136 | $ok=1; | 141 | $ok=1; |
137 | } | 142 | } |
138 | 143 | ||
139 | if ($ok and open(IN,"<make.log")) { | 144 | if ($ok and open(IN,"<maketest.log")) { |
140 | while (<IN>) { | 145 | while (<IN>) { |
141 | $ok=2 if /^platform: $platform/; | 146 | $ok=2 if /^platform: $platform/; |
142 | } | 147 | } |
@@ -155,6 +160,15 @@ if ($ok != 2) { | |||
155 | } else { | 160 | } else { |
156 | print OUT "make.log not found!\n"; | 161 | print OUT "make.log not found!\n"; |
157 | } | 162 | } |
163 | if (open(IN,"<maketest.log")) { | ||
164 | while (<IN>) { | ||
165 | print OUT; | ||
166 | } | ||
167 | close(IN); | ||
168 | print OUT $sep; | ||
169 | } else { | ||
170 | print OUT "maketest.log not found!\n"; | ||
171 | } | ||
158 | } else { | 172 | } else { |
159 | print OUT "Test passed.\n"; | 173 | print OUT "Test passed.\n"; |
160 | } | 174 | } |
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cwd=`pwd` | ||
4 | /bin/rm -fr tmp/* | ||
5 | |||
6 | cd crypto/des | ||
7 | make -f Makefile.uni tar | ||
8 | make -f Makefile.uni tar_lit | ||
9 | /bin/mv libdes.tgz $cwd/tmp | ||
10 | /bin/mv libdes-l.tgz $cwd/tmp | ||
11 | cd $cwd | ||
12 | |||
13 | for name in md5 sha cast bf idea rc4 rc2 | ||
14 | do | ||
15 | echo doing $name | ||
16 | (cd crypto; tar cfh - $name)|(cd tmp; tar xf -) | ||
17 | cd tmp/$name | ||
18 | /bin/rm -f Makefile | ||
19 | /bin/rm -f Makefile.ssl | ||
20 | /bin/rm -f Makefile.ssl.orig | ||
21 | /bin/rm -f *.old | ||
22 | /bin/mv Makefile.uni Makefile | ||
23 | |||
24 | if [ -d asm ]; then | ||
25 | mkdir asm/perlasm | ||
26 | cp $cwd/crypto/perlasm/*.pl asm/perlasm | ||
27 | fi | ||
28 | cd .. | ||
29 | tar cf - $name|gzip >$name.tgz | ||
30 | # /bin/rm -fr $name | ||
31 | cd $cwd | ||
32 | done | ||
33 | |||
34 | |||