summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util
diff options
context:
space:
mode:
authormarkus <>2002-09-05 22:45:21 +0000
committermarkus <>2002-09-05 22:45:21 +0000
commit2a6851ef8adb0e84ff2515493d3704a13c6256b0 (patch)
tree9df5b497548eaf51e9f234d27aaf988cd14882c2 /src/lib/libcrypto/util
parent5514995a9d5ed91db089875adb509c7781357c0e (diff)
downloadopenbsd-2a6851ef8adb0e84ff2515493d3704a13c6256b0.tar.gz
openbsd-2a6851ef8adb0e84ff2515493d3704a13c6256b0.tar.bz2
openbsd-2a6851ef8adb0e84ff2515493d3704a13c6256b0.zip
import openssl-0.9.7-beta3
Diffstat (limited to 'src/lib/libcrypto/util')
-rw-r--r--src/lib/libcrypto/util/dirname.pl18
-rw-r--r--src/lib/libcrypto/util/domd4
-rw-r--r--src/lib/libcrypto/util/libeay.num30
-rw-r--r--src/lib/libcrypto/util/mk1mf.pl2
-rw-r--r--src/lib/libcrypto/util/mkdef.pl50
-rw-r--r--src/lib/libcrypto/util/mklink.pl15
-rw-r--r--src/lib/libcrypto/util/pl/BC-32.pl42
-rw-r--r--src/lib/libcrypto/util/pl/OS2-EMX.pl79
-rw-r--r--src/lib/libcrypto/util/pl/VC-32.pl36
-rw-r--r--src/lib/libcrypto/util/pod2mantest7
-rw-r--r--src/lib/libcrypto/util/point.sh6
11 files changed, 191 insertions, 98 deletions
diff --git a/src/lib/libcrypto/util/dirname.pl b/src/lib/libcrypto/util/dirname.pl
new file mode 100644
index 0000000000..d7a66d96ac
--- /dev/null
+++ b/src/lib/libcrypto/util/dirname.pl
@@ -0,0 +1,18 @@
1#!/usr/local/bin/perl
2
3if ($#ARGV < 0) {
4 die "dirname.pl: too few arguments\n";
5} elsif ($#ARGV > 0) {
6 die "dirname.pl: too many arguments\n";
7}
8
9my $d = $ARGV[0];
10
11if ($d =~ m|.*/.*|) {
12 $d =~ s|/[^/]*$||;
13} else {
14 $d = ".";
15}
16
17print $d,"\n";
18exit(0);
diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd
index aa99cb0523..8cbe383c16 100644
--- a/src/lib/libcrypto/util/domd
+++ b/src/lib/libcrypto/util/domd
@@ -18,11 +18,11 @@ if [ "$MAKEDEPEND" = "gcc" ]; then
18 sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp 18 sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp
19 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp 19 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
20 gcc -D OPENSSL_DOING_MAKEDEPEND -M $@ >> Makefile.tmp 20 gcc -D OPENSSL_DOING_MAKEDEPEND -M $@ >> Makefile.tmp
21 perl $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new 21 ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new
22 rm -f Makefile.tmp 22 rm -f Makefile.tmp
23else 23else
24 ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile.ssl $@ 24 ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile.ssl $@
25 perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new 25 ${PERL} $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new
26fi 26fi
27mv Makefile.new Makefile.ssl 27mv Makefile.new Makefile.ssl
28# unfake the presence of Kerberos 28# unfake the presence of Kerberos
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num
index b74749e5de..512185e257 100644
--- a/src/lib/libcrypto/util/libeay.num
+++ b/src/lib/libcrypto/util/libeay.num
@@ -701,7 +701,7 @@ bn_mul_words 707 EXIST::FUNCTION:
701BN_uadd 708 EXIST::FUNCTION: 701BN_uadd 708 EXIST::FUNCTION:
702BN_usub 709 EXIST::FUNCTION: 702BN_usub 709 EXIST::FUNCTION:
703bn_sqr_words 710 EXIST::FUNCTION: 703bn_sqr_words 710 EXIST::FUNCTION:
704_ossl_old_crypt 711 EXIST:!NeXT,!PERL5,!__FreeBSD__:FUNCTION:DES 704_ossl_old_crypt 711 EXIST:!NeXT,!PERL5:FUNCTION:DES
705d2i_ASN1_BIT_STRING 712 EXIST::FUNCTION: 705d2i_ASN1_BIT_STRING 712 EXIST::FUNCTION:
706d2i_ASN1_BOOLEAN 713 EXIST::FUNCTION: 706d2i_ASN1_BOOLEAN 713 EXIST::FUNCTION:
707d2i_ASN1_HEADER 714 EXIST::FUNCTION: 707d2i_ASN1_HEADER 714 EXIST::FUNCTION:
@@ -984,8 +984,8 @@ BIO_ghbn_ctrl 1003 EXIST::FUNCTION:
984CRYPTO_free_ex_data 1004 EXIST::FUNCTION: 984CRYPTO_free_ex_data 1004 EXIST::FUNCTION:
985CRYPTO_get_ex_data 1005 EXIST::FUNCTION: 985CRYPTO_get_ex_data 1005 EXIST::FUNCTION:
986CRYPTO_set_ex_data 1007 EXIST::FUNCTION: 986CRYPTO_set_ex_data 1007 EXIST::FUNCTION:
987ERR_load_CRYPTO_strings 1009 EXIST:!VMS,!WIN16:FUNCTION: 987ERR_load_CRYPTO_strings 1009 EXIST:!OS2,!VMS,!WIN16:FUNCTION:
988ERR_load_CRYPTOlib_strings 1009 EXIST:VMS,WIN16:FUNCTION: 988ERR_load_CRYPTOlib_strings 1009 EXIST:OS2,VMS,WIN16:FUNCTION:
989EVP_PKEY_bits 1010 EXIST::FUNCTION: 989EVP_PKEY_bits 1010 EXIST::FUNCTION:
990MD5_Transform 1011 EXIST::FUNCTION:MD5 990MD5_Transform 1011 EXIST::FUNCTION:MD5
991SHA1_Transform 1012 EXIST::FUNCTION:SHA,SHA1 991SHA1_Transform 1012 EXIST::FUNCTION:SHA,SHA1
@@ -1216,7 +1216,7 @@ name_cmp 1239 EXIST::FUNCTION:
1216str_dup 1240 NOEXIST::FUNCTION: 1216str_dup 1240 NOEXIST::FUNCTION:
1217i2s_ASN1_ENUMERATED 1241 EXIST::FUNCTION: 1217i2s_ASN1_ENUMERATED 1241 EXIST::FUNCTION:
1218i2s_ASN1_ENUMERATED_TABLE 1242 EXIST::FUNCTION: 1218i2s_ASN1_ENUMERATED_TABLE 1242 EXIST::FUNCTION:
1219BIO_s_log 1243 EXIST:!WIN16,!WIN32,!macintosh:FUNCTION: 1219BIO_s_log 1243 EXIST:!OS2,!WIN16,!WIN32,!macintosh:FUNCTION:
1220BIO_f_reliable 1244 EXIST::FUNCTION:BIO 1220BIO_f_reliable 1244 EXIST::FUNCTION:BIO
1221PKCS7_dataFinal 1245 EXIST::FUNCTION: 1221PKCS7_dataFinal 1245 EXIST::FUNCTION:
1222PKCS7_dataDecode 1246 EXIST::FUNCTION: 1222PKCS7_dataDecode 1246 EXIST::FUNCTION:
@@ -2732,8 +2732,8 @@ EC_POINT_point2oct 3178 EXIST::FUNCTION:EC
2732KRB5_APREQ_free 3179 EXIST::FUNCTION: 2732KRB5_APREQ_free 3179 EXIST::FUNCTION:
2733ASN1_OBJECT_it 3180 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: 2733ASN1_OBJECT_it 3180 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
2734ASN1_OBJECT_it 3180 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: 2734ASN1_OBJECT_it 3180 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
2735OCSP_crlID_new 3181 EXIST:!VMS,!WIN16:FUNCTION: 2735OCSP_crlID_new 3181 EXIST:!OS2,!VMS,!WIN16:FUNCTION:
2736OCSP_crlID2_new 3181 EXIST:VMS,WIN16:FUNCTION: 2736OCSP_crlID2_new 3181 EXIST:OS2,VMS,WIN16:FUNCTION:
2737CONF_modules_load_file 3182 EXIST::FUNCTION: 2737CONF_modules_load_file 3182 EXIST::FUNCTION:
2738CONF_imodule_set_usr_data 3183 EXIST::FUNCTION: 2738CONF_imodule_set_usr_data 3183 EXIST::FUNCTION:
2739ENGINE_set_default_string 3184 EXIST::FUNCTION: 2739ENGINE_set_default_string 3184 EXIST::FUNCTION:
@@ -2774,3 +2774,21 @@ AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES
2774AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES 2774AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES
2775ENGINE_load_4758cca 3218 EXIST::FUNCTION: 2775ENGINE_load_4758cca 3218 EXIST::FUNCTION:
2776_ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES 2776_ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES
2777EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES
2778EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES
2779EVP_aes_128_cfb 3222 EXIST::FUNCTION:AES
2780EVP_aes_256_cfb 3223 EXIST::FUNCTION:AES
2781EVP_aes_128_ofb 3224 EXIST::FUNCTION:AES
2782EVP_aes_192_cfb 3225 EXIST::FUNCTION:AES
2783CONF_modules_free 3226 EXIST::FUNCTION:
2784NCONF_default 3227 EXIST::FUNCTION:
2785OPENSSL_no_config 3228 EXIST::FUNCTION:
2786NCONF_WIN32 3229 EXIST::FUNCTION:
2787ASN1_UNIVERSALSTRING_new 3230 EXIST::FUNCTION:
2788EVP_des_ede_ecb 3231 EXIST::FUNCTION:DES
2789i2d_ASN1_UNIVERSALSTRING 3232 EXIST::FUNCTION:
2790ASN1_UNIVERSALSTRING_free 3233 EXIST::FUNCTION:
2791ASN1_UNIVERSALSTRING_it 3234 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
2792ASN1_UNIVERSALSTRING_it 3234 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
2793d2i_ASN1_UNIVERSALSTRING 3235 EXIST::FUNCTION:
2794EVP_des_ede3_ecb 3236 EXIST::FUNCTION:DES
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl
index 8b6b2e668a..c9271bbffe 100644
--- a/src/lib/libcrypto/util/mk1mf.pl
+++ b/src/lib/libcrypto/util/mk1mf.pl
@@ -100,7 +100,7 @@ $out_def="out";
100$inc_def="outinc"; 100$inc_def="outinc";
101$tmp_def="tmp"; 101$tmp_def="tmp";
102 102
103$mkdir="mkdir"; 103$mkdir="-mkdir";
104 104
105($ssl,$crypto)=("ssl","crypto"); 105($ssl,$crypto)=("ssl","crypto");
106$ranlib="echo ranlib"; 106$ranlib="echo ranlib";
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl
index 071036a6d2..adfd447dd3 100644
--- a/src/lib/libcrypto/util/mkdef.pl
+++ b/src/lib/libcrypto/util/mkdef.pl
@@ -43,8 +43,8 @@
43# EXPORT_VAR_AS_FUNCTION). This script assumes renaming of symbols is found 43# EXPORT_VAR_AS_FUNCTION). This script assumes renaming of symbols is found
44# in the file crypto/symhacks.h. 44# in the file crypto/symhacks.h.
45# The semantics for the platforms is that every item is checked against the 45# The semantics for the platforms is that every item is checked against the
46# enviroment. For the negative items ("!FOO"), if any of them is false 46# environment. For the negative items ("!FOO"), if any of them is false
47# (i.e. "FOO" is true) in the enviroment, the corresponding symbol can't be 47# (i.e. "FOO" is true) in the environment, the corresponding symbol can't be
48# used. For the positive itms, if all of them are false in the environment, 48# used. For the positive itms, if all of them are false in the environment,
49# the corresponding symbol can't be used. Any combination of positive and 49# the corresponding symbol can't be used. Any combination of positive and
50# negative items are possible, and of course leave room for some redundancy. 50# negative items are possible, and of course leave room for some redundancy.
@@ -58,6 +58,7 @@ my $debug=0;
58 58
59my $crypto_num= "util/libeay.num"; 59my $crypto_num= "util/libeay.num";
60my $ssl_num= "util/ssleay.num"; 60my $ssl_num= "util/ssleay.num";
61my $libname;
61 62
62my $do_update = 0; 63my $do_update = 0;
63my $do_rewrite = 1; 64my $do_rewrite = 1;
@@ -73,12 +74,13 @@ my $VMS=0;
73my $W32=0; 74my $W32=0;
74my $W16=0; 75my $W16=0;
75my $NT=0; 76my $NT=0;
77my $OS2=0;
76# Set this to make typesafe STACK definitions appear in DEF 78# Set this to make typesafe STACK definitions appear in DEF
77my $safe_stack_def = 0; 79my $safe_stack_def = 0;
78 80
79my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", 81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
80 "EXPORT_VAR_AS_FUNCTION" ); 82 "EXPORT_VAR_AS_FUNCTION" );
81my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT" ); 83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
82my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", 84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
83 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", 85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
84 "RIPEMD", 86 "RIPEMD",
@@ -126,11 +128,18 @@ foreach (@ARGV, split(/ /, $options))
126 $VMSAlpha=1; 128 $VMSAlpha=1;
127 } 129 }
128 $VMS=1 if $_ eq "VMS"; 130 $VMS=1 if $_ eq "VMS";
131 $OS2=1 if $_ eq "OS2";
129 132
130 $do_ssl=1 if $_ eq "ssleay"; 133 $do_ssl=1 if $_ eq "ssleay";
131 $do_ssl=1 if $_ eq "ssl"; 134 if ($_ eq "ssl") {
135 $do_ssl=1;
136 $libname=$_
137 }
132 $do_crypto=1 if $_ eq "libeay"; 138 $do_crypto=1 if $_ eq "libeay";
133 $do_crypto=1 if $_ eq "crypto"; 139 if ($_ eq "crypto") {
140 $do_crypto=1;
141 $libname=$_;
142 }
134 $do_update=1 if $_ eq "update"; 143 $do_update=1 if $_ eq "update";
135 $do_rewrite=1 if $_ eq "rewrite"; 144 $do_rewrite=1 if $_ eq "rewrite";
136 $do_ctest=1 if $_ eq "ctest"; 145 $do_ctest=1 if $_ eq "ctest";
@@ -170,8 +179,17 @@ foreach (@ARGV, split(/ /, $options))
170 } 179 }
171 180
172 181
182if (!$libname) {
183 if ($do_ssl) {
184 $libname="SSLEAY";
185 }
186 if ($do_crypto) {
187 $libname="LIBEAY";
188 }
189}
190
173# If no platform is given, assume WIN32 191# If no platform is given, assume WIN32
174if ($W32 + $W16 + $VMS == 0) { 192if ($W32 + $W16 + $VMS + $OS2 == 0) {
175 $W32 = 1; 193 $W32 = 1;
176} 194}
177 195
@@ -182,7 +200,7 @@ if ($W16) {
182 200
183if (!$do_ssl && !$do_crypto) 201if (!$do_ssl && !$do_crypto)
184 { 202 {
185 print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ]\n"; 203 print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT | OS2 ]\n";
186 exit(1); 204 exit(1);
187 } 205 }
188 206
@@ -305,10 +323,10 @@ EOF
305 323
306} else { 324} else {
307 325
308 &print_def_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_symbols) 326 &print_def_file(*STDOUT,$libname,*ssl_list,@ssl_symbols)
309 if $do_ssl == 1; 327 if $do_ssl == 1;
310 328
311 &print_def_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_symbols) 329 &print_def_file(*STDOUT,$libname,*crypto_list,@crypto_symbols)
312 if $do_crypto == 1; 330 if $do_crypto == 1;
313 331
314} 332}
@@ -995,6 +1013,7 @@ sub is_valid
995 if ($keyword eq "WIN32" && $W32) { return 1; } 1013 if ($keyword eq "WIN32" && $W32) { return 1; }
996 if ($keyword eq "WIN16" && $W16) { return 1; } 1014 if ($keyword eq "WIN16" && $W16) { return 1; }
997 if ($keyword eq "WINNT" && $NT) { return 1; } 1015 if ($keyword eq "WINNT" && $NT) { return 1; }
1016 if ($keyword eq "OS2" && $OS2) { return 1; }
998 # Special platforms: 1017 # Special platforms:
999 # EXPORT_VAR_AS_FUNCTION means that global variables 1018 # EXPORT_VAR_AS_FUNCTION means that global variables
1000 # will be represented as functions. This currently 1019 # will be represented as functions. This currently
@@ -1092,24 +1111,27 @@ sub print_def_file
1092{ 1111{
1093 (*OUT,my $name,*nums,my @symbols)=@_; 1112 (*OUT,my $name,*nums,my @symbols)=@_;
1094 my $n = 1; my @e; my @r; my @v; my $prev=""; 1113 my $n = 1; my @e; my @r; my @v; my $prev="";
1114 my $liboptions="";
1095 1115
1096 if ($W32) 1116 if ($W32)
1097 { $name.="32"; } 1117 { $name.="32"; }
1098 else 1118 elsif ($W16)
1099 { $name.="16"; } 1119 { $name.="16"; }
1120 elsif ($OS2)
1121 { $liboptions = "INITINSTANCE\nDATA NONSHARED"; }
1100 1122
1101 print OUT <<"EOF"; 1123 print OUT <<"EOF";
1102; 1124;
1103; Definition file for the DLL version of the $name library from OpenSSL 1125; Definition file for the DLL version of the $name library from OpenSSL
1104; 1126;
1105 1127
1106LIBRARY $name 1128LIBRARY $name $liboptions
1107 1129
1108DESCRIPTION 'OpenSSL $name - http://www.openssl.org/' 1130DESCRIPTION 'OpenSSL $name - http://www.openssl.org/'
1109 1131
1110EOF 1132EOF
1111 1133
1112 if (!$W32) { 1134 if ($W16) {
1113 print <<"EOF"; 1135 print <<"EOF";
1114CODE PRELOAD MOVEABLE 1136CODE PRELOAD MOVEABLE
1115DATA PRELOAD MOVEABLE SINGLE 1137DATA PRELOAD MOVEABLE SINGLE
@@ -1148,10 +1170,10 @@ EOF
1148 print STDERR "Warning: Symbol '",$s2,"' redefined. old=",($nums{$prev} =~ /^(.*?)\\/,$1),", new=",($nums{$s2} =~ /^(.*?)\\/,$1),"\n"; 1170 print STDERR "Warning: Symbol '",$s2,"' redefined. old=",($nums{$prev} =~ /^(.*?)\\/,$1),", new=",($nums{$s2} =~ /^(.*?)\\/,$1),"\n";
1149 } 1171 }
1150 $prev = $s2; # To warn about duplicates... 1172 $prev = $s2; # To warn about duplicates...
1151 if($v) { 1173 if($v && !$OS2) {
1152 printf OUT " %s%-39s @%-8d DATA\n",($W32)?"":"_",$s2,$n; 1174 printf OUT " %s%-39s @%-8d DATA\n",($W32)?"":"_",$s2,$n;
1153 } else { 1175 } else {
1154 printf OUT " %s%-39s @%d\n",($W32)?"":"_",$s2,$n; 1176 printf OUT " %s%-39s @%d\n",($W32||$OS2)?"":"_",$s2,$n;
1155 } 1177 }
1156 } 1178 }
1157 } 1179 }
diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl
index 9e9c9a5146..9386da7aa4 100644
--- a/src/lib/libcrypto/util/mklink.pl
+++ b/src/lib/libcrypto/util/mklink.pl
@@ -18,10 +18,10 @@
18my $from = shift; 18my $from = shift;
19my @files = @ARGV; 19my @files = @ARGV;
20 20
21my @from_path = split(/\//, $from); 21my @from_path = split(/[\\\/]/, $from);
22my $pwd = `pwd`; 22my $pwd = `pwd`;
23chop($pwd); 23chop($pwd);
24my @pwd_path = split(/\//, $pwd); 24my @pwd_path = split(/[\\\/]/, $pwd);
25 25
26my @to_path = (); 26my @to_path = ();
27 27
@@ -54,7 +54,16 @@ foreach $file (@files) {
54 if ($symlink_exists) { 54 if ($symlink_exists) {
55 symlink("$to/$file", "$from/$file") or $err = " [$!]"; 55 symlink("$to/$file", "$from/$file") or $err = " [$!]";
56 } else { 56 } else {
57 system ("cp", "$file", "$from/$file") and $err = " [$!]"; 57 unlink "$from/$file";
58 open (OLD, "<$file") or die "Can't open $file: $!";
59 open (NEW, ">$from/$file") or die "Can't open $from/$file: $!";
60 binmode(OLD);
61 binmode(NEW);
62 while (<OLD>) {
63 print NEW $_;
64 }
65 close (OLD) or die "Can't close $file: $!";
66 close (NEW) or die "Can't close $from/$file: $!";
58 } 67 }
59 print $file . " => $from/$file$err\n"; 68 print $file . " => $from/$file$err\n";
60} 69}
diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl
index 78d60616a6..bd7a9d9301 100644
--- a/src/lib/libcrypto/util/pl/BC-32.pl
+++ b/src/lib/libcrypto/util/pl/BC-32.pl
@@ -18,7 +18,7 @@ $out_def="out32";
18$tmp_def="tmp32"; 18$tmp_def="tmp32";
19$inc_def="inc32"; 19$inc_def="inc32";
20#enable max error messages, disable most common warnings 20#enable max error messages, disable most common warnings
21$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 "; 21$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp ";
22if ($debug) 22if ($debug)
23{ 23{
24 $cflags.="-Od -y -v -vi- -D_DEBUG"; 24 $cflags.="-Od -y -v -vi- -D_DEBUG";
@@ -51,9 +51,9 @@ $lfile='';
51$shlib_ex_obj=""; 51$shlib_ex_obj="";
52$app_ex_obj="c0x32.obj"; 52$app_ex_obj="c0x32.obj";
53 53
54$asm='n_o_T_a_s_m'; 54$asm='nasmw';
55$asm.=" /Zi" if $debug; 55$asm.=" /Zi" if $debug;
56$afile='/Fo'; 56$afile='-f obj -o';
57 57
58$bn_mulw_obj=''; 58$bn_mulw_obj='';
59$bn_mulw_src=''; 59$bn_mulw_src='';
@@ -64,24 +64,24 @@ $bf_enc_src='';
64 64
65if (!$no_asm) 65if (!$no_asm)
66 { 66 {
67 $bn_mulw_obj='crypto\bn\asm\bn-win32.obj'; 67 $bn_mulw_obj='crypto\bn\asm\bn_win32.obj';
68 $bn_mulw_src='crypto\bn\asm\bn-win32.asm'; 68 $bn_mulw_src='crypto\bn\asm\bn_win32.asm';
69 $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; 69 $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj';
70 $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; 70 $des_enc_src='crypto\des\asm\d_win32.asm crypto\des\asm\y_win32.asm';
71 $bf_enc_obj='crypto\bf\asm\b-win32.obj'; 71 $bf_enc_obj='crypto\bf\asm\b_win32.obj';
72 $bf_enc_src='crypto\bf\asm\b-win32.asm'; 72 $bf_enc_src='crypto\bf\asm\b_win32.asm';
73 $cast_enc_obj='crypto\cast\asm\c-win32.obj'; 73 $cast_enc_obj='crypto\cast\asm\c_win32.obj';
74 $cast_enc_src='crypto\cast\asm\c-win32.asm'; 74 $cast_enc_src='crypto\cast\asm\c_win32.asm';
75 $rc4_enc_obj='crypto\rc4\asm\r4-win32.obj'; 75 $rc4_enc_obj='crypto\rc4\asm\r4_win32.obj';
76 $rc4_enc_src='crypto\rc4\asm\r4-win32.asm'; 76 $rc4_enc_src='crypto\rc4\asm\r4_win32.asm';
77 $rc5_enc_obj='crypto\rc5\asm\r5-win32.obj'; 77 $rc5_enc_obj='crypto\rc5\asm\r5_win32.obj';
78 $rc5_enc_src='crypto\rc5\asm\r5-win32.asm'; 78 $rc5_enc_src='crypto\rc5\asm\r5_win32.asm';
79 $md5_asm_obj='crypto\md5\asm\m5-win32.obj'; 79 $md5_asm_obj='crypto\md5\asm\m5_win32.obj';
80 $md5_asm_src='crypto\md5\asm\m5-win32.asm'; 80 $md5_asm_src='crypto\md5\asm\m5_win32.asm';
81 $sha1_asm_obj='crypto\sha\asm\s1-win32.obj'; 81 $sha1_asm_obj='crypto\sha\asm\s1_win32.obj';
82 $sha1_asm_src='crypto\sha\asm\s1-win32.asm'; 82 $sha1_asm_src='crypto\sha\asm\s1_win32.asm';
83 $rmd160_asm_obj='crypto\ripemd\asm\rm-win32.obj'; 83 $rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj';
84 $rmd160_asm_src='crypto\ripemd\asm\rm-win32.asm'; 84 $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
85 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; 85 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
86 } 86 }
87 87
diff --git a/src/lib/libcrypto/util/pl/OS2-EMX.pl b/src/lib/libcrypto/util/pl/OS2-EMX.pl
index 57180556ca..d695dda623 100644
--- a/src/lib/libcrypto/util/pl/OS2-EMX.pl
+++ b/src/lib/libcrypto/util/pl/OS2-EMX.pl
@@ -10,18 +10,20 @@ $rm='rm -f';
10# C compiler stuff 10# C compiler stuff
11 11
12$cc='gcc'; 12$cc='gcc';
13$cflags="-DL_ENDIAN -O3 -fomit-frame-pointer -m486 -Zmt -Wall "; 13$cflags="-DL_ENDIAN -O3 -fomit-frame-pointer -m486 -Zmtd -Wall ";
14$cflags.="-Zomf " if $shlib;
15$shl_cflag="-Zdll";
14 16
15if ($debug) { 17if ($debug) {
16 $cflags.="-g "; 18 $cflags.="-g ";
17} 19}
18 20
19$obj='.o'; 21$obj=$shlib ? '.obj' : '.o';
20$ofile='-o '; 22$ofile='-o ';
21 23
22# EXE linking stuff 24# EXE linking stuff
23$link='${CC}'; 25$link='${CC}';
24$lflags='${CFLAGS} -Zbsd-signals'; 26$lflags='${CFLAGS} -Zbsd-signals -s';
25$efile='-o '; 27$efile='-o ';
26$exep='.exe'; 28$exep='.exe';
27$ex_libs="-lsocket"; 29$ex_libs="-lsocket";
@@ -30,12 +32,12 @@ $ex_libs="-lsocket";
30$mklib='ar r'; 32$mklib='ar r';
31$mlflags=''; 33$mlflags='';
32$ranlib="ar s"; 34$ranlib="ar s";
33$plib='lib'; 35$plib='';
34$libp=".a"; 36$libp=$shlib ? ".lib" : ".a";
35$shlibp=".a"; 37$shlibp=$shlib ? ".dll" : ".a";
36$lfile=''; 38$lfile='';
37 39
38$asm='as'; 40$asm=$shlib ? 'as -Zomf' : 'as';
39$afile='-o '; 41$afile='-o ';
40$bn_asm_obj=""; 42$bn_asm_obj="";
41$bn_asm_src=""; 43$bn_asm_src="";
@@ -46,24 +48,32 @@ $bf_enc_src="";
46 48
47if (!$no_asm) 49if (!$no_asm)
48 { 50 {
49 $bn_asm_obj='crypto\bn\asm\bn-os2.o crypto\bn\asm\co-os2.o'; 51 $bn_asm_obj="crypto\\bn\\asm\\bn-os2$obj crypto\\bn\\asm\\co-os2$obj";
50 $bn_asm_src='crypto\bn\asm\bn-os2.asm crypto\bn\asm\co-os2.asm'; 52 $bn_asm_src="crypto\\bn\\asm\\bn-os2.asm crypto\\bn\\asm\\co-os2.asm";
51 $des_enc_obj='crypto\des\asm\d-os2.o crypto\des\asm\y-os2.o'; 53 $des_enc_obj="crypto\\des\\asm\\d-os2$obj crypto\\des\\asm\\y-os2$obj";
52 $des_enc_src='crypto\des\asm\d-os2.asm crypto\des\asm\y-os2.asm'; 54 $des_enc_src="crypto\\des\\asm\\d-os2.asm crypto\\des\\asm\\y-os2.asm";
53 $bf_enc_obj='crypto\bf\asm\b-os2.o'; 55 $bf_enc_obj="crypto\\bf\\asm\\b-os2$obj";
54 $bf_enc_src='crypto\bf\asm\b-os2.asm'; 56 $bf_enc_src="crypto\\bf\\asm\\b-os2.asm";
55 $cast_enc_obj='crypto\cast\asm\c-os2.o'; 57 $cast_enc_obj="crypto\\cast\\asm\\c-os2$obj";
56 $cast_enc_src='crypto\cast\asm\c-os2.asm'; 58 $cast_enc_src="crypto\\cast\\asm\\c-os2.asm";
57 $rc4_enc_obj='crypto\rc4\asm\r4-os2.o'; 59 $rc4_enc_obj="crypto\\rc4\\asm\\r4-os2$obj";
58 $rc4_enc_src='crypto\rc4\asm\r4-os2.asm'; 60 $rc4_enc_src="crypto\\rc4\\asm\\r4-os2.asm";
59 $rc5_enc_obj='crypto\rc5\asm\r5-os2.o'; 61 $rc5_enc_obj="crypto\\rc5\\asm\\r5-os2$obj";
60 $rc5_enc_src='crypto\rc5\asm\r5-os2.asm'; 62 $rc5_enc_src="crypto\\rc5\\asm\\r5-os2.asm";
61 $md5_asm_obj='crypto\md5\asm\m5-os2.o'; 63 $md5_asm_obj="crypto\\md5\\asm\\m5-os2$obj";
62 $md5_asm_src='crypto\md5\asm\m5-os2.asm'; 64 $md5_asm_src="crypto\\md5\\asm\\m5-os2.asm";
63 $sha1_asm_obj='crypto\sha\asm\s1-os2.o'; 65 $sha1_asm_obj="crypto\\sha\\asm\\s1-os2$obj";
64 $sha1_asm_src='crypto\sha\asm\s1-os2.asm'; 66 $sha1_asm_src="crypto\\sha\\asm\\s1-os2.asm";
65 $rmd160_asm_obj='crypto\ripemd\asm\rm-os2.o'; 67 $rmd160_asm_obj="crypto\\ripemd\\asm\\rm-os2$obj";
66 $rmd160_asm_src='crypto\ripemd\asm\rm-os2.asm'; 68 $rmd160_asm_src="crypto\\ripemd\\asm\\rm-os2.asm";
69 }
70
71if ($shlib)
72 {
73 $mlflags.=" $lflags -Zdll";
74 $lib_cflag=" -D_DLL";
75 $out_def="out_dll";
76 $tmp_def="tmp_dll";
67 } 77 }
68 78
69sub do_lib_rule 79sub do_lib_rule
@@ -76,9 +86,20 @@ sub do_lib_rule
76 ($Name=$name) =~ tr/a-z/A-Z/; 86 ($Name=$name) =~ tr/a-z/A-Z/;
77 87
78 $ret.="$target: \$(${Name}OBJ)\n"; 88 $ret.="$target: \$(${Name}OBJ)\n";
79 $ret.="\t\$(RM) $target\n"; 89 if (!$shlib)
80 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; 90 {
81 $ret.="\t\$(RANLIB) $target\n\n"; 91 $ret.="\t\$(RM) $target\n";
92 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
93 $ret.="\t\$(RANLIB) $target\n\n";
94 }
95 else
96 {
97 local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
98 $ex.=' -lsocket';
99 $ret.="\t\$(LINK) \$(SHLIB_CFLAGS) \$(MLFLAGS) $efile$target \$(SHLIB_EX_OBJ) \$(${Name}OBJ) $ex os2/${Name}.def\n";
100 $ret.="\temximp -o $out_def/$name.a os2/${Name}.def\n";
101 $ret.="\temximp -o $out_def/$name.lib os2/${Name}.def\n\n";
102 }
82 } 103 }
83 104
84sub do_link_rule 105sub do_link_rule
@@ -89,7 +110,7 @@ sub do_link_rule
89 $file =~ s/\//$o/g if $o ne '/'; 110 $file =~ s/\//$o/g if $o ne '/';
90 $n=&bname($target); 111 $n=&bname($target);
91 $ret.="$target: $files $dep_libs\n"; 112 $ret.="$target: $files $dep_libs\n";
92 $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; 113 $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n";
93 return($ret); 114 return($ret);
94 } 115 }
95 116
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl
index 50bfb34385..d6e3a11530 100644
--- a/src/lib/libcrypto/util/pl/VC-32.pl
+++ b/src/lib/libcrypto/util/pl/VC-32.pl
@@ -66,24 +66,24 @@ $bf_enc_src='';
66 66
67if (!$no_asm) 67if (!$no_asm)
68 { 68 {
69 $bn_asm_obj='crypto\bn\asm\bn-win32.obj'; 69 $bn_asm_obj='crypto\bn\asm\bn_win32.obj';
70 $bn_asm_src='crypto\bn\asm\bn-win32.asm'; 70 $bn_asm_src='crypto\bn\asm\bn_win32.asm';
71 $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; 71 $des_enc_obj='crypto\des\asm\d_win32.obj crypto\des\asm\y_win32.obj';
72 $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; 72 $des_enc_src='crypto\des\asm\d_win32.asm crypto\des\asm\y_win32.asm';
73 $bf_enc_obj='crypto\bf\asm\b-win32.obj'; 73 $bf_enc_obj='crypto\bf\asm\b_win32.obj';
74 $bf_enc_src='crypto\bf\asm\b-win32.asm'; 74 $bf_enc_src='crypto\bf\asm\b_win32.asm';
75 $cast_enc_obj='crypto\cast\asm\c-win32.obj'; 75 $cast_enc_obj='crypto\cast\asm\c_win32.obj';
76 $cast_enc_src='crypto\cast\asm\c-win32.asm'; 76 $cast_enc_src='crypto\cast\asm\c_win32.asm';
77 $rc4_enc_obj='crypto\rc4\asm\r4-win32.obj'; 77 $rc4_enc_obj='crypto\rc4\asm\r4_win32.obj';
78 $rc4_enc_src='crypto\rc4\asm\r4-win32.asm'; 78 $rc4_enc_src='crypto\rc4\asm\r4_win32.asm';
79 $rc5_enc_obj='crypto\rc5\asm\r5-win32.obj'; 79 $rc5_enc_obj='crypto\rc5\asm\r5_win32.obj';
80 $rc5_enc_src='crypto\rc5\asm\r5-win32.asm'; 80 $rc5_enc_src='crypto\rc5\asm\r5_win32.asm';
81 $md5_asm_obj='crypto\md5\asm\m5-win32.obj'; 81 $md5_asm_obj='crypto\md5\asm\m5_win32.obj';
82 $md5_asm_src='crypto\md5\asm\m5-win32.asm'; 82 $md5_asm_src='crypto\md5\asm\m5_win32.asm';
83 $sha1_asm_obj='crypto\sha\asm\s1-win32.obj'; 83 $sha1_asm_obj='crypto\sha\asm\s1_win32.obj';
84 $sha1_asm_src='crypto\sha\asm\s1-win32.asm'; 84 $sha1_asm_src='crypto\sha\asm\s1_win32.asm';
85 $rmd160_asm_obj='crypto\ripemd\asm\rm-win32.obj'; 85 $rmd160_asm_obj='crypto\ripemd\asm\rm_win32.obj';
86 $rmd160_asm_src='crypto\ripemd\asm\rm-win32.asm'; 86 $rmd160_asm_src='crypto\ripemd\asm\rm_win32.asm';
87 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; 87 $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
88 } 88 }
89 89
diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest
index 79aefafac0..e01c6192a7 100644
--- a/src/lib/libcrypto/util/pod2mantest
+++ b/src/lib/libcrypto/util/pod2mantest
@@ -11,9 +11,10 @@
11 11
12 12
13IFS=: 13IFS=:
14try_without_dir=true 14if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi
15try_without_dir=false
15# First we try "pod2man", then "$dir/pod2man" for each item in $PATH. 16# First we try "pod2man", then "$dir/pod2man" for each item in $PATH.
16for dir in dummy:$PATH; do 17for dir in dummy${IFS}$PATH; do
17 if [ "$try_without_dir" = true ]; then 18 if [ "$try_without_dir" = true ]; then
18 # first iteration 19 # first iteration
19 pod2man=pod2man 20 pod2man=pod2man
@@ -47,7 +48,7 @@ done
47echo "No working pod2man found. Consider installing a new version." >&2 48echo "No working pod2man found. Consider installing a new version." >&2
48if [ "$1" = ignore ]; then 49if [ "$1" = ignore ]; then
49 echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 50 echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2
50 echo "util/pod2man.pl" 51 echo "../../util/pod2man.pl"
51 exit 0 52 exit 0
52fi 53fi
53exit 1 54exit 1
diff --git a/src/lib/libcrypto/util/point.sh b/src/lib/libcrypto/util/point.sh
index 47543c88e2..ce7dcc56df 100644
--- a/src/lib/libcrypto/util/point.sh
+++ b/src/lib/libcrypto/util/point.sh
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3rm -f $2 3rm -f $2
4ln -s $1 $2 4if test "$OSTYPE" = msdosdjgpp; then
5 cp $1 $2
6else
7 ln -s $1 $2
8fi
5echo "$2 => $1" 9echo "$2 => $1"
6 10