summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1998-12-21 10:56:39 +0000
committerRalf S. Engelschall <rse@openssl.org>1998-12-21 10:56:39 +0000
commit58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch)
treec7b16876a5789463bbbb468ef4829c8129b3d718 /util
parentd02b48c63a58ea4367a0e905979f140b7d090f86 (diff)
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'util')
-rwxr-xr-xutil/add_cr.pl2
-rwxr-xr-xutil/bat.sh132
-rwxr-xr-xutil/do_ms.sh2
-rwxr-xr-xutil/fixNT.sh2
-rwxr-xr-xutil/libeay.num154
-rwxr-xr-xutil/mk1mf.pl181
-rwxr-xr-xutil/mkdef.pl50
-rw-r--r--util/pl/BC-16.pl2
-rw-r--r--util/pl/BC-32.pl2
-rw-r--r--util/pl/VC-16.pl14
-rw-r--r--util/pl/VC-32.pl42
-rw-r--r--util/pl/linux.pl96
-rw-r--r--util/pl/unix.pl1
-rwxr-xr-xutil/sep_lib.sh37
-rwxr-xr-xutil/sp-diff.pl2
-rwxr-xr-xutil/speed.sh2
-rwxr-xr-xutil/ssleay.num47
-rwxr-xr-xutil/up_ver.pl17
-rwxr-xr-xutil/x86asm.sh42
19 files changed, 721 insertions, 106 deletions
diff --git a/util/add_cr.pl b/util/add_cr.pl
index 04d002677c..c7b62c11ec 100755
--- a/util/add_cr.pl
+++ b/util/add_cr.pl
@@ -63,7 +63,7 @@ sub dofile
sub Copyright
{
return <<'EOF';
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
diff --git a/util/bat.sh b/util/bat.sh
new file mode 100755
index 0000000000..c6f48e8a7b
--- /dev/null
+++ b/util/bat.sh
@@ -0,0 +1,132 @@
+#!/usr/local/bin/perl
+
+$infile="/home/eay/ssl/SSLeay/MINFO";
+
+open(IN,"<$infile") || die "unable to open $infile:$!\n";
+$_=<IN>;
+for (;;)
+ {
+ chop;
+
+ ($key,$val)=/^([^=]+)=(.*)/;
+ if ($key eq "RELATIVE_DIRECTORY")
+ {
+ if ($lib ne "")
+ {
+ $uc=$lib;
+ $uc =~ s/^lib(.*)\.a/$1/;
+ $uc =~ tr/a-z/A-Z/;
+ $lib_nam{$uc}=$uc;
+ $lib_obj{$uc}.=$libobj." ";
+ }
+ last if ($val eq "FINISHED");
+ $lib="";
+ $libobj="";
+ $dir=$val;
+ }
+
+ if ($key eq "TEST")
+ { $test.=&var_add($dir,$val); }
+
+ if (($key eq "PROGS") || ($key eq "E_OBJ"))
+ { $e_exe.=&var_add($dir,$val); }
+
+ if ($key eq "LIB")
+ {
+ $lib=$val;
+ $lib =~ s/^.*\/([^\/]+)$/$1/;
+ }
+
+ if ($key eq "EXHEADER")
+ { $exheader.=&var_add($dir,$val); }
+
+ if ($key eq "HEADER")
+ { $header.=&var_add($dir,$val); }
+
+ if ($key eq "LIBSRC")
+ { $libsrc.=&var_add($dir,$val); }
+
+ if (!($_=<IN>))
+ { $_="RELATIVE_DIRECTORY=FINISHED\n"; }
+ }
+close(IN);
+
+@a=split(/\s+/,$libsrc);
+foreach (@a)
+ {
+ print "${_}.c\n";
+ }
+
+sub var_add
+ {
+ local($dir,$val)=@_;
+ local(@a,$_,$ret);
+
+ return("") if $no_idea && $dir =~ /\/idea/;
+ return("") if $no_rc2 && $dir =~ /\/rc2/;
+ return("") if $no_rc4 && $dir =~ /\/rc4/;
+ return("") if $no_rsa && $dir =~ /\/rsa/;
+ return("") if $no_rsa && $dir =~ /^rsaref/;
+ return("") if $no_dsa && $dir =~ /\/dsa/;
+ return("") if $no_dh && $dir =~ /\/dh/;
+ if ($no_des && $dir =~ /\/des/)
+ {
+ if ($val =~ /read_pwd/)
+ { return("$dir/read_pwd "); }
+ else
+ { return(""); }
+ }
+ return("") if $no_mdc2 && $dir =~ /\/mdc2/;
+ return("") if $no_sock && $dir =~ /\/proxy/;
+ return("") if $no_bf && $dir =~ /\/bf/;
+ return("") if $no_cast && $dir =~ /\/cast/;
+
+ $val =~ s/^\s*(.*)\s*$/$1/;
+ @a=split(/\s+/,$val);
+ grep(s/\.[och]$//,@a);
+
+ @a=grep(!/^e_.*_3d$/,@a) if $no_des;
+ @a=grep(!/^e_.*_d$/,@a) if $no_des;
+ @a=grep(!/^e_.*_i$/,@a) if $no_idea;
+ @a=grep(!/^e_.*_r2$/,@a) if $no_rc2;
+ @a=grep(!/^e_.*_bf$/,@a) if $no_bf;
+ @a=grep(!/^e_.*_c$/,@a) if $no_cast;
+ @a=grep(!/^e_rc4$/,@a) if $no_rc4;
+
+ @a=grep(!/(^s2_)|(^s23_)/,@a) if $no_ssl2;
+ @a=grep(!/(^s3_)|(^s23_)/,@a) if $no_ssl3;
+
+ @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock;
+
+ @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2;
+ @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5;
+
+ @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa;
+ @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa;
+ @a=grep(!/(^pem_seal$)/,@a) if $no_rsa;
+
+ @a=grep(!/(m_dss$)|(m_dss1$)/,@a) if $no_dsa;
+ @a=grep(!/(^d2i_s_)|(^i2d_s_)|(_dsap$)/,@a) if $no_dsa;
+
+ @a=grep(!/^n_pkey$/,@a) if $no_rsa || $no_rc4;
+
+ @a=grep(!/_dhp$/,@a) if $no_dh;
+
+ @a=grep(!/(^sha[^1])|(_sha$)|(m_dss$)/,@a) if $no_sha;
+ @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1;
+ @a=grep(!/_mdc2$/,@a) if $no_mdc2;
+
+ @a=grep(!/(^rsa$)|(^genrsa$)|(^req$)|(^ca$)/,@a) if $no_rsa;
+ @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa;
+ @a=grep(!/^gendsa$/,@a) if $no_sha1;
+ @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh;
+
+ @a=grep(!/(^dh)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1;
+
+ grep($_="$dir/$_",@a);
+ @a=grep(!/(^|\/)s_/,@a) if $no_sock;
+ @a=grep(!/(^|\/)bio_sock/,@a) if $no_sock;
+ $ret=join(' ',@a)." ";
+ return($ret);
+ }
+
diff --git a/util/do_ms.sh b/util/do_ms.sh
index 03e349df6c..f498d842b7 100755
--- a/util/do_ms.sh
+++ b/util/do_ms.sh
@@ -7,7 +7,7 @@ PATH=util:../util:$PATH
# perl util/mk1mf.pl VC-MSDOS no-sock >ms/msdos.mak
# perl util/mk1mf.pl VC-W31-32 >ms/w31.mak
-perl util/mk1mf.pl VC-W31-32 dll >ms/w31dll.mak
+perl util/mk1mf.pl VC-WIN16 dll >ms/w31dll.mak
# perl util/mk1mf.pl VC-WIN32 >ms/nt.mak
perl util/mk1mf.pl VC-WIN32 dll >ms/ntdll.mak
diff --git a/util/fixNT.sh b/util/fixNT.sh
index a4eee1b7f3..ce4f19299b 100755
--- a/util/fixNT.sh
+++ b/util/fixNT.sh
@@ -10,5 +10,5 @@ chmod +x Configure util/*
echo cleaning
/bin/rm -f `find . -name '*.$$$' -print` 2>/dev/null >/dev/null
echo 'removing those damn ^M'
-perl -pi -e 's/\015//' * */* */*/* 2>/dev/null >/dev/null
+perl -pi -e 's/\015//' `find . -type 'f' -print |grep -v '.obj$' |grep -v '.der$' |grep -v '.gz'`
make -f Makefile.ssl links
diff --git a/util/libeay.num b/util/libeay.num
index 04ad69c6a1..fcaf254287 100755
--- a/util/libeay.num
+++ b/util/libeay.num
@@ -46,11 +46,9 @@ BF_options 45
BF_set_key 46
BIO_CONNECT_free 47
BIO_CONNECT_new 48
-BIO_PROXY_free 49
-BIO_PROXY_new 50
BIO_accept 51
BIO_ctrl 52
-BIO_ctrl_int 53
+BIO_int_ctrl 53
BIO_debug_callback 54
BIO_dump 55
BIO_dup_chain 56
@@ -65,7 +63,6 @@ BIO_fd_should_retry 64
BIO_find_type 65
BIO_free 66
BIO_free_all 67
-BIO_get_accept 68
BIO_get_accept_socket 69
BIO_get_filter_bio 70
BIO_get_host_ip 71
@@ -74,7 +71,6 @@ BIO_get_retry_BIO 73
BIO_get_retry_reason 74
BIO_gethostbyname 75
BIO_gets 76
-BIO_nbio_sock_error 77
BIO_new 78
BIO_new_accept 79
BIO_new_connect 80
@@ -91,12 +87,10 @@ BIO_s_accept 90
BIO_s_connect 91
BIO_s_fd 92
BIO_s_file 93
-BIO_s_file_internal_w16 94
BIO_s_mem 95
BIO_s_null 96
BIO_s_proxy_client 97
BIO_s_socket 98
-BIO_s_socket 99
BIO_set 100
BIO_set_cipher 101
BIO_set_tcp_ndelay 102
@@ -114,9 +108,9 @@ BN_MONT_CTX_new 113
BN_MONT_CTX_set 114
BN_add 115
BN_add_word 116
-BN_ascii2bn 117
+BN_hex2bn 117
BN_bin2bn 118
-BN_bn2ascii 119
+BN_bn2hex 119
BN_bn2bin 120
BN_clear 121
BN_clear_bit 122
@@ -354,7 +348,7 @@ OBJ_add_object 353
OBJ_bsearch 354
OBJ_cleanup 355
OBJ_cmp 356
-OBJ_create_and_add_object 357
+OBJ_create 357
OBJ_dup 358
OBJ_ln2nid 359
OBJ_new_nid 360
@@ -703,8 +697,8 @@ asn1_Finish 702
asn1_GetSequence 703
bn_div64 704
bn_expand2 705
-bn_mul_add_word 706
-bn_mul_word 707
+bn_mul_add_words 706
+bn_mul_words 707
bn_qadd 708
bn_qsub 709
bn_sqr_words 710
@@ -773,7 +767,6 @@ d2i_X509_SIG 772
d2i_X509_VAL 773
d2i_X509_bio 774
d2i_X509_fp 775
-des_3cbc_encrypt 776
des_cbc_cksum 777
des_cbc_encrypt 778
des_cblock_print_file 779
@@ -919,11 +912,6 @@ PKCS7_content_free 918
ERR_load_PKCS7_strings 919
X509_find_by_issuer_and_serial 920
X509_find_by_subject 921
-d2i_PKCS7_fp 922
-i2d_PKCS7_fp 923
-PKCS7_dup 924
-d2i_PKCS7_bio 925
-i2d_PKCS7_bio 926
PKCS7_ctrl 927
PKCS7_set_type 928
PKCS7_set_content 929
@@ -945,11 +933,133 @@ PEM_write_bio_RSAPublicKey 944
d2i_RSAPublicKey_bio 945
i2d_RSAPublicKey_bio 946
PEM_read_RSAPublicKey 947
-PEM_read_bio_RSAPublicKey 948
PEM_write_RSAPublicKey 949
-PEM_write_bio_RSAPublicKey 950
-d2i_RSAPublicKey_bio 951
d2i_RSAPublicKey_fp 952
-i2d_RSAPublicKey_bio 953
i2d_RSAPublicKey_fp 954
BIO_copy_next_retry 955
+RSA_flags 956
+X509_STORE_add_crl 957
+X509_load_crl_file 958
+EVP_rc2_40_cbc 959
+EVP_rc4_40 960
+EVP_CIPHER_CTX_init 961
+HMAC 962
+HMAC_Init 963
+HMAC_Update 964
+HMAC_Final 965
+ERR_get_next_error_library 966
+EVP_PKEY_cmp_parameters 967
+HMAC_cleanup 968
+BIO_ptr_ctrl 969
+BIO_new_file_internal 970
+BIO_new_fp_internal 971
+BIO_s_file_internal 972
+BN_BLINDING_convert 973
+BN_BLINDING_invert 974
+BN_BLINDING_update 975
+RSA_blinding_on 977
+RSA_blinding_off 978
+i2t_ASN1_OBJECT 979
+BN_BLINDING_new 980
+BN_BLINDING_free 981
+EVP_cast5_cbc 983
+EVP_cast5_cfb 984
+EVP_cast5_ecb 985
+EVP_cast5_ofb 986
+BF_decrypt 987
+CAST_set_key 988
+CAST_encrypt 989
+CAST_decrypt 990
+CAST_ecb_encrypt 991
+CAST_cbc_encrypt 992
+CAST_cfb64_encrypt 993
+CAST_ofb64_encrypt 994
+RC2_decrypt 995
+OBJ_create_objects 997
+BN_exp 998
+BN_mul_word 999
+BN_sub_word 1000
+BN_dec2bn 1001
+BN_bn2dec 1002
+BIO_ghbn_ctrl 1003
+CRYPTO_free_ex_data 1004
+CRYPTO_get_ex_data 1005
+CRYPTO_set_ex_data 1007
+ERR_load_CRYPTO_strings 1009
+ERR_load_CRYPTOlib_strings 1009
+EVP_PKEY_bits 1010
+MD5_Transform 1011
+SHA1_Transform 1012
+SHA_Transform 1013
+X509_STORE_CTX_get_chain 1014
+X509_STORE_CTX_get_current_cert 1015
+X509_STORE_CTX_get_error 1016
+X509_STORE_CTX_get_error_depth 1017
+X509_STORE_CTX_get_ex_data 1018
+X509_STORE_CTX_set_cert 1020
+X509_STORE_CTX_set_chain 1021
+X509_STORE_CTX_set_error 1022
+X509_STORE_CTX_set_ex_data 1023
+CRYPTO_dup_ex_data 1025
+CRYPTO_get_new_lockid 1026
+CRYPTO_new_ex_data 1027
+RSA_set_ex_data 1028
+RSA_get_ex_data 1029
+RSA_get_ex_new_index 1030
+RSA_padding_add_PKCS1_type_1 1031
+RSA_padding_add_PKCS1_type_2 1032
+RSA_padding_add_SSLv23 1033
+RSA_padding_add_none 1034
+RSA_padding_check_PKCS1_type_1 1035
+RSA_padding_check_PKCS1_type_2 1036
+RSA_padding_check_SSLv23 1037
+RSA_padding_check_none 1038
+bn_add_words 1039
+d2i_Netscape_RSA_2 1040
+CRYPTO_get_ex_new_index 1041
+RIPEMD160_Init 1042
+RIPEMD160_Update 1043
+RIPEMD160_Final 1044
+RIPEMD160 1045
+RIPEMD160_Transform 1046
+RC5_32_set_key 1047
+RC5_32_ecb_encrypt 1048
+RC5_32_encrypt 1049
+RC5_32_decrypt 1050
+RC5_32_cbc_encrypt 1051
+RC5_32_cfb64_encrypt 1052
+RC5_32_ofb64_encrypt 1053
+BN_bn2mpi 1058
+BN_mpi2bn 1059
+ASN1_BIT_STRING_get_bit 1060
+ASN1_BIT_STRING_set_bit 1061
+BIO_get_ex_data 1062
+BIO_get_ex_new_index 1063
+BIO_set_ex_data 1064
+X509_STORE_CTX_get_ex_new_index 1065
+X509v3_get_key_usage 1066
+X509v3_set_key_usage 1067
+a2i_X509v3_key_usage 1068
+i2a_X509v3_key_usage 1069
+EVP_PKEY_decrypt 1070
+EVP_PKEY_encrypt 1071
+PKCS7_RECIP_INFO_set 1072
+PKCS7_add_recipient 1073
+PKCS7_add_recipient_info 1074
+PKCS7_set_cipher 1075
+ASN1_TYPE_get_int_octetstring 1076
+ASN1_TYPE_get_octetstring 1077
+ASN1_TYPE_set_int_octetstring 1078
+ASN1_TYPE_set_octetstring 1079
+ASN1_UTCTIME_set_string 1080
+ERR_add_error_data 1081
+ERR_set_error_data 1082
+EVP_CIPHER_asn1_to_param 1083
+EVP_CIPHER_param_to_asn1 1084
+EVP_CIPHER_get_asn1_iv 1085
+EVP_CIPHER_set_asn1_iv 1086
+EVP_rc5_32_12_16_cbc 1087
+EVP_rc5_32_12_16_cfb 1088
+EVP_rc5_32_12_16_ecb 1089
+EVP_rc5_32_12_16_ofb 1090
+asn1_add_error 1091
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index ef07692890..6f0881a299 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -7,6 +7,8 @@
$INSTALLTOP="/usr/local/ssl";
+$ssl_version="0.8.2";
+
$infile="MINFO";
%ops=(
@@ -18,6 +20,7 @@ $infile="MINFO";
"BC-NT", "Borland C++ 4.5 - Windows NT - PROBABLY NOT WORKING",
"BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING",
"BC-MSDOS","Borland C++ 4.5 - MSDOS",
+ "linux-elf","Linux elf",
"FreeBSD","FreeBSD distribution",
"default","cc under unix",
);
@@ -27,15 +30,18 @@ foreach (@ARGV)
{
if (/^no-rc2$/) { $no_rc2=1; }
elsif (/^no-rc4$/) { $no_rc4=1; }
+ elsif (/^no-rc5$/) { $no_rc5=1; }
elsif (/^no-idea$/) { $no_idea=1; }
elsif (/^no-des$/) { $no_des=1; }
elsif (/^no-bf$/) { $no_bf=1; }
+ elsif (/^no-cast$/) { $no_cast=1; }
elsif (/^no-md2$/) { $no_md2=1; }
elsif (/^no-md5$/) { $no_md5=1; }
elsif (/^no-sha$/) { $no_sha=1; }
elsif (/^no-sha1$/) { $no_sha1=1; }
+ elsif (/^no-rmd160$/) { $no_rmd160=1; }
elsif (/^no-mdc2$/) { $no_mdc2=1; }
- elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_idea=$no_sha1=$no_rsa=1; }
+ elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_rc5=$no_idea=$no_rsa=1; }
elsif (/^no-rsa$/) { $no_rsa=1; }
elsif (/^no-dsa$/) { $no_dsa=1; }
elsif (/^no-dh$/) { $no_dh=1; }
@@ -45,6 +51,10 @@ foreach (@ARGV)
elsif (/^no-err$/) { $no_err=1; }
elsif (/^no-sock$/) { $no_sock=1; }
+ elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1;
+ $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1;
+ $no_ssl2=$no_err=1; }
+
elsif (/^rsaref$/) { $rsaref=1; }
elsif (/^gcc$/) { $gcc=1; }
elsif (/^debug$/) { $debug=1; }
@@ -65,8 +75,9 @@ foreach (@ARGV)
{ printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; }
print STDERR <<"EOF";
and [options] can be one of
- no-md2 no-md5 no-sha no-sha1 no-mdc2 - Skip this digest
- no-rc2 no-rc4 no-idea no-des no-bf - Skip this symetriccipher
+ no-md2 no-md5 no-sha no-sha1 no-mdc2 no-rmd160 - Skip this digest
+ no-rc2 no-rc4 no-idea no-des no-bf no-cast - Skip this symetric cipher
+ no-rc5
no-rsa no-dsa no-dh - Skip this public key cipher
no-ssl2 no-ssl3 - Skip this version of SSL
just-ssl - remove all non-ssl keys/digest
@@ -79,7 +90,7 @@ and [options] can be one of
rsaref - Build to require RSAref
Values that can be set
-TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath CC=C-compiler
+TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath INC=header-outdir CC=C-compiler
-L<ex_lib_path> -l<ex_lib> - extra library flags (unix)
-<ex_cc_flags> - extra 'cc' flags,
@@ -99,16 +110,21 @@ $no_ssl3=1 if ($no_rsa && $no_dh);
$no_ssl2=1 if ($no_md5 || $no_rsa);
$no_ssl2=1 if ($no_rsa);
-$cc=(defined($VARS{'CC'}))?$VARS{'CC'}:'cc';
-$src_dir=(defined($VARS{'SRC'}))?$VARS{'SRC'}:'.';
-$out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:'out';
-$tmp_dir=(defined($VARS{'TMP'}))?$VARS{'TMP'}:'tmp';
-$bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:'';
+$out_def="out";
+$inc_def="outinc";
+$tmp_def="tmp";
+
($ssl,$crypto)=("ssl","crypto");
$RSAglue="RSAglue";
$ranlib="echo ranlib";
+$cc=(defined($VARS{'CC'}))?$VARS{'CC'}:'cc';
+$src_dir=(defined($VARS{'SRC'}))?$VARS{'SRC'}:'.';
+$bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:'';
+
+# $bin_dir.=$o causes a core dump on my sparc :-(
+
push(@INC,"util/pl","pl");
if ($type eq "VC-MSDOS")
{
@@ -159,6 +175,12 @@ elsif ($type eq "FreeBSD")
require 'unix.pl';
$cflags='-DTERMIO -D_ANSI_SOURCE -O2 -fomit-frame-pointer';
}
+elsif ($type eq "linux-elf")
+ {
+ require "unix.pl";
+ require "linux.pl";
+ $unix=1;
+ }
else
{
require "unix.pl";
@@ -167,18 +189,24 @@ else
$cflags.=' -DTERMIO';
}
-# $bin_dir.=$o causes a core dump on my sparc :-(
+$out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":"");
+$tmp_dir=(defined($VARS{'TMP'}))?$VARS{'TMP'}:$tmp_def.($debug?".dbg":"");
+$inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def;
+
$bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq ''));
$cflags.=" -DNO_IDEA" if $no_idea;
$cflags.=" -DNO_RC2" if $no_rc2;
$cflags.=" -DNO_RC4" if $no_rc4;
+$cflags.=" -DNO_RC5" if $no_rc5;
$cflags.=" -DNO_MD2" if $no_md2;
$cflags.=" -DNO_MD5" if $no_md5;
$cflags.=" -DNO_SHA" if $no_sha;
$cflags.=" -DNO_SHA1" if $no_sha1;
+$cflags.=" -DNO_RMD160" if $no_rmd160;
$cflags.=" -DNO_MDC2" if $no_mdc2;
$cflags.=" -DNO_BLOWFISH" if $no_bf;
+$cflags.=" -DNO_CAST" if $no_cast;
$cflags.=" -DNO_DES" if $no_des;
$cflags.=" -DNO_RSA" if $no_rsa;
$cflags.=" -DNO_DSA" if $no_dsa;
@@ -234,6 +262,7 @@ CC=$bin_dir${cc}
CFLAG=$cflags
APP_CFLAG=$app_cflag
LIB_CFLAG=$lib_cflag
+SHLIB_CFLAG=$shl_cflag
APP_EX_OBJ=$app_ex_obj
SHLIB_EX_OBJ=$shlib_ex_obj
# add extra libraries to this define, for solaris -lsocket -lnsl would
@@ -254,11 +283,25 @@ DES_CRYPT_OBJ=$des_crypt_obj
DES_CRYPT_SRC=$des_crypt_src
BF_ENC_OBJ=$bf_enc_obj
BF_ENC_SRC=$bf_enc_src
+CAST_ENC_OBJ=$cast_enc_obj
+CAST_ENC_SRC=$cast_enc_src
+RC4_ENC_OBJ=$rc4_enc_obj
+RC4_ENC_SRC=$rc4_enc_src
+RC5_ENC_OBJ=$rc5_enc_obj
+RC5_ENC_SRC=$rc5_enc_src
+MD5_ASM_OBJ=$md5_asm_obj
+MD5_ASM_SRC=$md5_asm_src
+SHA1_ASM_OBJ=$sha1_asm_obj
+SHA1_ASM_SRC=$sha1_asm_src
+RMD160_ASM_OBJ=$rmd160_asm_obj
+RMD160_ASM_SRC=$rmd160_asm_src
# The output directory for everything intersting
OUT_D=$out_dir
# The output directory for all the temporary muck
TMP_D=$tmp_dir
+# The output directory for the header files
+INC_D=$inc_dir
CP=$cp
RM=$rm
@@ -280,11 +323,9 @@ RSAGLUE=$RSAglue
# BIN_D - Binary output directory
# TEST_D - Binary test file output directory
# LIB_D - library output directory
-# INC_D - include directory
BIN_D=\$(OUT_D)
TEST_D=\$(OUT_D)
LIB_D=\$(OUT_D)
-INC_D=\$(OUT_D)
# INCL_D - local library directory
# OBJ_D - temp object file directory
@@ -294,8 +335,10 @@ INCL_D=\$(TMP_D)
O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp
O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp
O_RSAGLUE= \$(LIB_D)$o$plib\$(RSAGLUE)$libp
-L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp
-L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp
+SO_SSL= $plib\$(SSL)$so_shlibp
+SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp
+L_SSL= \$(LIB_D)$o\$(SSL)$libp
+L_CRYPTO= \$(LIB_D)$o\$(CRYPTO)$libp
L_LIBS= \$(L_SSL) \$(L_CRYPTO)
#L_LIBS= \$(O_SSL) \$(O_RSAGLUE) -lrsaref \$(O_CRYPTO)
@@ -304,26 +347,36 @@ L_LIBS= \$(L_SSL) \$(L_CRYPTO)
# Don't touch anything below this point
######################################################
-INC=-DFLAT_INC -I\$(INC_D) -I\$(INCL_D)
+INC=-I\$(INC_D) -I\$(INCL_D)
APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG)
LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG)
+SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG)
LIBS_DEP=\$(O_CRYPTO) \$(O_RSAGLUE) \$(O_SSL)
#############################################
EOF
$rules=<<"EOF";
-all: banner \$(OUT_D) \$(TMP_D) headers lib exe
+all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INC_D) headers lib exe
banner:
$banner
-\$(OUT_D):
- \$(MKDIR) \$(OUT_D)
-
\$(TMP_D):
\$(MKDIR) \$(TMP_D)
+\$(BIN_D):
+ \$(MKDIR) \$(BIN_D)
+
+\$(TEST_D):
+ \$(MKDIR) \$(TEST_D)
+
+\$(LIB_D):
+ \$(MKDIR) \$(LIB_D)
+
+\$(INC_D):
+ \$(MKDIR) \$(INC_D)
+
headers: \$(HEADER) \$(EXHEADER)
lib: \$(LIBS_DEP)
@@ -335,10 +388,10 @@ install:
\$(MKDIR) \$(INSTALLTOP)${o}bin
\$(MKDIR) \$(INSTALLTOP)${o}include
\$(MKDIR) \$(INSTALLTOP)${o}lib
- \$(CP) \$(INC_D)${o}*.h \$(INSTALLTOP)${o}include
+ \$(CP) \$(INC_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include
\$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin
- \$(CP) \$(LIB_D)$o\$(O_SSL) \$(INSTALLTOP)${o}lib
- \$(CP) \$(LIB_D)$o\$(O_CRYPTO) \$(INSTALLTOP)${o}lib
+ \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib
+ \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib
clean:
\$(RM) \$(TMP_D)$o*.*
@@ -427,6 +480,9 @@ $rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)');
foreach (values %lib_nam)
{
$lib_obj=$lib_obj{$_};
+ local($slib)=$shlib;
+
+ $slib=0 if ($_ eq "RSAGLUE");
if (($_ eq "SSL") && $no_ssl2 && $no_ssl3)
{
@@ -442,22 +498,53 @@ foreach (values %lib_nam)
if (($bn_mulw_obj ne "") && ($_ eq "CRYPTO"))
{
- $lib_obj =~ s/\S*bn_mulw\S*/\$(BN_MULW_OBJ)/;
+ $lib_obj =~ s/\s\S*\/bn_mulw\S*/ \$(BN_MULW_OBJ)/;
$rules.=&do_asm_rule($bn_mulw_obj,$bn_mulw_src);
}
if (($des_enc_obj ne "") && ($_ eq "CRYPTO"))
{
- $lib_obj =~ s/\S*des_enc\S*/\$(DES_ENC_OBJ)/;
- $lib_obj =~ s/\S*fcrypt_b\S*\s*//;
+ $lib_obj =~ s/\s\S*des_enc\S*/ \$(DES_ENC_OBJ)/;
+ $lib_obj =~ s/\s\S*\/fcrypt_b\S*\s*/ /;
$rules.=&do_asm_rule($des_enc_obj,$des_enc_src);
}
if (($bf_enc_obj ne "") && ($_ eq "CRYPTO"))
{
- $lib_obj =~ s/\S*bf_enc\S*/\$(BF_ENC_OBJ)/;
+ $lib_obj =~ s/\s\S*\/bf_enc\S*/ \$(BF_ENC_OBJ)/;
$rules.=&do_asm_rule($bf_enc_obj,$bf_enc_src);
}
+ if (($cast_enc_obj ne "") && ($_ eq "CRYPTO"))
+ {
+ $lib_obj =~ s/(\s\S*\/c_enc\S*)/ \$(CAST_ENC_OBJ)/;
+ $rules.=&do_asm_rule($cast_enc_obj,$cast_enc_src);
+ }
+ if (($rc4_enc_obj ne "") && ($_ eq "CRYPTO"))
+ {
+ $lib_obj =~ s/\s\S*\/rc4_enc\S*/ \$(RC4_ENC_OBJ)/;
+ $rules.=&do_asm_rule($rc4_enc_obj,$rc4_enc_src);
+ }
+ if (($rc5_enc_obj ne "") && ($_ eq "CRYPTO"))
+ {
+ $lib_obj =~ s/\s\S*\/rc5_enc\S*/ \$(RC5_ENC_OBJ)/;
+ $rules.=&do_asm_rule($rc5_enc_obj,$rc5_enc_src);
+ }
+ if (($md5_asm_obj ne "") && ($_ eq "CRYPTO"))
+ {
+ $lib_obj =~ s/\s(\S*\/md5_dgst\S*)/ $1 \$(MD5_ASM_OBJ)/;
+ $rules.=&do_asm_rule($md5_asm_obj,$md5_asm_src);
+ }
+ if (($sha1_asm_obj ne "") && ($_ eq "CRYPTO"))
+ {
+ $lib_obj =~ s/\s(\S*\/sha1dgst\S*)/ $1 \$(SHA1_ASM_OBJ)/;
+ $rules.=&do_asm_rule($sha1_asm_obj,$sha1_asm_src);
+ }
+ if (($rmd160_asm_obj ne "") && ($_ eq "CRYPTO"))
+ {
+ $lib_obj =~ s/\s(\S*\/rmd_dgst\S*)/ $1 \$(RMD160_ASM_OBJ)/;
+ $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src);
+ }
$defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj);
- $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},"\$(LIB_CFLAGS)");
+ $lib=($slib)?" \$(SHLIB_CFLAGS)":" \$(LIB_CFLAGS)";
+ $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib);
}
$defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep);
@@ -468,10 +555,10 @@ foreach (split(/\s+/,$test))
$rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)");
}
-$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib);
-$rules.= &do_lib_rule("\$(RSAGLUEOBJ)","\$(O_RSAGLUE)",$RSAglue,0)
+$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
+$rules.= &do_lib_rule("\$(RSAGLUEOBJ)","\$(O_RSAGLUE)",$RSAglue,0,"")
unless $no_rsa;
-$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib);
+$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)");
$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)");
@@ -491,6 +578,7 @@ sub var_add
return("") if $no_idea && $dir =~ /\/idea/;
return("") if $no_rc2 && $dir =~ /\/rc2/;
return("") if $no_rc4 && $dir =~ /\/rc4/;
+ return("") if $no_rc5 && $dir =~ /\/rc5/;
return("") if $no_rsa && $dir =~ /\/rsa/;
return("") if $no_rsa && $dir =~ /^rsaref/;
return("") if $no_dsa && $dir =~ /\/dsa/;
@@ -505,6 +593,7 @@ sub var_add
return("") if $no_mdc2 && $dir =~ /\/mdc2/;
return("") if $no_sock && $dir =~ /\/proxy/;
return("") if $no_bf && $dir =~ /\/bf/;
+ return("") if $no_cast && $dir =~ /\/cast/;
$val =~ s/^\s*(.*)\s*$/$1/;
@a=split(/\s+/,$val);
@@ -514,7 +603,9 @@ sub var_add
@a=grep(!/^e_.*_d$/,@a) if $no_des;
@a=grep(!/^e_.*_i$/,@a) if $no_idea;
@a=grep(!/^e_.*_r2$/,@a) if $no_rc2;
+ @a=grep(!/^e_.*_r5$/,@a) if $no_rc5;
@a=grep(!/^e_.*_bf$/,@a) if $no_bf;
+ @a=grep(!/^e_.*_c$/,@a) if $no_cast;
@a=grep(!/^e_rc4$/,@a) if $no_rc4;
@a=grep(!/(^s2_)|(^s23_)/,@a) if $no_ssl2;
@@ -567,7 +658,7 @@ sub clean_up_ws
sub do_defs
{
local($var,$files,$location,$postfix)=@_;
- local($_,$ret);
+ local($_,$ret,$pf);
local(*OUT,$tmp,$t);
$files =~ s/\//$o/g if $o ne '/';
@@ -576,19 +667,26 @@ sub do_defs
$Vars{$var}.="";
foreach (split(/ /,$files))
{
+ $orig=$_;
$_=&bname($_) unless /^\$/;
if ($n++ == 2)
{
$n=0;
$ret.="\\\n\t";
}
- if ($_ =~ /BN_MULW/)
- { $t="$_ "; }
- elsif ($_ =~ /DES_ENC/)
- { $t="$_ "; }
- elsif ($_ =~ /BF_ENC/)
- { $t="$_ "; }
- else { $t="$location${o}$_$postfix "; }
+ if (($_ =~ /bss_file/) && ($postfix eq ".h"))
+ { $pf=".c"; }
+ else { $pf=$postfix; }
+ if ($_ =~ /BN_MULW/) { $t="$_ "; }
+ elsif ($_ =~ /DES_ENC/) { $t="$_ "; }
+ elsif ($_ =~ /BF_ENC/) { $t="$_ "; }
+ elsif ($_ =~ /CAST_ENC/){ $t="$_ "; }
+ elsif ($_ =~ /RC4_ENC/) { $t="$_ "; }
+ elsif ($_ =~ /RC5_ENC/) { $t="$_ "; }
+ elsif ($_ =~ /MD5_ASM/) { $t="$_ "; }
+ elsif ($_ =~ /SHA1_ASM/){ $t="$_ "; }
+ elsif ($_ =~ /RMD160_ASM/){ $t="$_ "; }
+ else { $t="$location${o}$_$pf "; }
$Vars{$var}.="$t ";
$ret.=$t;
@@ -610,13 +708,16 @@ sub bname
sub do_copy_rule
{
local($to,$files,$p)=@_;
- local($ret,$_,$n);
+ local($ret,$_,$n,$pp);
$files =~ s/\//$o/g if $o ne '/';
foreach (split(/\s+/,$files))
{
$n=&bname($_);
- $ret.="$to${o}$n$p: \$(SRC_D)$o$_$p\n\t\$(CP) \$(SRC_D)$o$_$p $to${o}$n$p\n\n";
+ if ($n =~ /bss_file/)
+ { $pp=".c"; }
+ else { $pp=$p; }
+ $ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \$(SRC_D)$o$_$pp $to${o}$n$pp\n\n";
}
return($ret);
}
diff --git a/util/mkdef.pl b/util/mkdef.pl
index fa683330e8..b8e99f012d 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -33,12 +33,15 @@ $crypto ="crypto/crypto.h";
$crypto.=" crypto/des/des.h";
$crypto.=" crypto/idea/idea.h";
$crypto.=" crypto/rc4/rc4.h";
+$crypto.=" crypto/rc5/rc5.h";
$crypto.=" crypto/rc2/rc2.h";
$crypto.=" crypto/bf/blowfish.h";
-$crypto.=" crypto/md/md2.h";
-$crypto.=" crypto/md/md5.h";
+$crypto.=" crypto/cast/cast.h";
+$crypto.=" crypto/md2/md2.h";
+$crypto.=" crypto/md5/md5.h";
$crypto.=" crypto/mdc2/mdc2.h";
$crypto.=" crypto/sha/sha.h";
+$crypto.=" crypto/ripemd/ripemd.h";
$crypto.=" crypto/bn/bn.h";
$crypto.=" crypto/rsa/rsa.h";
@@ -63,6 +66,7 @@ $crypto.=" crypto/pkcs7/pkcs7.h";
$crypto.=" crypto/x509/x509.h";
$crypto.=" crypto/x509/x509_vfy.h";
$crypto.=" crypto/rand/rand.h";
+$crypto.=" crypto/hmac/hmac.h";
$match{'NOPROTO'}=1;
$match2{'PERL5'}=1;
@@ -97,42 +101,45 @@ sub do_defs
}
foreach (split("\n",$a))
{
- if (/^\#ifndef (.*)/)
+ if (/^\#\s*ifndef (.*)/)
{
push(@tag,$1);
$tag{$1}=-1;
next;
}
- elsif (/^\#if !defined\(([^\)]+)\)/)
+ elsif (/^\#\s*if !defined\(([^\)]+)\)/)
{
push(@tag,$1);
$tag{$1}=-1;
next;
}
- elsif (/^\#ifdef (.*)/)
+ elsif (/^\#\s*ifdef (.*)/)
{
push(@tag,$1);
$tag{$1}=1;
next;
}
- elsif (/^\#if (.*)/)
+ elsif (/^\#\s*if defined(.*)/)
{
push(@tag,$1);
$tag{$1}=1;
next;
}
- elsif (/^\#endif/)
+ elsif (/^\#\s*endif/)
{
$tag{$tag[$#tag]}=0;
pop(@tag);
next;
}
- elsif (/^\#else/)
+ elsif (/^\#\s*else/)
{
$t=$tag[$#tag];
$tag{$t}= -$tag{$t};
next;
}
+#printf STDERR "$_\n%2d %2d %2d %2d %2d $NT\n",
+#$tag{'NOPROTO'},$tag{'FreeBSD'},$tag{'WIN16'},$tag{'PERL5'},$tag{'NO_FP_API'};
+
$t=undef;
if (/^extern .*;$/)
{ $t=&do_extern($name,$_); }
@@ -140,12 +147,20 @@ sub do_defs
($tag{'FreeBSD'} != 1) &&
(($NT && ($tag{'WIN16'} != 1)) ||
(!$NT && ($tag{'WIN16'} != -1))) &&
- ($tag{'PERL5'} != 1))
+ ($tag{'PERL5'} != 1) &&
+# ($tag{'_WINDLL'} != -1) &&
+ ((!$NT && $tag{'_WINDLL'} != -1) ||
+ ($NT && $tag{'_WINDLL'} != 1)) &&
+ ((($tag{'NO_FP_API'} != 1) && $NT) ||
+ (($tag{'NO_FP_API'} != -1) && !$NT)))
{ $t=&do_line($name,$_); }
+ else
+ { $t=undef; }
if (($t ne undef) && (!$done{$name,$t}))
{
$done{$name,$t}++;
push(@ret,$t);
+#printf STDERR "one:$t\n" if $t =~ /BIO_/;
}
}
close(IN);
@@ -160,6 +175,7 @@ sub do_line
return(undef) if /^$/;
return(undef) if /^\s/;
+#printf STDERR "two:$_\n" if $_ =~ /BIO_/;
if (/(CRYPTO_get_locking_callback)/)
{ return($1); }
elsif (/(CRYPTO_get_id_callback)/)
@@ -168,6 +184,22 @@ sub do_line
{ return($1); }
elsif (/(SSL_CTX_get_verify_callback)/)
{ return($1); }
+ elsif (/(SSL_get_info_callback)/)
+ { return($1); }
+ elsif ((!$NT) && /(ERR_load_