diff options
| author | beck <> | 1999-09-29 04:37:45 +0000 |
|---|---|---|
| committer | beck <> | 1999-09-29 04:37:45 +0000 |
| commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
| tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/util | |
| parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
| download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip | |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/util')
36 files changed, 2438 insertions, 599 deletions
diff --git a/src/lib/libcrypto/util/add_cr.pl b/src/lib/libcrypto/util/add_cr.pl index ddd6d61e2d..c7b62c11ec 100644 --- a/src/lib/libcrypto/util/add_cr.pl +++ b/src/lib/libcrypto/util/add_cr.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # This adds a copyright message to a souce code file. | 3 | # This adds a copyright message to a souce code file. |
| 4 | # It also gets the file name correct. | 4 | # It also gets the file name correct. |
diff --git a/src/lib/libcrypto/util/ck_errf.pl b/src/lib/libcrypto/util/ck_errf.pl index c5764e40df..7a24d6c5a2 100644 --- a/src/lib/libcrypto/util/ck_errf.pl +++ b/src/lib/libcrypto/util/ck_errf.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # This is just a quick script to scan for cases where the 'error' | 3 | # This is just a quick script to scan for cases where the 'error' |
| 4 | # function name in a XXXerr() macro is wrong. | 4 | # function name in a XXXerr() macro is wrong. |
| @@ -40,5 +40,6 @@ foreach $file (@ARGV) | |||
| 40 | # print "$func:$1\n"; | 40 | # print "$func:$1\n"; |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
| 43 | close(IN); | ||
| 43 | } | 44 | } |
| 44 | 45 | ||
diff --git a/src/lib/libcrypto/util/clean-depend.pl b/src/lib/libcrypto/util/clean-depend.pl new file mode 100644 index 0000000000..af676af751 --- /dev/null +++ b/src/lib/libcrypto/util/clean-depend.pl | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #!/usr/local/bin/perl -w | ||
| 2 | # Clean the dependency list in a makefile of standard includes... | ||
| 3 | # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | |||
| 7 | while(<STDIN>) { | ||
| 8 | print; | ||
| 9 | last if /^# DO NOT DELETE THIS LINE/; | ||
| 10 | } | ||
| 11 | |||
| 12 | my %files; | ||
| 13 | |||
| 14 | while(<STDIN>) { | ||
| 15 | my ($file,$deps)=/^(.*): (.*)$/; | ||
| 16 | next if !defined $deps; | ||
| 17 | my @deps=split ' ',$deps; | ||
| 18 | @deps=grep(!/^\/usr\/include/,@deps); | ||
| 19 | @deps=grep(!/^\/usr\/lib\/gcc-lib/,@deps); | ||
| 20 | push @{$files{$file}},@deps; | ||
| 21 | } | ||
| 22 | |||
| 23 | my $file; | ||
| 24 | foreach $file (sort keys %files) { | ||
| 25 | my $len=0; | ||
| 26 | my $dep; | ||
| 27 | foreach $dep (sort @{$files{$file}}) { | ||
| 28 | $len=0 if $len+length($dep)+1 >= 80; | ||
| 29 | if($len == 0) { | ||
| 30 | print "\n$file:"; | ||
| 31 | $len=length($file)+1; | ||
| 32 | } | ||
| 33 | print " $dep"; | ||
| 34 | $len+=length($dep)+1; | ||
| 35 | } | ||
| 36 | } | ||
| 37 | |||
| 38 | print "\n"; | ||
diff --git a/src/lib/libcrypto/util/deleof.pl b/src/lib/libcrypto/util/deleof.pl index 04f30f0e47..155acd88ff 100644 --- a/src/lib/libcrypto/util/deleof.pl +++ b/src/lib/libcrypto/util/deleof.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | 2 | ||
| 3 | while (<>) | 3 | while (<>) |
| 4 | { | 4 | { |
diff --git a/src/lib/libcrypto/util/do_ms.sh b/src/lib/libcrypto/util/do_ms.sh index f498d842b7..515b074cff 100644 --- a/src/lib/libcrypto/util/do_ms.sh +++ b/src/lib/libcrypto/util/do_ms.sh | |||
| @@ -5,11 +5,13 @@ | |||
| 5 | 5 | ||
| 6 | PATH=util:../util:$PATH | 6 | PATH=util:../util:$PATH |
| 7 | 7 | ||
| 8 | # perl util/mk1mf.pl VC-MSDOS no-sock >ms/msdos.mak | 8 | # perl util/mk1mf.pl no-sock VC-MSDOS >ms/msdos.mak |
| 9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak | 9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak |
| 10 | perl util/mk1mf.pl VC-WIN16 dll >ms/w31dll.mak | 10 | perl util/mk1mf.pl dll VC-WIN16 >ms/w31dll.mak |
| 11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak | 11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak |
| 12 | perl util/mk1mf.pl VC-WIN32 dll >ms/ntdll.mak | 12 | perl util/mk1mf.pl dll VC-WIN32 >ms/ntdll.mak |
| 13 | perl util/mk1mf.pl Mingw32 >ms/mingw32.mak | ||
| 14 | perl util/mk1mf.pl Mingw32-files >ms/mingw32f.mak | ||
| 13 | 15 | ||
| 14 | perl util/mkdef.pl 16 libeay > ms/libeay16.def | 16 | perl util/mkdef.pl 16 libeay > ms/libeay16.def |
| 15 | perl util/mkdef.pl 32 libeay > ms/libeay32.def | 17 | perl util/mkdef.pl 32 libeay > ms/libeay32.def |
diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd new file mode 100644 index 0000000000..324051f60b --- /dev/null +++ b/src/lib/libcrypto/util/domd | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # Do a makedepend, only leave out the standard headers | ||
| 3 | # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999 | ||
| 4 | |||
| 5 | TOP=$1 | ||
| 6 | shift | ||
| 7 | |||
| 8 | cp Makefile.ssl Makefile.save | ||
| 9 | makedepend -f Makefile.ssl $@ | ||
| 10 | $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new | ||
| 11 | mv Makefile.new Makefile.ssl | ||
diff --git a/src/lib/libcrypto/util/err-ins.pl b/src/lib/libcrypto/util/err-ins.pl index db1bb48275..31b70df8d0 100644 --- a/src/lib/libcrypto/util/err-ins.pl +++ b/src/lib/libcrypto/util/err-ins.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # tack error codes onto the end of a file | 3 | # tack error codes onto the end of a file |
| 4 | # | 4 | # |
diff --git a/src/lib/libcrypto/util/files.pl b/src/lib/libcrypto/util/files.pl index bf3b7effdc..41f033e3b9 100644 --- a/src/lib/libcrypto/util/files.pl +++ b/src/lib/libcrypto/util/files.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # used to generate the file MINFO for use by util/mk1mf.pl | 3 | # used to generate the file MINFO for use by util/mk1mf.pl |
| 4 | # It is basically a list of all variables from the passed makefile | 4 | # It is basically a list of all variables from the passed makefile |
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index fcaf254287..59c2040a29 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num | |||
| @@ -580,7 +580,7 @@ X509_NAME_oneline 585 | |||
| 580 | X509_NAME_print 586 | 580 | X509_NAME_print 586 |
| 581 | X509_NAME_set 587 | 581 | X509_NAME_set 587 |
| 582 | X509_OBJECT_free_contents 588 | 582 | X509_OBJECT_free_contents 588 |
| 583 | X509_OBJECT_retrive_by_subject 589 | 583 | X509_OBJECT_retrieve_by_subject 589 |
| 584 | X509_OBJECT_up_ref_count 590 | 584 | X509_OBJECT_up_ref_count 590 |
| 585 | X509_PKEY_free 591 | 585 | X509_PKEY_free 591 |
| 586 | X509_PKEY_new 592 | 586 | X509_PKEY_new 592 |
| @@ -695,12 +695,12 @@ a2i_ASN1_INTEGER 700 | |||
| 695 | a2i_ASN1_STRING 701 | 695 | a2i_ASN1_STRING 701 |
| 696 | asn1_Finish 702 | 696 | asn1_Finish 702 |
| 697 | asn1_GetSequence 703 | 697 | asn1_GetSequence 703 |
| 698 | bn_div64 704 | 698 | bn_div_words 704 |
| 699 | bn_expand2 705 | 699 | bn_expand2 705 |
| 700 | bn_mul_add_words 706 | 700 | bn_mul_add_words 706 |
| 701 | bn_mul_words 707 | 701 | bn_mul_words 707 |
| 702 | bn_qadd 708 | 702 | BN_uadd 708 |
| 703 | bn_qsub 709 | 703 | BN_usub 709 |
| 704 | bn_sqr_words 710 | 704 | bn_sqr_words 710 |
| 705 | crypt 711 | 705 | crypt 711 |
| 706 | d2i_ASN1_BIT_STRING 712 | 706 | d2i_ASN1_BIT_STRING 712 |
| @@ -1063,3 +1063,784 @@ EVP_rc5_32_12_16_cfb 1088 | |||
| 1063 | EVP_rc5_32_12_16_ecb 1089 | 1063 | EVP_rc5_32_12_16_ecb 1089 |
| 1064 | EVP_rc5_32_12_16_ofb 1090 | 1064 | EVP_rc5_32_12_16_ofb 1090 |
| 1065 | asn1_add_error 1091 | 1065 | asn1_add_error 1091 |
| 1066 | d2i_ASN1_BMPSTRING 1092 | ||
| 1067 | i2d_ASN1_BMPSTRING 1093 | ||
| 1068 | BIO_f_ber 1094 | ||
| 1069 | BN_init 1095 | ||
| 1070 | COMP_CTX_new 1096 | ||
| 1071 | COMP_CTX_free 1097 | ||
| 1072 | COMP_CTX_compress_block 1098 | ||
| 1073 | COMP_CTX_expand_block 1099 | ||
| 1074 | X509_STORE_CTX_get_ex_new_index 1100 | ||
| 1075 | OBJ_NAME_add 1101 | ||
| 1076 | BIO_socket_nbio 1102 | ||
| 1077 | EVP_rc2_64_cbc 1103 | ||
| 1078 | OBJ_NAME_cleanup 1104 | ||
| 1079 | OBJ_NAME_get 1105 | ||
| 1080 | OBJ_NAME_init 1106 | ||
| 1081 | OBJ_NAME_new_index 1107 | ||
| 1082 | OBJ_NAME_remove 1108 | ||
| 1083 | BN_MONT_CTX_copy 1109 | ||
| 1084 | BIO_new_socks4a_connect 1110 | ||
| 1085 | BIO_s_socks4a_connect 1111 | ||
| 1086 | PROXY_set_connect_mode 1112 | ||
| 1087 | RAND_SSLeay 1113 | ||
| 1088 | RAND_set_rand_method 1114 | ||
| 1089 | RSA_memory_lock 1115 | ||
| 1090 | bn_sub_words 1116 | ||
| 1091 | bn_mul_normal 1117 | ||
| 1092 | bn_mul_comba8 1118 | ||
| 1093 | bn_mul_comba4 1119 | ||
| 1094 | bn_sqr_normal 1120 | ||
| 1095 | bn_sqr_comba8 1121 | ||
| 1096 | bn_sqr_comba4 1122 | ||
| 1097 | bn_cmp_words 1123 | ||
| 1098 | bn_mul_recursive 1124 | ||
| 1099 | bn_mul_part_recursive 1125 | ||
| 1100 | bn_sqr_recursive 1126 | ||
| 1101 | bn_mul_low_normal 1127 | ||
| 1102 | BN_RECP_CTX_init 1128 | ||
| 1103 | BN_RECP_CTX_new 1129 | ||
| 1104 | BN_RECP_CTX_free 1130 | ||
| 1105 | BN_RECP_CTX_set 1131 | ||
| 1106 | BN_mod_mul_reciprocal 1132 | ||
| 1107 | BN_mod_exp_recp 1133 | ||
| 1108 | BN_div_recp 1134 | ||
| 1109 | BN_CTX_init 1135 | ||
| 1110 | BN_MONT_CTX_init 1136 | ||
| 1111 | RAND_get_rand_method 1137 | ||
| 1112 | PKCS7_add_attribute 1138 | ||
| 1113 | PKCS7_add_signed_attribute 1139 | ||
| 1114 | PKCS7_digest_from_attributes 1140 | ||
| 1115 | PKCS7_get_attribute 1141 | ||
| 1116 | PKCS7_get_issuer_and_serial 1142 | ||
| 1117 | PKCS7_get_signed_attribute 1143 | ||
| 1118 | COMP_compress_block 1144 | ||
| 1119 | COMP_expand_block 1145 | ||
| 1120 | COMP_rle 1146 | ||
| 1121 | COMP_zlib 1147 | ||
| 1122 | ms_time_diff 1148 | ||
| 1123 | ms_time_new 1149 | ||
| 1124 | ms_time_free 1150 | ||
| 1125 | ms_time_cmp 1151 | ||
| 1126 | ms_time_get 1152 | ||
| 1127 | PKCS7_set_attributes 1153 | ||
| 1128 | PKCS7_set_signed_attributes 1154 | ||
| 1129 | X509_ATTRIBUTE_create 1155 | ||
| 1130 | X509_ATTRIBUTE_dup 1156 | ||
| 1131 | ASN1_GENERALIZEDTIME_check 1157 | ||
| 1132 | ASN1_GENERALIZEDTIME_print 1158 | ||
| 1133 | ASN1_GENERALIZEDTIME_set 1159 | ||
| 1134 | ASN1_GENERALIZEDTIME_set_string 1160 | ||
| 1135 | ASN1_TIME_print 1161 | ||
| 1136 | BASIC_CONSTRAINTS_free 1162 | ||
| 1137 | BASIC_CONSTRAINTS_new 1163 | ||
| 1138 | ERR_load_X509V3_strings 1164 | ||
| 1139 | NETSCAPE_CERT_SEQUENCE_free 1165 | ||
| 1140 | NETSCAPE_CERT_SEQUENCE_new 1166 | ||
| 1141 | OBJ_txt2obj 1167 | ||
| 1142 | PEM_read_NETSCAPE_CERT_SEQUENCE 1168 | ||
| 1143 | PEM_read_bio_NETSCAPE_CERT_SEQUENCE 1169 | ||
| 1144 | PEM_write_NETSCAPE_CERT_SEQUENCE 1170 | ||
| 1145 | PEM_write_bio_NETSCAPE_CERT_SEQUENCE 1171 | ||
| 1146 | X509V3_EXT_add 1172 | ||
| 1147 | X509V3_EXT_add_alias 1173 | ||
| 1148 | X509V3_EXT_add_conf 1174 | ||
| 1149 | X509V3_EXT_cleanup 1175 | ||
| 1150 | X509V3_EXT_conf 1176 | ||
| 1151 | X509V3_EXT_conf_nid 1177 | ||
| 1152 | X509V3_EXT_get 1178 | ||
| 1153 | X509V3_EXT_get_nid 1179 | ||
| 1154 | X509V3_EXT_print 1180 | ||
| 1155 | X509V3_EXT_print_fp 1181 | ||
| 1156 | X509V3_add_standard_extensions 1182 | ||
| 1157 | X509V3_add_value 1183 | ||
| 1158 | X509V3_add_value_bool 1184 | ||
| 1159 | X509V3_add_value_int 1185 | ||
| 1160 | X509V3_conf_free 1186 | ||
| 1161 | X509V3_get_value_bool 1187 | ||
| 1162 | X509V3_get_value_int 1188 | ||
| 1163 | X509V3_parse_list 1189 | ||
| 1164 | d2i_ASN1_GENERALIZEDTIME 1190 | ||
| 1165 | d2i_ASN1_TIME 1191 | ||
| 1166 | d2i_BASIC_CONSTRAINTS 1192 | ||
| 1167 | d2i_NETSCAPE_CERT_SEQUENCE 1193 | ||
| 1168 | d2i_ext_ku 1194 | ||
| 1169 | ext_ku_free 1195 | ||
| 1170 | ext_ku_new 1196 | ||
| 1171 | i2d_ASN1_GENERALIZEDTIME 1197 | ||
| 1172 | i2d_ASN1_TIME 1198 | ||
| 1173 | i2d_BASIC_CONSTRAINTS 1199 | ||
| 1174 | i2d_NETSCAPE_CERT_SEQUENCE 1200 | ||
| 1175 | i2d_ext_ku 1201 | ||
| 1176 | EVP_MD_CTX_copy 1202 | ||
| 1177 | i2d_ASN1_ENUMERATED 1203 | ||
| 1178 | d2i_ASN1_ENUMERATED 1204 | ||
| 1179 | ASN1_ENUMERATED_set 1205 | ||
| 1180 | ASN1_ENUMERATED_get 1206 | ||
| 1181 | BN_to_ASN1_ENUMERATED 1207 | ||
| 1182 | ASN1_ENUMERATED_to_BN 1208 | ||
| 1183 | i2a_ASN1_ENUMERATED 1209 | ||
| 1184 | a2i_ASN1_ENUMERATED 1210 | ||
| 1185 | i2d_GENERAL_NAME 1211 | ||
| 1186 | d2i_GENERAL_NAME 1212 | ||
| 1187 | GENERAL_NAME_new 1213 | ||
| 1188 | GENERAL_NAME_free 1214 | ||
| 1189 | GENERAL_NAMES_new 1215 | ||
| 1190 | GENERAL_NAMES_free 1216 | ||
| 1191 | d2i_GENERAL_NAMES 1217 | ||
| 1192 | i2d_GENERAL_NAMES 1218 | ||
| 1193 | i2v_GENERAL_NAMES 1219 | ||
| 1194 | i2s_ASN1_OCTET_STRING 1220 | ||
| 1195 | s2i_ASN1_OCTET_STRING 1221 | ||
| 1196 | X509V3_EXT_check_conf 1222 | ||
| 1197 | hex_to_string 1223 | ||
| 1198 | string_to_hex 1224 | ||
| 1199 | des_ede3_cbcm_encrypt 1225 | ||
| 1200 | RSA_padding_add_PKCS1_OAEP 1226 | ||
| 1201 | RSA_padding_check_PKCS1_OAEP 1227 | ||
| 1202 | X509_CRL_print_fp 1228 | ||
| 1203 | X509_CRL_print 1229 | ||
| 1204 | i2v_GENERAL_NAME 1230 | ||
| 1205 | v2i_GENERAL_NAME 1231 | ||
| 1206 | i2d_PKEY_USAGE_PERIOD 1232 | ||
| 1207 | d2i_PKEY_USAGE_PERIOD 1233 | ||
| 1208 | PKEY_USAGE_PERIOD_new 1234 | ||
| 1209 | PKEY_USAGE_PERIOD_free 1235 | ||
| 1210 | v2i_GENERAL_NAMES 1236 | ||
| 1211 | i2s_ASN1_INTEGER 1237 | ||
| 1212 | X509V3_EXT_d2i 1238 | ||
| 1213 | name_cmp 1239 | ||
| 1214 | str_dup 1240 | ||
| 1215 | i2s_ASN1_ENUMERATED 1241 | ||
| 1216 | i2s_ASN1_ENUMERATED_TABLE 1242 | ||
| 1217 | BIO_s_log 1243 | ||
| 1218 | BIO_f_reliable 1244 | ||
| 1219 | PKCS7_dataFinal 1245 | ||
| 1220 | PKCS7_dataDecode 1246 | ||
| 1221 | X509V3_EXT_CRL_add_conf 1247 | ||
| 1222 | BN_set_params 1248 | ||
| 1223 | BN_get_params 1249 | ||
| 1224 | BIO_get_ex_num 1250 | ||
| 1225 | BIO_set_ex_free_func 1251 | ||
| 1226 | EVP_ripemd160 1252 | ||
| 1227 | ASN1_TIME_set 1253 | ||
| 1228 | i2d_AUTHORITY_KEYID 1254 | ||
| 1229 | d2i_AUTHORITY_KEYID 1255 | ||
| 1230 | AUTHORITY_KEYID_new 1256 | ||
| 1231 | AUTHORITY_KEYID_free 1257 | ||
| 1232 | ASN1_seq_unpack 1258 | ||
| 1233 | ASN1_seq_pack 1259 | ||
| 1234 | ASN1_unpack_string 1260 | ||
| 1235 | ASN1_pack_string 1261 | ||
| 1236 | PKCS12_pack_safebag 1262 | ||
| 1237 | PKCS12_MAKE_KEYBAG 1263 | ||
| 1238 | PKCS8_encrypt 1264 | ||
| 1239 | PKCS12_MAKE_SHKEYBAG 1265 | ||
| 1240 | PKCS12_pack_p7data 1266 | ||
| 1241 | PKCS12_pack_p7encdata 1267 | ||
| 1242 | PKCS12_add_localkeyid 1268 | ||
| 1243 | PKCS12_add_friendlyname_asc 1269 | ||
| 1244 | PKCS12_add_friendlyname_uni 1270 | ||
| 1245 | PKCS12_get_friendlyname 1271 | ||
| 1246 | PKCS12_pbe_crypt 1272 | ||
| 1247 | PKCS12_decrypt_d2i 1273 | ||
| 1248 | PKCS12_i2d_encrypt 1274 | ||
| 1249 | PKCS12_init 1275 | ||
| 1250 | PKCS12_key_gen_asc 1276 | ||
| 1251 | PKCS12_key_gen_uni 1277 | ||
| 1252 | PKCS12_gen_mac 1278 | ||
| 1253 | PKCS12_verify_mac 1279 | ||
| 1254 | PKCS12_set_mac 1280 | ||
| 1255 | PKCS12_setup_mac 1281 | ||
| 1256 | asc2uni 1282 | ||
| 1257 | uni2asc 1283 | ||
| 1258 | i2d_PKCS12_BAGS 1284 | ||
| 1259 | PKCS12_BAGS_new 1285 | ||
| 1260 | d2i_PKCS12_BAGS 1286 | ||
| 1261 | PKCS12_BAGS_free 1287 | ||
| 1262 | i2d_PKCS12 1288 | ||
| 1263 | d2i_PKCS12 1289 | ||
| 1264 | PKCS12_new 1290 | ||
| 1265 | PKCS12_free 1291 | ||
| 1266 | i2d_PKCS12_MAC_DATA 1292 | ||
| 1267 | PKCS12_MAC_DATA_new 1293 | ||
| 1268 | d2i_PKCS12_MAC_DATA 1294 | ||
| 1269 | PKCS12_MAC_DATA_free 1295 | ||
| 1270 | i2d_PKCS12_SAFEBAG 1296 | ||
| 1271 | PKCS12_SAFEBAG_new 1297 | ||
| 1272 | d2i_PKCS12_SAFEBAG 1298 | ||
| 1273 | PKCS12_SAFEBAG_free 1299 | ||
| 1274 | ERR_load_PKCS12_strings 1300 | ||
| 1275 | PKCS12_PBE_add 1301 | ||
| 1276 | PKCS8_add_keyusage 1302 | ||
| 1277 | PKCS12_get_attr_gen 1303 | ||
| 1278 | PKCS12_parse 1304 | ||
| 1279 | PKCS12_create 1305 | ||
| 1280 | i2d_PKCS12_bio 1306 | ||
| 1281 | i2d_PKCS12_fp 1307 | ||
| 1282 | d2i_PKCS12_bio 1308 | ||
| 1283 | d2i_PKCS12_fp 1309 | ||
| 1284 | i2d_PBEPARAM 1310 | ||
| 1285 | PBEPARAM_new 1311 | ||
| 1286 | d2i_PBEPARAM 1312 | ||
| 1287 | PBEPARAM_free 1313 | ||
| 1288 | i2d_PKCS8_PRIV_KEY_INFO 1314 | ||
| 1289 | PKCS8_PRIV_KEY_INFO_new 1315 | ||
| 1290 | d2i_PKCS8_PRIV_KEY_INFO 1316 | ||
| 1291 | PKCS8_PRIV_KEY_INFO_free 1317 | ||
| 1292 | EVP_PKCS82PKEY 1318 | ||
| 1293 | EVP_PKEY2PKCS8 1319 | ||
| 1294 | PKCS8_set_broken 1320 | ||
| 1295 | EVP_PBE_ALGOR_CipherInit 1321 | ||
| 1296 | EVP_PBE_alg_add 1322 | ||
| 1297 | PKCS5_pbe_set 1323 | ||
| 1298 | EVP_PBE_cleanup 1324 | ||
| 1299 | i2d_SXNET 1325 | ||
| 1300 | d2i_SXNET 1326 | ||
| 1301 | SXNET_new 1327 | ||
| 1302 | SXNET_free 1328 | ||
| 1303 | i2d_SXNETID 1329 | ||
| 1304 | d2i_SXNETID 1330 | ||
| 1305 | SXNETID_new 1331 | ||
| 1306 | SXNETID_free 1332 | ||
| 1307 | DSA_SIG_new 1333 | ||
| 1308 | DSA_SIG_free 1334 | ||
| 1309 | DSA_do_sign 1335 | ||
| 1310 | DSA_do_verify 1336 | ||
| 1311 | d2i_DSA_SIG 1337 | ||
| 1312 | i2d_DSA_SIG 1338 | ||
| 1313 | |||
| 1314 | i2d_ASN1_VISIBLESTRING 1339 | ||
| 1315 | d2i_ASN1_VISIBLESTRING 1340 | ||
| 1316 | i2d_ASN1_UTF8STRING 1341 | ||
| 1317 | d2i_ASN1_UTF8STRING 1342 | ||
| 1318 | i2d_DIRECTORYSTRING 1343 | ||
| 1319 | d2i_DIRECTORYSTRING 1344 | ||
| 1320 | i2d_DISPLAYTEXT 1345 | ||
| 1321 | d2i_DISPLAYTEXT 1346 | ||
| 1322 | sk_X509_NAME_new 1347 | ||
| 1323 | sk_X509_NAME_new_null 1348 | ||
| 1324 | sk_X509_NAME_free 1349 | ||
| 1325 | sk_X509_NAME_num 1350 | ||
| 1326 | sk_X509_NAME_value 1351 | ||
| 1327 | sk_X509_NAME_set 1352 | ||
| 1328 | sk_X509_NAME_zero 1353 | ||
| 1329 | sk_X509_NAME_push 1354 | ||
| 1330 | sk_X509_NAME_pop 1355 | ||
| 1331 | sk_X509_NAME_find 1356 | ||
| 1332 | sk_X509_NAME_delete 1357 | ||
| 1333 | sk_X509_NAME_delete_ptr 1358 | ||
| 1334 | sk_X509_NAME_set_cmp_func 1359 | ||
| 1335 | sk_X509_NAME_dup 1360 | ||
| 1336 | sk_X509_NAME_pop_free 1361 | ||
| 1337 | sk_X509_NAME_shift 1362 | ||
| 1338 | sk_X509_new 1363 | ||
| 1339 | sk_X509_new_null 1364 | ||
| 1340 | sk_X509_free 1365 | ||
| 1341 | sk_X509_num 1366 | ||
| 1342 | sk_X509_value 1367 | ||
| 1343 | sk_X509_set 1368 | ||
| 1344 | sk_X509_zero 1369 | ||
| 1345 | sk_X509_push 1370 | ||
| 1346 | sk_X509_pop 1371 | ||
| 1347 | sk_X509_find 1372 | ||
| 1348 | sk_X509_delete 1373 | ||
| 1349 | sk_X509_delete_ptr 1374 | ||
| 1350 | sk_X509_set_cmp_func 1375 | ||
| 1351 | sk_X509_dup 1376 | ||
| 1352 | sk_X509_pop_free 1377 | ||
| 1353 | sk_X509_shift 1378 | ||
| 1354 | d2i_ASN1_SET_OF_X509 1379 | ||
| 1355 | i2d_ASN1_SET_OF_X509 1380 | ||
| 1356 | sk_X509_ATTRIBUTE_new 1381 | ||
| 1357 | sk_X509_ATTRIBUTE_new_null 1382 | ||
| 1358 | sk_X509_ATTRIBUTE_free 1383 | ||
| 1359 | sk_X509_ATTRIBUTE_num 1384 | ||
| 1360 | sk_X509_ATTRIBUTE_value 1385 | ||
| 1361 | sk_X509_ATTRIBUTE_set 1386 | ||
| 1362 | sk_X509_ATTRIBUTE_zero 1387 | ||
| 1363 | sk_X509_ATTRIBUTE_push 1388 | ||
| 1364 | sk_X509_ATTRIBUTE_pop 1389 | ||
| 1365 | sk_X509_ATTRIBUTE_find 1390 | ||
| 1366 | sk_X509_ATTRIBUTE_delete 1391 | ||
| 1367 | sk_X509_ATTRIBUTE_delete_ptr 1392 | ||
| 1368 | sk_X509_ATTRIBUTE_set_cmp_func 1393 | ||
| 1369 | sk_X509_ATTRIBUTE_dup 1394 | ||
| 1370 | sk_X509_ATTRIBUTE_pop_free 1395 | ||
| 1371 | sk_X509_ATTRIBUTE_shift 1396 | ||
| 1372 | i2d_PBKDF2PARAM 1397 | ||
| 1373 | PBKDF2PARAM_new 1398 | ||
| 1374 | d2i_PBKDF2PARAM 1399 | ||
| 1375 | PBKDF2PARAM_free 1400 | ||
| 1376 | i2d_PBE2PARAM 1401 | ||
| 1377 | PBE2PARAM_new 1402 | ||
| 1378 | d2i_PBE2PARAM 1403 | ||
| 1379 | PBE2PARAM_free 1404 | ||
| 1380 | sk_GENERAL_NAME_new 1405 | ||
| 1381 | sk_GENERAL_NAME_new_null 1406 | ||
| 1382 | sk_GENERAL_NAME_free 1407 | ||
| 1383 | sk_GENERAL_NAME_num 1408 | ||
| 1384 | sk_GENERAL_NAME_value 1409 | ||
| 1385 | sk_GENERAL_NAME_set 1410 | ||
| 1386 | sk_GENERAL_NAME_zero 1411 | ||
| 1387 | sk_GENERAL_NAME_push 1412 | ||
| 1388 | sk_GENERAL_NAME_pop 1413 | ||
| 1389 | sk_GENERAL_NAME_find 1414 | ||
| 1390 | sk_GENERAL_NAME_delete 1415 | ||
| 1391 | sk_GENERAL_NAME_delete_ptr 1416 | ||
| 1392 | sk_GENERAL_NAME_set_cmp_func 1417 | ||
| 1393 | sk_GENERAL_NAME_dup 1418 | ||
| 1394 | sk_GENERAL_NAME_pop_free 1419 | ||
| 1395 | sk_GENERAL_NAME_shift 1420 | ||
| 1396 | d2i_ASN1_SET_OF_GENERAL_NAME 1421 | ||
| 1397 | i2d_ASN1_SET_OF_GENERAL_NAME 1422 | ||
| 1398 | sk_SXNETID_new 1423 | ||
| 1399 | sk_SXNETID_new_null 1424 | ||
| 1400 | sk_SXNETID_free 1425 | ||
| 1401 | sk_SXNETID_num 1426 | ||
| 1402 | sk_SXNETID_value 1427 | ||
| 1403 | sk_SXNETID_set 1428 | ||
| 1404 | sk_SXNETID_zero 1429 | ||
| 1405 | sk_SXNETID_push 1430 | ||
| 1406 | sk_SXNETID_pop 1431 | ||
| 1407 | sk_SXNETID_find 1432 | ||
| 1408 | sk_SXNETID_delete 1433 | ||
| 1409 | sk_SXNETID_delete_ptr 1434 | ||
| 1410 | sk_SXNETID_set_cmp_func 1435 | ||
| 1411 | sk_SXNETID_dup 1436 | ||
| 1412 | sk_SXNETID_pop_free 1437 | ||
| 1413 | sk_SXNETID_shift 1438 | ||
| 1414 | d2i_ASN1_SET_OF_SXNETID 1439 | ||
| 1415 | i2d_ASN1_SET_OF_SXNETID 1440 | ||
| 1416 | sk_POLICYQUALINFO_new 1441 | ||
| 1417 | sk_POLICYQUALINFO_new_null 1442 | ||
| 1418 | sk_POLICYQUALINFO_free 1443 | ||
| 1419 | sk_POLICYQUALINFO_num 1444 | ||
| 1420 | sk_POLICYQUALINFO_value 1445 | ||
| 1421 | sk_POLICYQUALINFO_set 1446 | ||
| 1422 | sk_POLICYQUALINFO_zero 1447 | ||
| 1423 | sk_POLICYQUALINFO_push 1448 | ||
| 1424 | sk_POLICYQUALINFO_pop 1449 | ||
| 1425 | sk_POLICYQUALINFO_find 1450 | ||
| 1426 | sk_POLICYQUALINFO_delete 1451 | ||
| 1427 | sk_POLICYQUALINFO_delete_ptr 1452 | ||
| 1428 | sk_POLICYQUALINFO_set_cmp_func 1453 | ||
| 1429 | sk_POLICYQUALINFO_dup 1454 | ||
| 1430 | sk_POLICYQUALINFO_pop_free 1455 | ||
| 1431 | sk_POLICYQUALINFO_shift 1456 | ||
| 1432 | d2i_ASN1_SET_OF_POLICYQUALINFO 1457 | ||
| 1433 | i2d_ASN1_SET_OF_POLICYQUALINFO 1458 | ||
| 1434 | sk_POLICYINFO_new 1459 | ||
| 1435 | sk_POLICYINFO_new_null 1460 | ||
| 1436 | sk_POLICYINFO_free 1461 | ||
| 1437 | sk_POLICYINFO_num 1462 | ||
| 1438 | sk_POLICYINFO_value 1463 | ||
| 1439 | sk_POLICYINFO_set 1464 | ||
| 1440 | sk_POLICYINFO_zero 1465 | ||
| 1441 | sk_POLICYINFO_push 1466 | ||
| 1442 | sk_POLICYINFO_pop 1467 | ||
| 1443 | sk_POLICYINFO_find 1468 | ||
| 1444 | sk_POLICYINFO_delete 1469 | ||
| 1445 | sk_POLICYINFO_delete_ptr 1470 | ||
| 1446 | sk_POLICYINFO_set_cmp_func 1471 | ||
| 1447 | sk_POLICYINFO_dup 1472 | ||
| 1448 | sk_POLICYINFO_pop_free 1473 | ||
| 1449 | sk_POLICYINFO_shift 1474 | ||
| 1450 | d2i_ASN1_SET_OF_POLICYINFO 1475 | ||
| 1451 | i2d_ASN1_SET_OF_POLICYINFO 1476 | ||
| 1452 | SXNET_add_id_asc 1477 | ||
| 1453 | SXNET_add_id_ulong 1478 | ||
| 1454 | SXNET_add_id_INTEGER 1479 | ||
| 1455 | SXNET_get_id_asc 1480 | ||
| 1456 | SXNET_get_id_ulong 1481 | ||
| 1457 | SXNET_get_id_INTEGER 1482 | ||
| 1458 | X509V3_set_conf_lhash 1483 | ||
| 1459 | i2d_CERTIFICATEPOLICIES 1484 | ||
| 1460 | CERTIFICATEPOLICIES_new 1485 | ||
| 1461 | CERTIFICATEPOLICIES_free 1486 | ||
| 1462 | d2i_CERTIFICATEPOLICIES 1487 | ||
| 1463 | i2d_POLICYINFO 1488 | ||
| 1464 | POLICYINFO_new 1489 | ||
| 1465 | d2i_POLICYINFO 1490 | ||
| 1466 | POLICYINFO_free 1491 | ||
| 1467 | i2d_POLICYQUALINFO 1492 | ||
| 1468 | POLICYQUALINFO_new 1493 | ||
| 1469 | d2i_POLICYQUALINFO 1494 | ||
| 1470 | POLICYQUALINFO_free 1495 | ||
| 1471 | i2d_USERNOTICE 1496 | ||
| 1472 | USERNOTICE_new 1497 | ||
| 1473 | d2i_USERNOTICE 1498 | ||
| 1474 | USERNOTICE_free 1499 | ||
| 1475 | i2d_NOTICEREF 1500 | ||
| 1476 | NOTICEREF_new 1501 | ||
| 1477 | d2i_NOTICEREF 1502 | ||
| 1478 | NOTICEREF_free 1503 | ||
| 1479 | X509V3_get_string 1504 | ||
| 1480 | X509V3_get_section 1505 | ||
| 1481 | X509V3_string_free 1506 | ||
| 1482 | X509V3_section_free 1507 | ||
| 1483 | X509V3_set_ctx 1508 | ||
| 1484 | s2i_ASN1_INTEGER 1509 | ||
| 1485 | CRYPTO_set_locked_mem_functions 1510 | ||
| 1486 | CRYPTO_get_locked_mem_functions 1511 | ||
| 1487 | CRYPTO_malloc_locked 1512 | ||
| 1488 | CRYPTO_free_locked 1513 | ||
| 1489 | BN_mod_exp2_mont 1514 | ||
| 1490 | ERR_get_error_line_data 1515 | ||
| 1491 | ERR_peek_error_line_data 1516 | ||
| 1492 | PKCS12_PBE_keyivgen 1517 | ||
| 1493 | X509_ALGOR_dup 1518 | ||
| 1494 | sk_DIST_POINT_new 1519 | ||
| 1495 | sk_DIST_POINT_new_null 1520 | ||
| 1496 | sk_DIST_POINT_free 1521 | ||
| 1497 | sk_DIST_POINT_num 1522 | ||
| 1498 | sk_DIST_POINT_value 1523 | ||
| 1499 | sk_DIST_POINT_set 1524 | ||
| 1500 | sk_DIST_POINT_zero 1525 | ||
| 1501 | sk_DIST_POINT_push 1526 | ||
| 1502 | sk_DIST_POINT_pop 1527 | ||
| 1503 | sk_DIST_POINT_find 1528 | ||
| 1504 | sk_DIST_POINT_delete 1529 | ||
| 1505 | sk_DIST_POINT_delete_ptr 1530 | ||
| 1506 | sk_DIST_POINT_set_cmp_func 1531 | ||
| 1507 | sk_DIST_POINT_dup 1532 | ||
| 1508 | sk_DIST_POINT_pop_free 1533 | ||
| 1509 | sk_DIST_POINT_shift 1534 | ||
| 1510 | d2i_ASN1_SET_OF_DIST_POINT 1535 | ||
| 1511 | i2d_ASN1_SET_OF_DIST_POINT 1536 | ||
| 1512 | i2d_CRL_DIST_POINTS 1537 | ||
| 1513 | CRL_DIST_POINTS_new 1538 | ||
| 1514 | CRL_DIST_POINTS_free 1539 | ||
| 1515 | d2i_CRL_DIST_POINTS 1540 | ||
| 1516 | i2d_DIST_POINT 1541 | ||
| 1517 | DIST_POINT_new 1542 | ||
| 1518 | d2i_DIST_POINT 1543 | ||
| 1519 | DIST_POINT_free 1544 | ||
| 1520 | i2d_DIST_POINT_NAME 1545 | ||
| 1521 | DIST_POINT_NAME_new 1546 | ||
| 1522 | DIST_POINT_NAME_free 1547 | ||
| 1523 | d2i_DIST_POINT_NAME 1548 | ||
| 1524 | X509V3_add_value_uchar 1549 | ||
| 1525 | sk_X509_INFO_new 1550 | ||
| 1526 | sk_X509_EXTENSION_new 1551 | ||
| 1527 | sk_X509_NAME_ENTRY_unshift 1552 | ||
| 1528 | sk_ASN1_TYPE_value 1553 | ||
| 1529 | sk_X509_EXTENSION_find 1554 | ||
| 1530 | d2i_ASN1_SET_OF_X509_ATTRIBUTE 1555 | ||
| 1531 | sk_ASN1_TYPE_pop 1556 | ||
| 1532 | sk_X509_EXTENSION_set_cmp_func 1557 | ||
| 1533 | sk_ASN1_TYPE_new_null 1558 | ||
| 1534 | sk_X509_NAME_ENTRY_delete 1559 | ||
| 1535 | i2d_ASN1_SET_OF_ASN1_TYPE 1560 | ||
| 1536 | sk_X509_NAME_ENTRY_dup 1561 | ||
| 1537 | sk_X509_unshift 1562 | ||
| 1538 | sk_X509_NAME_unshift 1563 | ||
| 1539 | sk_ASN1_TYPE_num 1564 | ||
| 1540 | sk_X509_EXTENSION_new_null 1565 | ||
| 1541 | sk_X509_INFO_value 1566 | ||
| 1542 | d2i_ASN1_SET_OF_X509_EXTENSION 1567 | ||
| 1543 | sk_X509_INFO_delete_ptr 1568 | ||
| 1544 | sk_X509_NAME_ENTRY_new 1569 | ||
| 1545 | sk_DIST_POINT_insert 1570 | ||
| 1546 | sk_ASN1_TYPE_set_cmp_func 1571 | ||
| 1547 | sk_X509_EXTENSION_value 1572 | ||
| 1548 | sk_DIST_POINT_unshift 1573 | ||
| 1549 | d2i_ASN1_SET_OF_X509_NAME_ENTRY 1574 | ||
| 1550 | sk_X509_INFO_pop 1575 | ||
| 1551 | sk_X509_EXTENSION_pop 1576 | ||
| 1552 | sk_X509_NAME_ENTRY_shift 1577 | ||
| 1553 | sk_X509_INFO_num 1578 | ||
| 1554 | sk_X509_EXTENSION_num 1579 | ||
| 1555 | sk_X509_INFO_pop_free 1580 | ||
| 1556 | sk_POLICYQUALINFO_unshift 1581 | ||
| 1557 | sk_POLICYINFO_unshift 1582 | ||
| 1558 | sk_X509_NAME_ENTRY_new_null 1583 | ||
| 1559 | sk_X509_NAME_ENTRY_pop 1584 | ||
| 1560 | sk_X509_ATTRIBUTE_unshift 1585 | ||
| 1561 | sk_X509_NAME_ENTRY_num 1586 | ||
| 1562 | sk_GENERAL_NAME_unshift 1587 | ||
| 1563 | sk_X509_INFO_free 1588 | ||
| 1564 | d2i_ASN1_SET_OF_ASN1_TYPE 1589 | ||
| 1565 | sk_X509_INFO_insert 1590 | ||
| 1566 | sk_X509_NAME_ENTRY_value 1591 | ||
| 1567 | sk_POLICYQUALINFO_insert 1592 | ||
| 1568 | sk_ASN1_TYPE_set 1593 | ||
| 1569 | sk_X509_EXTENSION_delete_ptr 1594 | ||
| 1570 | sk_X509_INFO_unshift 1595 | ||
| 1571 | sk_ASN1_TYPE_unshift 1596 | ||
| 1572 | sk_ASN1_TYPE_free 1597 | ||
| 1573 | sk_ASN1_TYPE_delete_ptr 1598 | ||
| 1574 | sk_ASN1_TYPE_pop_free 1599 | ||
| 1575 | sk_X509_EXTENSION_unshift 1600 | ||
| 1576 | sk_X509_EXTENSION_pop_free 1601 | ||
| 1577 | sk_X509_NAME_ENTRY_set_cmp_func 1602 | ||
| 1578 | sk_ASN1_TYPE_insert 1603 | ||
| 1579 | sk_X509_NAME_ENTRY_free 1604 | ||
| 1580 | sk_SXNETID_insert 1605 | ||
| 1581 | sk_X509_NAME_insert 1606 | ||
| 1582 | sk_X509_insert 1607 | ||
| 1583 | sk_X509_INFO_delete 1608 | ||
| 1584 | sk_X509_INFO_set_cmp_func 1609 | ||
| 1585 | sk_X509_ATTRIBUTE_insert 1610 | ||
| 1586 | sk_X509_INFO_zero 1611 | ||
| 1587 | sk_X509_INFO_set 1612 | ||
| 1588 | sk_X509_EXTENSION_set 1613 | ||
| 1589 | sk_X509_EXTENSION_free 1614 | ||
| 1590 | i2d_ASN1_SET_OF_X509_ATTRIBUTE 1615 | ||
| 1591 | sk_SXNETID_unshift 1616 | ||
| 1592 | sk_X509_INFO_push 1617 | ||
| 1593 | sk_X509_EXTENSION_insert 1618 | ||
| 1594 | sk_X509_INFO_new_null 1619 | ||
| 1595 | sk_ASN1_TYPE_dup 1620 | ||
| 1596 | sk_X509_INFO_find 1621 | ||
| 1597 | sk_POLICYINFO_insert 1622 | ||
| 1598 | sk_ASN1_TYPE_zero 1623 | ||
| 1599 | i2d_ASN1_SET_OF_X509_EXTENSION 1624 | ||
| 1600 | sk_X509_NAME_ENTRY_set 1625 | ||
| 1601 | sk_ASN1_TYPE_push 1626 | ||
| 1602 | sk_X509_NAME_ENTRY_insert 1627 | ||
| 1603 | sk_ASN1_TYPE_new 1628 | ||
| 1604 | sk_GENERAL_NAME_insert 1629 | ||
| 1605 | sk_ASN1_TYPE_shift 1630 | ||
| 1606 | sk_ASN1_TYPE_delete 1631 | ||
| 1607 | sk_X509_NAME_ENTRY_pop_free 1632 | ||
| 1608 | i2d_ASN1_SET_OF_X509_NAME_ENTRY 1633 | ||
| 1609 | sk_X509_NAME_ENTRY_zero 1634 | ||
| 1610 | sk_ASN1_TYPE_find 1635 | ||
| 1611 | sk_X509_NAME_ENTRY_delete_ptr 1636 | ||
| 1612 | sk_X509_NAME_ENTRY_push 1637 | ||
| 1613 | sk_X509_EXTENSION_zero 1638 | ||
| 1614 | sk_X509_INFO_shift 1639 | ||
| 1615 | sk_X509_INFO_dup 1640 | ||
| 1616 | sk_X509_EXTENSION_dup 1641 | ||
| 1617 | sk_X509_EXTENSION_delete 1642 | ||
| 1618 | sk_X509_EXTENSION_shift 1643 | ||
| 1619 | sk_X509_EXTENSION_push 1644 | ||
| 1620 | sk_X509_NAME_ENTRY_find 1645 | ||
| 1621 | X509V3_EXT_i2d 1646 | ||
| 1622 | X509V3_EXT_val_prn 1647 | ||
| 1623 | X509V3_EXT_add_list 1648 | ||
| 1624 | EVP_CIPHER_type 1649 | ||
| 1625 | EVP_PBE_CipherInit 1650 | ||
| 1626 | X509V3_add_value_bool_nf 1651 | ||
| 1627 | d2i_ASN1_UINTEGER 1652 | ||
| 1628 | sk_value 1653 | ||
| 1629 | sk_num 1654 | ||
| 1630 | sk_set 1655 | ||
| 1631 | sk_X509_REVOKED_set_cmp_func 1656 | ||
| 1632 | sk_X509_REVOKED_unshift 1657 | ||
| 1633 | sk_X509_REVOKED_dup 1658 | ||
| 1634 | sk_X509_REVOKED_free 1659 | ||
| 1635 | sk_X509_REVOKED_new 1660 | ||
| 1636 | i2d_ASN1_SET_OF_X509_REVOKED 1661 | ||
| 1637 | sk_X509_REVOKED_shift 1662 | ||
| 1638 | sk_X509_REVOKED_delete_ptr 1663 | ||
| 1639 | sk_X509_REVOKED_pop_free 1664 | ||
| 1640 | sk_X509_REVOKED_insert 1665 | ||
| 1641 | sk_X509_REVOKED_zero 1666 | ||
| 1642 | sk_X509_REVOKED_pop 1667 | ||
| 1643 | sk_X509_REVOKED_value 1668 | ||
| 1644 | sk_X509_REVOKED_num 1669 | ||
| 1645 | sk_X509_REVOKED_push 1670 | ||
| 1646 | sk_sort 1671 | ||
| 1647 | sk_X509_REVOKED_find 1672 | ||
| 1648 | sk_X509_REVOKED_delete 1673 | ||
| 1649 | d2i_ASN1_SET_OF_X509_REVOKED 1674 | ||
| 1650 | sk_X509_REVOKED_new_null 1675 | ||
| 1651 | sk_X509_REVOKED_set 1676 | ||
| 1652 | sk_X509_ALGOR_new 1677 | ||
| 1653 | sk_X509_CRL_set_cmp_func 1678 | ||
| 1654 | sk_X509_CRL_set 1679 | ||
| 1655 | sk_X509_ALGOR_unshift 1680 | ||
| 1656 | sk_X509_CRL_free 1681 | ||
| 1657 | i2d_ASN1_SET_OF_X509_ALGOR 1682 | ||
| 1658 | sk_X509_ALGOR_pop 1683 | ||
| 1659 | sk_X509_CRL_unshift 1684 | ||
| 1660 | i2d_ASN1_SET_OF_X509_CRL 1685 | ||
| 1661 | sk_X509_ALGOR_num 1686 | ||
| 1662 | sk_X509_CRL_insert 1687 | ||
| 1663 | sk_X509_CRL_pop_free 1688 | ||
| 1664 | sk_X509_CRL_delete_ptr 1689 | ||
| 1665 | sk_X509_ALGOR_insert 1690 | ||
| 1666 | sk_X509_CRL_dup 1691 | ||
| 1667 | sk_X509_CRL_zero 1692 | ||
| 1668 | sk_X509_CRL_new 1693 | ||
| 1669 | sk_X509_CRL_push 1694 | ||
| 1670 | sk_X509_ALGOR_new_null 1695 | ||
| 1671 | d2i_ASN1_SET_OF_X509_ALGOR 1696 | ||
| 1672 | sk_X509_CRL_shift 1697 | ||
| 1673 | sk_X509_CRL_find 1698 | ||
| 1674 | sk_X509_CRL_delete 1699 | ||
| 1675 | sk_X509_ALGOR_free 1700 | ||
| 1676 | sk_X509_ALGOR_delete 1701 | ||
| 1677 | d2i_ASN1_SET_OF_X509_CRL 1702 | ||
| 1678 | sk_X509_ALGOR_delete_ptr 1703 | ||
| 1679 | sk_X509_CRL_pop 1704 | ||
| 1680 | sk_X509_ALGOR_set 1705 | ||
| 1681 | sk_X509_CRL_num 1706 | ||
| 1682 | sk_X509_CRL_value 1707 | ||
| 1683 | sk_X509_ALGOR_shift 1708 | ||
| 1684 | sk_X509_ALGOR_zero 1709 | ||
| 1685 | sk_X509_CRL_new_null 1710 | ||
| 1686 | sk_X509_ALGOR_push 1711 | ||
| 1687 | sk_X509_ALGOR_value 1712 | ||
| 1688 | sk_X509_ALGOR_find 1713 | ||
| 1689 | sk_X509_ALGOR_set_cmp_func 1714 | ||
| 1690 | sk_X509_ALGOR_dup 1715 | ||
| 1691 | sk_X509_ALGOR_pop_free 1716 | ||
| 1692 | sk_PKCS7_SIGNER_INFO_new 1717 | ||
| 1693 | sk_PKCS7_SIGNER_INFO_zero 1718 | ||
| 1694 | sk_PKCS7_SIGNER_INFO_unshift 1719 | ||
| 1695 | sk_PKCS7_RECIP_INFO_dup 1720 | ||
| 1696 | sk_PKCS7_SIGNER_INFO_insert 1721 | ||
| 1697 | sk_PKCS7_SIGNER_INFO_push 1722 | ||
| 1698 | i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO 1723 | ||
| 1699 | sk_PKCS7_RECIP_INFO_new 1724 | ||
| 1700 | sk_X509_LOOKUP_new_null 1725 | ||
| 1701 | sk_PKCS7_SIGNER_INFO_find 1726 | ||
| 1702 | sk_PKCS7_SIGNER_INFO_set_cmp_func 1727 | ||
| 1703 | sk_X509_LOOKUP_zero 1728 | ||
| 1704 | sk_PKCS7_RECIP_INFO_shift 1729 | ||
| 1705 | sk_PKCS7_RECIP_INFO_new_null 1730 | ||
| 1706 | sk_PKCS7_SIGNER_INFO_shift 1731 | ||
| 1707 | sk_PKCS7_SIGNER_INFO_pop 1732 | ||
| 1708 | sk_PKCS7_SIGNER_INFO_pop_free 1733 | ||
| 1709 | sk_X509_LOOKUP_push 1734 | ||
| 1710 | sk_X509_LOOKUP_dup 1735 | ||
| 1711 | sk_PKCS7_SIGNER_INFO_num 1736 | ||
| 1712 | sk_X509_LOOKUP_find 1737 | ||
| 1713 | i2d_ASN1_SET_OF_PKCS7_RECIP_INFO 1738 | ||
| 1714 | sk_X509_LOOKUP_new 1739 | ||
| 1715 | sk_PKCS7_SIGNER_INFO_delete 1740 | ||
| 1716 | sk_PKCS7_RECIP_INFO_set_cmp_func 1741 | ||
| 1717 | sk_PKCS7_SIGNER_INFO_delete_ptr 1742 | ||
| 1718 | sk_PKCS7_RECIP_INFO_pop 1743 | ||
| 1719 | sk_X509_LOOKUP_insert 1744 | ||
| 1720 | sk_PKCS7_RECIP_INFO_value 1745 | ||
| 1721 | sk_PKCS7_RECIP_INFO_num 1746 | ||
| 1722 | sk_PKCS7_SIGNER_INFO_value 1747 | ||
| 1723 | d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO 1748 | ||
| 1724 | sk_X509_LOOKUP_pop 1749 | ||
| 1725 | sk_X509_LOOKUP_num 1750 | ||
| 1726 | sk_X509_LOOKUP_delete 1751 | ||
| 1727 | sk_PKCS7_RECIP_INFO_free 1752 | ||
| 1728 | d2i_ASN1_SET_OF_PKCS7_RECIP_INFO 1753 | ||
| 1729 | sk_PKCS7_SIGNER_INFO_set 1754 | ||
| 1730 | sk_X509_LOOKUP_pop_free 1755 | ||
| 1731 | sk_X509_LOOKUP_shift 1756 | ||
| 1732 | sk_X509_LOOKUP_unshift 1757 | ||
| 1733 | sk_PKCS7_SIGNER_INFO_new_null 1758 | ||
| 1734 | sk_PKCS7_RECIP_INFO_delete_ptr 1759 | ||
| 1735 | sk_PKCS7_RECIP_INFO_pop_free 1760 | ||
| 1736 | sk_PKCS7_RECIP_INFO_insert 1761 | ||
| 1737 | sk_PKCS7_SIGNER_INFO_free 1762 | ||
| 1738 | sk_PKCS7_RECIP_INFO_set 1763 | ||
| 1739 | sk_PKCS7_RECIP_INFO_zero 1764 | ||
| 1740 | sk_X509_LOOKUP_value 1765 | ||
| 1741 | sk_PKCS7_RECIP_INFO_push 1766 | ||
| 1742 | sk_PKCS7_RECIP_INFO_unshift 1767 | ||
| 1743 | sk_X509_LOOKUP_set_cmp_func 1768 | ||
| 1744 | sk_X509_LOOKUP_free 1769 | ||
| 1745 | sk_PKCS7_SIGNER_INFO_dup 1770 | ||
| 1746 | sk_X509_LOOKUP_delete_ptr 1771 | ||
| 1747 | sk_X509_LOOKUP_set 1772 | ||
| 1748 | sk_PKCS7_RECIP_INFO_find 1773 | ||
| 1749 | sk_PKCS7_RECIP_INFO_delete 1774 | ||
| 1750 | PKCS5_PBE_add 1775 | ||
| 1751 | PEM_write_bio_PKCS8 1776 | ||
| 1752 | i2d_PKCS8_fp 1777 | ||
| 1753 | PEM_read_bio_PKCS8_PRIV_KEY_INFO 1778 | ||
| 1754 | d2i_PKCS8_bio 1779 | ||
| 1755 | d2i_PKCS8_PRIV_KEY_INFO_fp 1780 | ||
| 1756 | PEM_write_bio_PKCS8_PRIV_KEY_INFO 1781 | ||
| 1757 | PEM_read_PKCS8 1782 | ||
| 1758 | d2i_PKCS8_PRIV_KEY_INFO_bio 1783 | ||
| 1759 | d2i_PKCS8_fp 1784 | ||
| 1760 | PEM_write_PKCS8 1785 | ||
| 1761 | PEM_read_PKCS8_PRIV_KEY_INFO 1786 | ||
| 1762 | PEM_read_bio_PKCS8 1787 | ||
| 1763 | PEM_write_PKCS8_PRIV_KEY_INFO 1788 | ||
| 1764 | PKCS5_PBE_keyivgen 1789 | ||
| 1765 | i2d_PKCS8_bio 1790 | ||
| 1766 | i2d_PKCS8_PRIV_KEY_INFO_fp 1791 | ||
| 1767 | i2d_PKCS8_PRIV_KEY_INFO_bio 1792 | ||
| 1768 | BIO_s_bio 1793 | ||
| 1769 | PKCS5_pbe2_set 1794 | ||
| 1770 | PKCS5_PBKDF2_HMAC_SHA1 1795 | ||
| 1771 | PKCS5_v2_PBE_keyivgen 1796 | ||
| 1772 | PEM_write_bio_PKCS8PrivateKey 1797 | ||
| 1773 | PEM_write_PKCS8PrivateKey 1798 | ||
| 1774 | BIO_ctrl_get_read_request 1799 | ||
| 1775 | BIO_ctrl_pending 1800 | ||
| 1776 | BIO_ctrl_wpending 1801 | ||
| 1777 | BIO_new_bio_pair 1802 | ||
| 1778 | BIO_ctrl_get_write_guarantee 1803 | ||
| 1779 | CRYPTO_num_locks 1804 | ||
| 1780 | CONF_load_bio 1805 | ||
| 1781 | CONF_load_fp 1806 | ||
| 1782 | sk_CONF_VALUE_delete 1807 | ||
| 1783 | sk_CONF_VALUE_pop 1808 | ||
| 1784 | sk_CONF_VALUE_num 1809 | ||
| 1785 | sk_CONF_VALUE_pop_free 1810 | ||
| 1786 | sk_CONF_VALUE_free 1811 | ||
| 1787 | sk_CONF_VALUE_shift 1812 | ||
| 1788 | sk_CONF_VALUE_unshift 1813 | ||
| 1789 | sk_CONF_VALUE_value 1814 | ||
| 1790 | sk_CONF_VALUE_set 1815 | ||
| 1791 | sk_CONF_VALUE_zero 1816 | ||
| 1792 | sk_CONF_VALUE_push 1817 | ||
| 1793 | sk_CONF_VALUE_delete_ptr 1818 | ||
| 1794 | sk_CONF_VALUE_find 1819 | ||
| 1795 | sk_CONF_VALUE_set_cmp_func 1820 | ||
| 1796 | sk_CONF_VALUE_new_null 1821 | ||
| 1797 | sk_CONF_VALUE_dup 1822 | ||
| 1798 | sk_CONF_VALUE_insert 1823 | ||
| 1799 | sk_CONF_VALUE_new 1824 | ||
| 1800 | sk_ASN1_OBJECT_find 1825 | ||
| 1801 | sk_ASN1_OBJECT_pop_free 1826 | ||
| 1802 | sk_ASN1_OBJECT_dup 1827 | ||
| 1803 | sk_ASN1_OBJECT_delete_ptr 1828 | ||
| 1804 | sk_ASN1_OBJECT_new 1829 | ||
| 1805 | sk_ASN1_OBJECT_unshift 1830 | ||
| 1806 | sk_ASN1_OBJECT_delete 1831 | ||
| 1807 | sk_ASN1_OBJECT_shift 1832 | ||
| 1808 | sk_ASN1_OBJECT_pop 1833 | ||
| 1809 | sk_ASN1_OBJECT_num 1834 | ||
| 1810 | sk_ASN1_OBJECT_value 1835 | ||
| 1811 | sk_ASN1_OBJECT_new_null 1836 | ||
| 1812 | i2d_ASN1_SET_OF_ASN1_OBJECT 1837 | ||
| 1813 | sk_ASN1_OBJECT_free 1838 | ||
| 1814 | sk_ASN1_OBJECT_set 1839 | ||
| 1815 | sk_ASN1_OBJECT_set_cmp_func 1840 | ||
| 1816 | sk_ASN1_OBJECT_zero 1841 | ||
| 1817 | sk_ASN1_OBJECT_insert 1842 | ||
| 1818 | sk_ASN1_OBJECT_push 1843 | ||
| 1819 | d2i_ASN1_SET_OF_ASN1_OBJECT 1844 | ||
| 1820 | PKCS7_signatureVerify 1845 | ||
| 1821 | RSA_set_method 1846 | ||
| 1822 | RSA_get_method 1847 | ||
| 1823 | RSA_get_default_method 1848 | ||
| 1824 | sk_CONF_VALUE_sort 1849 | ||
| 1825 | sk_X509_REVOKED_sort 1850 | ||
| 1826 | sk_X509_ATTRIBUTE_sort 1851 | ||
| 1827 | sk_X509_INFO_sort 1852 | ||
| 1828 | sk_POLICYINFO_sort 1853 | ||
| 1829 | sk_GENERAL_NAME_sort 1854 | ||
| 1830 | sk_X509_sort 1855 | ||
| 1831 | sk_X509_NAME_sort 1856 | ||
| 1832 | sk_ASN1_TYPE_sort 1857 | ||
| 1833 | sk_X509_ALGOR_sort 1858 | ||
| 1834 | sk_PKCS7_RECIP_INFO_sort 1859 | ||
| 1835 | sk_X509_NAME_ENTRY_sort 1860 | ||
| 1836 | sk_X509_EXTENSION_sort 1861 | ||
| 1837 | sk_SXNETID_sort 1862 | ||
| 1838 | sk_ASN1_OBJECT_sort 1863 | ||
| 1839 | sk_PKCS7_SIGNER_INFO_sort 1864 | ||
| 1840 | sk_X509_LOOKUP_sort 1865 | ||
| 1841 | sk_POLICYQUALINFO_sort 1866 | ||
| 1842 | sk_X509_CRL_sort 1867 | ||
| 1843 | sk_DIST_POINT_sort 1868 | ||
| 1844 | RSA_check_key 1869 | ||
| 1845 | OBJ_obj2txt 1870 | ||
| 1846 | DSA_dup_DH 1871 | ||
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl index 149a0f4f80..6fbf3ceca6 100644 --- a/src/lib/libcrypto/util/mk1mf.pl +++ b/src/lib/libcrypto/util/mk1mf.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # A bit of an evil hack but it post processes the file ../MINFO which | 2 | # A bit of an evil hack but it post processes the file ../MINFO which |
| 3 | # is generated by `make files` in the top directory. | 3 | # is generated by `make files` in the top directory. |
| 4 | # This script outputs one mega makefile that has no shell stuff or any | 4 | # This script outputs one mega makefile that has no shell stuff or any |
| @@ -6,82 +6,59 @@ | |||
| 6 | # | 6 | # |
| 7 | 7 | ||
| 8 | $INSTALLTOP="/usr/local/ssl"; | 8 | $INSTALLTOP="/usr/local/ssl"; |
| 9 | $OPTIONS=""; | ||
| 10 | $ssl_version=""; | ||
| 11 | |||
| 12 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | ||
| 13 | while(<IN>) { | ||
| 14 | $ssl_version=$1 if (/^VERSION=(.*)$/); | ||
| 15 | $OPTIONS=$1 if (/^OPTIONS=(.*)$/); | ||
| 16 | $INSTALLTOP=$1 if (/^INSTALLTOP=(.*$)/); | ||
| 17 | } | ||
| 18 | close(IN); | ||
| 9 | 19 | ||
| 10 | $ssl_version="0.8.2"; | 20 | die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; |
| 11 | 21 | ||
| 12 | $infile="MINFO"; | 22 | $infile="MINFO"; |
| 13 | 23 | ||
| 14 | %ops=( | 24 | %ops=( |
| 15 | "VC-WIN32", "Microsoft Visual C++ 4.[01] - Windows NT [34].x", | 25 | "VC-WIN32", "Microsoft Visual C++ [4-6] - Windows NT or 9X", |
| 26 | "VC-NT", "Microsoft Visual C++ [4-6] - Windows NT ONLY", | ||
| 16 | "VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286", | 27 | "VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286", |
| 17 | "VC-WIN16", "Alias for VC-W31-32", | 28 | "VC-WIN16", "Alias for VC-W31-32", |
| 18 | "VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+", | 29 | "VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+", |
| 19 | "VC-MSDOS","Microsoft Visual C++ 1.52 - MSDOS", | 30 | "VC-MSDOS","Microsoft Visual C++ 1.52 - MSDOS", |
| 20 | "BC-NT", "Borland C++ 4.5 - Windows NT - PROBABLY NOT WORKING", | 31 | "Mingw32", "GNU C++ - Windows NT or 9x", |
| 32 | "Mingw32-files", "Create files with DOS copy ...", | ||
| 33 | "BC-NT", "Borland C++ 4.5 - Windows NT", | ||
| 21 | "BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING", | 34 | "BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING", |
| 22 | "BC-MSDOS","Borland C++ 4.5 - MSDOS", | 35 | "BC-MSDOS","Borland C++ 4.5 - MSDOS", |
| 23 | "linux-elf","Linux elf", | 36 | "linux-elf","Linux elf", |
| 37 | "ultrix-mips","DEC mips ultrix", | ||
| 24 | "FreeBSD","FreeBSD distribution", | 38 | "FreeBSD","FreeBSD distribution", |
| 25 | "default","cc under unix", | 39 | "default","cc under unix", |
| 26 | ); | 40 | ); |
| 27 | 41 | ||
| 28 | $type=""; | 42 | $platform=""; |
| 29 | foreach (@ARGV) | 43 | foreach (@ARGV) |
| 30 | { | 44 | { |
| 31 | if (/^no-rc2$/) { $no_rc2=1; } | 45 | if (!&read_options && !defined($ops{$_})) |
| 32 | elsif (/^no-rc4$/) { $no_rc4=1; } | ||
| 33 | elsif (/^no-rc5$/) { $no_rc5=1; } | ||
| 34 | elsif (/^no-idea$/) { $no_idea=1; } | ||
| 35 | elsif (/^no-des$/) { $no_des=1; } | ||
| 36 | elsif (/^no-bf$/) { $no_bf=1; } | ||
| 37 | elsif (/^no-cast$/) { $no_cast=1; } | ||
| 38 | elsif (/^no-md2$/) { $no_md2=1; } | ||
| 39 | elsif (/^no-md5$/) { $no_md5=1; } | ||
| 40 | elsif (/^no-sha$/) { $no_sha=1; } | ||
| 41 | elsif (/^no-sha1$/) { $no_sha1=1; } | ||
| 42 | elsif (/^no-rmd160$/) { $no_rmd160=1; } | ||
| 43 | elsif (/^no-mdc2$/) { $no_mdc2=1; } | ||
| 44 | elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_rc5=$no_idea=$no_rsa=1; } | ||
| 45 | elsif (/^no-rsa$/) { $no_rsa=1; } | ||
| 46 | elsif (/^no-dsa$/) { $no_dsa=1; } | ||
| 47 | elsif (/^no-dh$/) { $no_dh=1; } | ||
| 48 | elsif (/^no-asm$/) { $no_asm=1; } | ||
| 49 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | ||
| 50 | elsif (/^no-ssl3$/) { $no_ssl3=1; } | ||
| 51 | elsif (/^no-err$/) { $no_err=1; } | ||
| 52 | elsif (/^no-sock$/) { $no_sock=1; } | ||
| 53 | |||
| 54 | elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1; | ||
| 55 | $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1; | ||
| 56 | $no_ssl2=$no_err=1; } | ||
| 57 | |||
| 58 | elsif (/^rsaref$/) { $rsaref=1; } | ||
| 59 | elsif (/^gcc$/) { $gcc=1; } | ||
| 60 | elsif (/^debug$/) { $debug=1; } | ||
| 61 | elsif (/^shlib$/) { $shlib=1; } | ||
| 62 | elsif (/^dll$/) { $shlib=1; } | ||
| 63 | elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } | ||
| 64 | elsif (/^-[lL].*$/) { $l_flags.="$_ "; } | ||
| 65 | elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) | ||
| 66 | { $c_flags.="$_ "; } | ||
| 67 | else | ||
| 68 | { | 46 | { |
| 69 | if (!defined($ops{$_})) | 47 | print STDERR "unknown option - $_\n"; |
| 70 | { | 48 | print STDERR "usage: perl mk1mf.pl [options] [system]\n"; |
| 71 | print STDERR "unknown option - $_\n"; | 49 | print STDERR "\nwhere [system] can be one of the following\n"; |
| 72 | print STDERR "usage: perl mk1mf.pl [system] [options]\n"; | 50 | foreach $i (sort keys %ops) |
| 73 | print STDERR "\nwhere [system] can be one of the following\n"; | 51 | { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } |
| 74 | foreach $i (sort keys %ops) | 52 | print STDERR <<"EOF"; |
| 75 | { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } | ||
| 76 | print STDERR <<"EOF"; | ||
| 77 | and [options] can be one of | 53 | and [options] can be one of |
| 78 | no-md2 no-md5 no-sha no-sha1 no-mdc2 no-rmd160 - Skip this digest | 54 | no-md2 no-md5 no-sha no-mdc2 no-ripemd - Skip this digest |
| 79 | no-rc2 no-rc4 no-idea no-des no-bf no-cast - Skip this symetric cipher | 55 | no-rc2 no-rc4 no-idea no-des no-bf no-cast - Skip this symetric cipher |
| 80 | no-rc5 | 56 | no-rc5 |
| 81 | no-rsa no-dsa no-dh - Skip this public key cipher | 57 | no-rsa no-dsa no-dh - Skip this public key cipher |
| 82 | no-ssl2 no-ssl3 - Skip this version of SSL | 58 | no-ssl2 no-ssl3 - Skip this version of SSL |
| 83 | just-ssl - remove all non-ssl keys/digest | 59 | just-ssl - remove all non-ssl keys/digest |
| 84 | no-asm - No x86 asm | 60 | no-asm - No x86 asm |
| 61 | nasm - Use NASM for x86 asm | ||
| 85 | no-socks - No socket code | 62 | no-socks - No socket code |
| 86 | no-err - No error strings | 63 | no-err - No error strings |
| 87 | dll/shlib - Build shared libraries (MS) | 64 | dll/shlib - Build shared libraries (MS) |
| @@ -96,15 +73,18 @@ TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath INC=header-outdir CC=C-compiler | |||
| 96 | -<ex_cc_flags> - extra 'cc' flags, | 73 | -<ex_cc_flags> - extra 'cc' flags, |
| 97 | added (MS), or replace (unix) | 74 | added (MS), or replace (unix) |
| 98 | EOF | 75 | EOF |
| 99 | exit(1); | 76 | exit(1); |
| 100 | } | ||
| 101 | $type=$_; | ||
| 102 | } | 77 | } |
| 78 | $platform=$_; | ||
| 79 | } | ||
| 80 | foreach (split / /, $OPTIONS) | ||
| 81 | { | ||
| 82 | print STDERR "unknown option - $_\n" if !&read_options; | ||
| 103 | } | 83 | } |
| 104 | 84 | ||
| 105 | $no_mdc2=1 if ($no_des); | 85 | $no_mdc2=1 if ($no_des); |
| 106 | 86 | ||
| 107 | $no_ssl3=1 if ($no_md5 || $no_sha1); | 87 | $no_ssl3=1 if ($no_md5 || $no_sha); |
| 108 | $no_ssl3=1 if ($no_rsa && $no_dh); | 88 | $no_ssl3=1 if ($no_rsa && $no_dh); |
| 109 | 89 | ||
| 110 | $no_ssl2=1 if ($no_md5 || $no_rsa); | 90 | $no_ssl2=1 if ($no_md5 || $no_rsa); |
| @@ -114,6 +94,7 @@ $out_def="out"; | |||
| 114 | $inc_def="outinc"; | 94 | $inc_def="outinc"; |
| 115 | $tmp_def="tmp"; | 95 | $tmp_def="tmp"; |
| 116 | 96 | ||
| 97 | $mkdir="mkdir"; | ||
| 117 | 98 | ||
| 118 | ($ssl,$crypto)=("ssl","crypto"); | 99 | ($ssl,$crypto)=("ssl","crypto"); |
| 119 | $RSAglue="RSAglue"; | 100 | $RSAglue="RSAglue"; |
| @@ -125,62 +106,79 @@ $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:''; | |||
| 125 | 106 | ||
| 126 | # $bin_dir.=$o causes a core dump on my sparc :-( | 107 | # $bin_dir.=$o causes a core dump on my sparc :-( |
| 127 | 108 | ||
| 109 | $NT=0; | ||
| 110 | |||
| 128 | push(@INC,"util/pl","pl"); | 111 | push(@INC,"util/pl","pl"); |
| 129 | if ($type eq "VC-MSDOS") | 112 | if ($platform eq "VC-MSDOS") |
| 130 | { | 113 | { |
| 131 | $asmbits=16; | 114 | $asmbits=16; |
| 132 | $msdos=1; | 115 | $msdos=1; |
| 133 | require 'VC-16.pl'; | 116 | require 'VC-16.pl'; |
| 134 | } | 117 | } |
| 135 | elsif ($type eq "VC-W31-16") | 118 | elsif ($platform eq "VC-W31-16") |
| 136 | { | 119 | { |
| 137 | $asmbits=16; | 120 | $asmbits=16; |
| 138 | $msdos=1; $win16=1; | 121 | $msdos=1; $win16=1; |
| 139 | require 'VC-16.pl'; | 122 | require 'VC-16.pl'; |
| 140 | } | 123 | } |
| 141 | elsif (($type eq "VC-W31-32") || ($type eq "VC-WIN16")) | 124 | elsif (($platform eq "VC-W31-32") || ($platform eq "VC-WIN16")) |
| 142 | { | 125 | { |
| 143 | $asmbits=32; | 126 | $asmbits=32; |
| 144 | $msdos=1; $win16=1; | 127 | $msdos=1; $win16=1; |
| 145 | require 'VC-16.pl'; | 128 | require 'VC-16.pl'; |
| 146 | } | 129 | } |
| 147 | elsif (($type eq "VC-WIN32") || ($type eq "VC-NT")) | 130 | elsif (($platform eq "VC-WIN32") || ($platform eq "VC-NT")) |
| 148 | { | 131 | { |
| 132 | $NT = 1 if $platform eq "VC-NT"; | ||
| 149 | require 'VC-32.pl'; | 133 | require 'VC-32.pl'; |
| 150 | } | 134 | } |
| 151 | elsif ($type eq "BC-NT") | 135 | elsif ($platform eq "Mingw32") |
| 136 | { | ||
| 137 | require 'Mingw32.pl'; | ||
| 138 | } | ||
| 139 | elsif ($platform eq "Mingw32-files") | ||
| 140 | { | ||
| 141 | require 'Mingw32f.pl'; | ||
| 142 | } | ||
| 143 | elsif ($platform eq "BC-NT") | ||
| 152 | { | 144 | { |
| 153 | $bc=1; | 145 | $bc=1; |
| 154 | require 'BC-32.pl'; | 146 | require 'BC-32.pl'; |
| 155 | } | 147 | } |
| 156 | elsif ($type eq "BC-W31") | 148 | elsif ($platform eq "BC-W31") |
| 157 | { | 149 | { |
| 158 | $bc=1; | 150 | $bc=1; |
| 159 | $msdos=1; $w16=1; | 151 | $msdos=1; $w16=1; |
| 160 | require 'BC-16.pl'; | 152 | require 'BC-16.pl'; |
| 161 | } | 153 | } |
| 162 | elsif ($type eq "BC-Q16") | 154 | elsif ($platform eq "BC-Q16") |
| 163 | { | 155 | { |
| 164 | $msdos=1; $w16=1; $shlib=0; $qw=1; | 156 | $msdos=1; $w16=1; $shlib=0; $qw=1; |
| 165 | require 'BC-16.pl'; | 157 | require 'BC-16.pl'; |
| 166 | } | 158 | } |
| 167 | elsif ($type eq "BC-MSDOS") | 159 | elsif ($platform eq "BC-MSDOS") |
| 168 | { | 160 | { |
| 169 | $asmbits=16; | 161 | $asmbits=16; |
| 170 | $msdos=1; | 162 | $msdos=1; |
| 171 | require 'BC-16.pl'; | 163 | require 'BC-16.pl'; |
| 172 | } | 164 | } |
| 173 | elsif ($type eq "FreeBSD") | 165 | elsif ($platform eq "FreeBSD") |
| 174 | { | 166 | { |
| 175 | require 'unix.pl'; | 167 | require 'unix.pl'; |
| 176 | $cflags='-DTERMIO -D_ANSI_SOURCE -O2 -fomit-frame-pointer'; | 168 | $cflags='-DTERMIO -D_ANSI_SOURCE -O2 -fomit-frame-pointer'; |
| 177 | } | 169 | } |
| 178 | elsif ($type eq "linux-elf") | 170 | elsif ($platform eq "linux-elf") |
| 179 | { | 171 | { |
| 180 | require "unix.pl"; | 172 | require "unix.pl"; |
| 181 | require "linux.pl"; | 173 | require "linux.pl"; |
| 182 | $unix=1; | 174 | $unix=1; |
| 183 | } | 175 | } |
| 176 | elsif ($platform eq "ultrix-mips") | ||
| 177 | { | ||
| 178 | require "unix.pl"; | ||
| 179 | require "ultrix.pl"; | ||
| 180 | $unix=1; | ||
| 181 | } | ||
| 184 | else | 182 | else |
| 185 | { | 183 | { |
| 186 | require "unix.pl"; | 184 | require "unix.pl"; |
| @@ -203,9 +201,9 @@ $cflags.=" -DNO_MD2" if $no_md2; | |||
| 203 | $cflags.=" -DNO_MD5" if $no_md5; | 201 | $cflags.=" -DNO_MD5" if $no_md5; |
| 204 | $cflags.=" -DNO_SHA" if $no_sha; | 202 | $cflags.=" -DNO_SHA" if $no_sha; |
| 205 | $cflags.=" -DNO_SHA1" if $no_sha1; | 203 | $cflags.=" -DNO_SHA1" if $no_sha1; |
| 206 | $cflags.=" -DNO_RMD160" if $no_rmd160; | 204 | $cflags.=" -DNO_RIPEMD" if $no_rmd160; |
| 207 | $cflags.=" -DNO_MDC2" if $no_mdc2; | 205 | $cflags.=" -DNO_MDC2" if $no_mdc2; |
| 208 | $cflags.=" -DNO_BLOWFISH" if $no_bf; | 206 | $cflags.=" -DNO_BF" if $no_bf; |
| 209 | $cflags.=" -DNO_CAST" if $no_cast; | 207 | $cflags.=" -DNO_CAST" if $no_cast; |
| 210 | $cflags.=" -DNO_DES" if $no_des; | 208 | $cflags.=" -DNO_DES" if $no_des; |
| 211 | $cflags.=" -DNO_RSA" if $no_rsa; | 209 | $cflags.=" -DNO_RSA" if $no_rsa; |
| @@ -223,14 +221,9 @@ else { $cflags="$c_flags$cflags" if ($c_flags ne ""); } | |||
| 223 | 221 | ||
| 224 | $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); | 222 | $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); |
| 225 | 223 | ||
| 226 | if ($ranlib ne "") | ||
| 227 | { | ||
| 228 | $ranlib="\$(SRC_D)$o$ranlib"; | ||
| 229 | } | ||
| 230 | |||
| 231 | if ($msdos) | 224 | if ($msdos) |
| 232 | { | 225 | { |
| 233 | $banner ="\t\@echo Make sure you have run 'perl Configure $type' in the\n"; | 226 | $banner ="\t\@echo Make sure you have run 'perl Configure $platform' in the\n"; |
| 234 | $banner.="\t\@echo top level directory, if you don't have perl, you will\n"; | 227 | $banner.="\t\@echo top level directory, if you don't have perl, you will\n"; |
| 235 | $banner.="\t\@echo need to probably edit crypto/bn/bn.h, check the\n"; | 228 | $banner.="\t\@echo need to probably edit crypto/bn/bn.h, check the\n"; |
| 236 | $banner.="\t\@echo documentation for details.\n"; | 229 | $banner.="\t\@echo documentation for details.\n"; |
| @@ -242,8 +235,8 @@ $link="$bin_dir$link" if ($link !~ /^\$/); | |||
| 242 | $INSTALLTOP =~ s|/|$o|g; | 235 | $INSTALLTOP =~ s|/|$o|g; |
| 243 | 236 | ||
| 244 | $defs= <<"EOF"; | 237 | $defs= <<"EOF"; |
| 245 | # This makefile has been automatically generated from the SSLeay distribution. | 238 | # This makefile has been automatically generated from the OpenSSL distribution. |
| 246 | # This single makefile will build the complete SSLeay distribution and | 239 | # This single makefile will build the complete OpenSSL distribution and |
| 247 | # by default leave the 'intertesting' output files in .${o}out and the stuff | 240 | # by default leave the 'intertesting' output files in .${o}out and the stuff |
| 248 | # that needs deleting in .${o}tmp. | 241 | # that needs deleting in .${o}tmp. |
| 249 | # The file was generated by running 'make makefile.one', which | 242 | # The file was generated by running 'make makefile.one', which |
| @@ -258,6 +251,7 @@ $defs= <<"EOF"; | |||
| 258 | INSTALLTOP=$INSTALLTOP | 251 | INSTALLTOP=$INSTALLTOP |
| 259 | 252 | ||
| 260 | # Set your compiler options | 253 | # Set your compiler options |
| 254 | PLATFORM=$platform | ||
| 261 | CC=$bin_dir${cc} | 255 | CC=$bin_dir${cc} |
| 262 | CFLAG=$cflags | 256 | CFLAG=$cflags |
| 263 | APP_CFLAG=$app_cflag | 257 | APP_CFLAG=$app_cflag |
| @@ -269,18 +263,16 @@ SHLIB_EX_OBJ=$shlib_ex_obj | |||
| 269 | # be added | 263 | # be added |
| 270 | EX_LIBS=$ex_libs | 264 | EX_LIBS=$ex_libs |
| 271 | 265 | ||
| 272 | # The SSLeay directory | 266 | # The OpenSSL directory |
| 273 | SRC_D=$src_dir | 267 | SRC_D=$src_dir |
| 274 | 268 | ||
| 275 | LINK=$link | 269 | LINK=$link |
| 276 | LFLAGS=$lflags | 270 | LFLAGS=$lflags |
| 277 | 271 | ||
| 278 | BN_MULW_OBJ=$bn_mulw_obj | 272 | BN_ASM_OBJ=$bn_asm_obj |
| 279 | BN_MULW_SRC=$bn_mulw_src | 273 | BN_ASM_SRC=$bn_asm_src |
| 280 | DES_ENC_OBJ=$des_enc_obj | 274 | DES_ENC_OBJ=$des_enc_obj |
| 281 | DES_ENC_SRC=$des_enc_src | 275 | DES_ENC_SRC=$des_enc_src |
| 282 | DES_CRYPT_OBJ=$des_crypt_obj | ||
| 283 | DES_CRYPT_SRC=$des_crypt_src | ||
| 284 | BF_ENC_OBJ=$bf_enc_obj | 276 | BF_ENC_OBJ=$bf_enc_obj |
| 285 | BF_ENC_SRC=$bf_enc_src | 277 | BF_ENC_SRC=$bf_enc_src |
| 286 | CAST_ENC_OBJ=$cast_enc_obj | 278 | CAST_ENC_OBJ=$cast_enc_obj |
| @@ -302,11 +294,12 @@ OUT_D=$out_dir | |||
| 302 | TMP_D=$tmp_dir | 294 | TMP_D=$tmp_dir |
| 303 | # The output directory for the header files | 295 | # The output directory for the header files |
| 304 | INC_D=$inc_dir | 296 | INC_D=$inc_dir |
| 297 | INCO_D=$inc_dir${o}openssl | ||
| 305 | 298 | ||
| 306 | CP=$cp | 299 | CP=$cp |
| 307 | RM=$rm | 300 | RM=$rm |
| 308 | RANLIB=$ranlib | 301 | RANLIB=$ranlib |
| 309 | MKDIR=mkdir | 302 | MKDIR=$mkdir |
| 310 | MKLIB=$bin_dir$mklib | 303 | MKLIB=$bin_dir$mklib |
| 311 | MLFLAGS=$mlflags | 304 | MLFLAGS=$mlflags |
| 312 | ASM=$bin_dir$asm | 305 | ASM=$bin_dir$asm |
| @@ -315,7 +308,7 @@ ASM=$bin_dir$asm | |||
| 315 | # You should not need to touch anything below this point | 308 | # You should not need to touch anything below this point |
| 316 | ###################################################### | 309 | ###################################################### |
| 317 | 310 | ||
| 318 | E_EXE=ssleay | 311 | E_EXE=openssl |
| 319 | SSL=$ssl | 312 | SSL=$ssl |
| 320 | CRYPTO=$crypto | 313 | CRYPTO=$crypto |
| 321 | RSAGLUE=$RSAglue | 314 | RSAGLUE=$RSAglue |
| @@ -323,6 +316,9 @@ RSAGLUE=$RSAglue | |||
| 323 | # BIN_D - Binary output directory | 316 | # BIN_D - Binary output directory |
| 324 | # TEST_D - Binary test file output directory | 317 | # TEST_D - Binary test file output directory |
| 325 | # LIB_D - library output directory | 318 | # LIB_D - library output directory |
| 319 | # Note: if you change these point to different directories then uncomment out | ||
| 320 | # the lines around the 'NB' comment below. | ||
| 321 | # | ||
| 326 | BIN_D=\$(OUT_D) | 322 | BIN_D=\$(OUT_D) |
| 327 | TEST_D=\$(OUT_D) | 323 | TEST_D=\$(OUT_D) |
| 328 | LIB_D=\$(OUT_D) | 324 | LIB_D=\$(OUT_D) |
| @@ -337,8 +333,8 @@ O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp | |||
| 337 | O_RSAGLUE= \$(LIB_D)$o$plib\$(RSAGLUE)$libp | 333 | O_RSAGLUE= \$(LIB_D)$o$plib\$(RSAGLUE)$libp |
| 338 | SO_SSL= $plib\$(SSL)$so_shlibp | 334 | SO_SSL= $plib\$(SSL)$so_shlibp |
| 339 | SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp | 335 | SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp |
| 340 | L_SSL= \$(LIB_D)$o\$(SSL)$libp | 336 | L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp |
| 341 | L_CRYPTO= \$(LIB_D)$o\$(CRYPTO)$libp | 337 | L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp |
| 342 | 338 | ||
| 343 | L_LIBS= \$(L_SSL) \$(L_CRYPTO) | 339 | L_LIBS= \$(L_SSL) \$(L_CRYPTO) |
| 344 | #L_LIBS= \$(O_SSL) \$(O_RSAGLUE) -lrsaref \$(O_CRYPTO) | 340 | #L_LIBS= \$(O_SSL) \$(O_RSAGLUE) -lrsaref \$(O_CRYPTO) |
| @@ -357,23 +353,26 @@ LIBS_DEP=\$(O_CRYPTO) \$(O_RSAGLUE) \$(O_SSL) | |||
| 357 | EOF | 353 | EOF |
| 358 | 354 | ||
| 359 | $rules=<<"EOF"; | 355 | $rules=<<"EOF"; |
| 360 | all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INC_D) headers lib exe | 356 | all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe |
| 361 | 357 | ||
| 362 | banner: | 358 | banner: |
| 363 | $banner | 359 | $banner |
| 364 | 360 | ||
| 365 | \$(TMP_D): | 361 | \$(TMP_D): |
| 366 | \$(MKDIR) \$(TMP_D) | 362 | \$(MKDIR) \$(TMP_D) |
| 367 | 363 | # NB: uncomment out these lines if BIN_D, TEST_D and LIB_D are different | |
| 368 | \$(BIN_D): | 364 | #\$(BIN_D): |
| 369 | \$(MKDIR) \$(BIN_D) | 365 | # \$(MKDIR) \$(BIN_D) |
| 370 | 366 | # | |
| 371 | \$(TEST_D): | 367 | #\$(TEST_D): |
| 372 | \$(MKDIR) \$(TEST_D) | 368 | # \$(MKDIR) \$(TEST_D) |
| 373 | 369 | ||
| 374 | \$(LIB_D): | 370 | \$(LIB_D): |
| 375 | \$(MKDIR) \$(LIB_D) | 371 | \$(MKDIR) \$(LIB_D) |
| 376 | 372 | ||
| 373 | \$(INCO_D): \$(INC_D) | ||
| 374 | \$(MKDIR) \$(INCO_D) | ||
| 375 | |||
| 377 | \$(INC_D): | 376 | \$(INC_D): |
| 378 | \$(MKDIR) \$(INC_D) | 377 | \$(MKDIR) \$(INC_D) |
| 379 | 378 | ||
| @@ -387,8 +386,9 @@ install: | |||
| 387 | \$(MKDIR) \$(INSTALLTOP) | 386 | \$(MKDIR) \$(INSTALLTOP) |
| 388 | \$(MKDIR) \$(INSTALLTOP)${o}bin | 387 | \$(MKDIR) \$(INSTALLTOP)${o}bin |
| 389 | \$(MKDIR) \$(INSTALLTOP)${o}include | 388 | \$(MKDIR) \$(INSTALLTOP)${o}include |
| 389 | \$(MKDIR) \$(INSTALLTOP)${o}include${o}openssl | ||
| 390 | \$(MKDIR) \$(INSTALLTOP)${o}lib | 390 | \$(MKDIR) \$(INSTALLTOP)${o}lib |
| 391 | \$(CP) \$(INC_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include | 391 | \$(CP) \$(INCO_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include${o}openssl |
| 392 | \$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin | 392 | \$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin |
| 393 | \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib | 393 | \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib |
| 394 | \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib | 394 | \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib |
| @@ -401,6 +401,42 @@ vclean: | |||
| 401 | \$(RM) \$(OUT_D)$o*.* | 401 | \$(RM) \$(OUT_D)$o*.* |
| 402 | 402 | ||
| 403 | EOF | 403 | EOF |
| 404 | |||
| 405 | my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform"; | ||
| 406 | $platform_cpp_symbol =~ s/-/_/g; | ||
| 407 | if (open(IN,"crypto/buildinf.h")) | ||
| 408 | { | ||
| 409 | # Remove entry for this platform in existing file buildinf.h. | ||
| 410 | |||
| 411 | my $old_buildinf_h = ""; | ||
| 412 | while (<IN>) | ||
| 413 | { | ||
| 414 | if (/^\#ifdef $platform_cpp_symbol$/) | ||
| 415 | { | ||
| 416 | while (<IN>) { last if (/^\#endif/); } | ||
| 417 | } | ||
| 418 | else | ||
| 419 | { | ||
| 420 | $old_buildinf_h .= $_; | ||
| 421 | } | ||
| 422 | } | ||
| 423 | close(IN); | ||
| 424 | |||
| 425 | open(OUT,">crypto/buildinf.h") || die "Can't open buildinf.h"; | ||
| 426 | print OUT $old_buildinf_h; | ||
| 427 | close(OUT); | ||
| 428 | } | ||
| 429 | |||
| 430 | open (OUT,">>crypto/buildinf.h") || die "Can't open buildinf.h"; | ||
| 431 | printf OUT <<EOF; | ||
| 432 | #ifdef $platform_cpp_symbol | ||
| 433 | /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */ | ||
| 434 | #define CFLAGS "$cc $cflags" | ||
| 435 | #define PLATFORM "$platform" | ||
| 436 | EOF | ||
| 437 | printf OUT " #define DATE \"%s\"\n", scalar gmtime(); | ||
| 438 | printf OUT "#endif\n"; | ||
| 439 | close(OUT); | ||
| 404 | 440 | ||
| 405 | ############################################# | 441 | ############################################# |
| 406 | # We parse in input file and 'store' info for later printing. | 442 | # We parse in input file and 'store' info for later printing. |
| @@ -468,8 +504,8 @@ chop($h); $header=$h; | |||
| 468 | $defs.=&do_defs("HEADER",$header,"\$(INCL_D)",".h"); | 504 | $defs.=&do_defs("HEADER",$header,"\$(INCL_D)",".h"); |
| 469 | $rules.=&do_copy_rule("\$(INCL_D)",$header,".h"); | 505 | $rules.=&do_copy_rule("\$(INCL_D)",$header,".h"); |
| 470 | 506 | ||
| 471 | $defs.=&do_defs("EXHEADER",$exheader,"\$(INC_D)",".h"); | 507 | $defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)",".h"); |
| 472 | $rules.=&do_copy_rule("\$(INC_D)",$exheader,".h"); | 508 | $rules.=&do_copy_rule("\$(INCO_D)",$exheader,".h"); |
| 473 | 509 | ||
| 474 | $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj); | 510 | $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj); |
| 475 | $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)"); | 511 | $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)"); |
| @@ -496,10 +532,10 @@ foreach (values %lib_nam) | |||
| 496 | next; | 532 | next; |
| 497 | } | 533 | } |
| 498 | 534 | ||
| 499 | if (($bn_mulw_obj ne "") && ($_ eq "CRYPTO")) | 535 | if (($bn_asm_obj ne "") && ($_ eq "CRYPTO")) |
| 500 | { | 536 | { |
| 501 | $lib_obj =~ s/\s\S*\/bn_mulw\S*/ \$(BN_MULW_OBJ)/; | 537 | $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/; |
| 502 | $rules.=&do_asm_rule($bn_mulw_obj,$bn_mulw_src); | 538 | $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src); |
| 503 | } | 539 | } |
| 504 | if (($des_enc_obj ne "") && ($_ eq "CRYPTO")) | 540 | if (($des_enc_obj ne "") && ($_ eq "CRYPTO")) |
| 505 | { | 541 | { |
| @@ -615,6 +651,7 @@ sub var_add | |||
| 615 | 651 | ||
| 616 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; | 652 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; |
| 617 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; | 653 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; |
| 654 | @a=grep(!/(rmd)|(ripemd)/,@a) if $no_rmd160; | ||
| 618 | 655 | ||
| 619 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; | 656 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; |
| 620 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; | 657 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; |
| @@ -631,7 +668,7 @@ sub var_add | |||
| 631 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | 668 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; |
| 632 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; | 669 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; |
| 633 | 670 | ||
| 634 | @a=grep(!/(^rsa$)|(^genrsa$)|(^req$)|(^ca$)/,@a) if $no_rsa; | 671 | @a=grep(!/(^rsa$)|(^genrsa$)/,@a) if $no_rsa; |
| 635 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; | 672 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; |
| 636 | @a=grep(!/^gendsa$/,@a) if $no_sha1; | 673 | @a=grep(!/^gendsa$/,@a) if $no_sha1; |
| 637 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; | 674 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; |
| @@ -677,7 +714,7 @@ sub do_defs | |||
| 677 | if (($_ =~ /bss_file/) && ($postfix eq ".h")) | 714 | if (($_ =~ /bss_file/) && ($postfix eq ".h")) |
| 678 | { $pf=".c"; } | 715 | { $pf=".c"; } |
| 679 | else { $pf=$postfix; } | 716 | else { $pf=$postfix; } |
| 680 | if ($_ =~ /BN_MULW/) { $t="$_ "; } | 717 | if ($_ =~ /BN_ASM/) { $t="$_ "; } |
| 681 | elsif ($_ =~ /DES_ENC/) { $t="$_ "; } | 718 | elsif ($_ =~ /DES_ENC/) { $t="$_ "; } |
| 682 | elsif ($_ =~ /BF_ENC/) { $t="$_ "; } | 719 | elsif ($_ =~ /BF_ENC/) { $t="$_ "; } |
| 683 | elsif ($_ =~ /CAST_ENC/){ $t="$_ "; } | 720 | elsif ($_ =~ /CAST_ENC/){ $t="$_ "; } |
| @@ -704,23 +741,6 @@ sub bname | |||
| 704 | return($ret); | 741 | return($ret); |
| 705 | } | 742 | } |
| 706 | 743 | ||
| 707 | # do a rule for each file that says 'copy' to new direcory on change | ||
| 708 | sub do_copy_rule | ||
| 709 | { | ||
| 710 | local($to,$files,$p)=@_; | ||
| 711 | local($ret,$_,$n,$pp); | ||
| 712 | |||
| 713 | $files =~ s/\//$o/g if $o ne '/'; | ||
| 714 | foreach (split(/\s+/,$files)) | ||
| 715 | { | ||
| 716 | $n=&bname($_); | ||
| 717 | if ($n =~ /bss_file/) | ||
| 718 | { $pp=".c"; } | ||
| 719 | else { $pp=$p; } | ||
| 720 | $ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \$(SRC_D)$o$_$pp $to${o}$n$pp\n\n"; | ||
| 721 | } | ||
| 722 | return($ret); | ||
| 723 | } | ||
| 724 | 744 | ||
| 725 | ############################################################## | 745 | ############################################################## |
| 726 | # do a rule for each file that says 'compile' to new direcory | 746 | # do a rule for each file that says 'compile' to new direcory |
| @@ -746,8 +766,7 @@ sub cc_compile_target | |||
| 746 | local($target,$source,$ex_flags)=@_; | 766 | local($target,$source,$ex_flags)=@_; |
| 747 | local($ret); | 767 | local($ret); |
| 748 | 768 | ||
| 749 | # EAY EAY | 769 | $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/); |
| 750 | $ex_flags.=' -DCFLAGS="\"$(CC) $(CFLAG)\""' if ($source =~ /cversion/); | ||
| 751 | $target =~ s/\//$o/g if $o ne "/"; | 770 | $target =~ s/\//$o/g if $o ne "/"; |
| 752 | $source =~ s/\//$o/g if $o ne "/"; | 771 | $source =~ s/\//$o/g if $o ne "/"; |
| 753 | $ret ="$target: \$(SRC_D)$o$source\n\t"; | 772 | $ret ="$target: \$(SRC_D)$o$source\n\t"; |
| @@ -791,3 +810,64 @@ sub do_shlib_rule | |||
| 791 | return($ret); | 810 | return($ret); |
| 792 | } | 811 | } |
| 793 | 812 | ||
| 813 | # do a rule for each file that says 'copy' to new direcory on change | ||
| 814 | sub do_copy_rule | ||
| 815 | { | ||
| 816 | local($to,$files,$p)=@_; | ||
| 817 | local($ret,$_,$n,$pp); | ||
| 818 | |||
| 819 | $files =~ s/\//$o/g if $o ne '/'; | ||
| 820 | foreach (split(/\s+/,$files)) | ||
| 821 | { | ||
| 822 | $n=&bname($_); | ||
| 823 | if ($n =~ /bss_file/) | ||
| 824 | { $pp=".c"; } | ||
| 825 | else { $pp=$p; } | ||
| 826 | $ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \$(SRC_D)$o$_$pp $to${o}$n$pp\n\n"; | ||
| 827 | } | ||
| 828 | return($ret); | ||
| 829 | } | ||
| 830 | |||
| 831 | sub read_options | ||
| 832 | { | ||
| 833 | if (/^no-rc2$/) { $no_rc2=1; } | ||
| 834 | elsif (/^no-rc4$/) { $no_rc4=1; } | ||
| 835 | elsif (/^no-rc5$/) { $no_rc5=1; } | ||
| 836 | elsif (/^no-idea$/) { $no_idea=1; } | ||
| 837 | elsif (/^no-des$/) { $no_des=1; } | ||
| 838 | elsif (/^no-bf$/) { $no_bf=1; } | ||
| 839 | elsif (/^no-cast$/) { $no_cast=1; } | ||
| 840 | elsif (/^no-md2$/) { $no_md2=1; } | ||
| 841 | elsif (/^no-md5$/) { $no_md5=1; } | ||
| 842 | elsif (/^no-sha$/) { $no_sha=1; } | ||
| 843 | elsif (/^no-sha1$/) { $no_sha1=1; } | ||
| 844 | elsif (/^no-ripemd$/) { $no_ripemd=1; } | ||
| 845 | elsif (/^no-mdc2$/) { $no_mdc2=1; } | ||
| 846 | elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_rc5=$no_idea=$no_rsa=1; } | ||
| 847 | elsif (/^no-rsa$/) { $no_rsa=1; } | ||
| 848 | elsif (/^no-dsa$/) { $no_dsa=1; } | ||
| 849 | elsif (/^no-dh$/) { $no_dh=1; } | ||
| 850 | elsif (/^no-hmac$/) { $no_hmac=1; } | ||
| 851 | elsif (/^no-asm$/) { $no_asm=1; } | ||
| 852 | elsif (/^nasm$/) { $nasm=1; } | ||
| 853 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | ||
| 854 | elsif (/^no-ssl3$/) { $no_ssl3=1; } | ||
| 855 | elsif (/^no-err$/) { $no_err=1; } | ||
| 856 | elsif (/^no-sock$/) { $no_sock=1; } | ||
| 857 | |||
| 858 | elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1; | ||
| 859 | $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1; | ||
| 860 | $no_ssl2=$no_err=$no_rmd160=$no_rc5=1; } | ||
| 861 | |||
| 862 | elsif (/^rsaref$/) { $rsaref=1; } | ||
| 863 | elsif (/^gcc$/) { $gcc=1; } | ||
| 864 | elsif (/^debug$/) { $debug=1; } | ||
| 865 | elsif (/^shlib$/) { $shlib=1; } | ||
| 866 | elsif (/^dll$/) { $shlib=1; } | ||
| 867 | elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } | ||
| 868 | elsif (/^-[lL].*$/) { $l_flags.="$_ "; } | ||
| 869 | elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) | ||
| 870 | { $c_flags.="$_ "; } | ||
| 871 | else { return(0); } | ||
| 872 | return(1); | ||
| 873 | } | ||
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index 8124f11292..80384af325 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl | |||
| @@ -1,52 +1,96 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl -w |
| 2 | # | 2 | # |
| 3 | # generate a .def file | 3 | # generate a .def file |
| 4 | # | 4 | # |
| 5 | # It does this by parsing the header files and looking for the | 5 | # It does this by parsing the header files and looking for the |
| 6 | # non-prototyped functions. | 6 | # prototyped functions: it then prunes the output. |
| 7 | # | 7 | # |
| 8 | 8 | ||
| 9 | $crypto_num="util/libeay.num"; | 9 | $crypto_num="util/libeay.num"; |
| 10 | $ssl_num= "util/ssleay.num"; | 10 | $ssl_num= "util/ssleay.num"; |
| 11 | 11 | ||
| 12 | $NT=1; | 12 | my $do_update = 0; |
| 13 | foreach (@ARGV) | 13 | my $do_crypto = 0; |
| 14 | my $do_ssl = 0; | ||
| 15 | $rsaref = 0; | ||
| 16 | |||
| 17 | $W32=1; | ||
| 18 | $NT=0; | ||
| 19 | # Set this to make typesafe STACK definitions appear in DEF | ||
| 20 | $safe_stack_def = 1; | ||
| 21 | |||
| 22 | $options=""; | ||
| 23 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | ||
| 24 | while(<IN>) { | ||
| 25 | $options=$1 if (/^OPTIONS=(.*)$/); | ||
| 26 | } | ||
| 27 | close(IN); | ||
| 28 | |||
| 29 | foreach (@ARGV, split(/ /, $options)) | ||
| 14 | { | 30 | { |
| 15 | $NT=1 if $_ eq "32"; | 31 | $W32=1 if $_ eq "32"; |
| 16 | $NT=0 if $_ eq "16"; | 32 | $W32=0 if $_ eq "16"; |
| 33 | if($_ eq "NT") { | ||
| 34 | $W32 = 1; | ||
| 35 | $NT = 1; | ||
| 36 | } | ||
| 17 | $do_ssl=1 if $_ eq "ssleay"; | 37 | $do_ssl=1 if $_ eq "ssleay"; |
| 38 | $do_ssl=1 if $_ eq "ssl"; | ||
| 18 | $do_crypto=1 if $_ eq "libeay"; | 39 | $do_crypto=1 if $_ eq "libeay"; |
| 40 | $do_crypto=1 if $_ eq "crypto"; | ||
| 41 | $do_update=1 if $_ eq "update"; | ||
| 42 | $rsaref=1 if $_ eq "rsaref"; | ||
| 43 | |||
| 44 | if (/^no-rc2$/) { $no_rc2=1; } | ||
| 45 | elsif (/^no-rc4$/) { $no_rc4=1; } | ||
| 46 | elsif (/^no-rc5$/) { $no_rc5=1; } | ||
| 47 | elsif (/^no-idea$/) { $no_idea=1; } | ||
| 48 | elsif (/^no-des$/) { $no_des=1; } | ||
| 49 | elsif (/^no-bf$/) { $no_bf=1; } | ||
| 50 | elsif (/^no-cast$/) { $no_cast=1; } | ||
| 51 | elsif (/^no-md2$/) { $no_md2=1; } | ||
| 52 | elsif (/^no-md5$/) { $no_md5=1; } | ||
| 53 | elsif (/^no-sha$/) { $no_sha=1; } | ||
| 54 | elsif (/^no-ripemd$/) { $no_ripemd=1; } | ||
| 55 | elsif (/^no-mdc2$/) { $no_mdc2=1; } | ||
| 56 | elsif (/^no-rsa$/) { $no_rsa=1; } | ||
| 57 | elsif (/^no-dsa$/) { $no_dsa=1; } | ||
| 58 | elsif (/^no-dh$/) { $no_dh=1; } | ||
| 59 | elsif (/^no-hmac$/) { $no_hmac=1; } | ||
| 19 | } | 60 | } |
| 20 | 61 | ||
| 21 | if (!$do_ssl && !$do_crypto) | 62 | if (!$do_ssl && !$do_crypto) |
| 22 | { | 63 | { |
| 23 | print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 ]\n"; | 64 | print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ] [rsaref]\n"; |
| 24 | exit(1); | 65 | exit(1); |
| 25 | } | 66 | } |
| 26 | 67 | ||
| 27 | %ssl_list=&load_numbers($ssl_num); | 68 | %ssl_list=&load_numbers($ssl_num); |
| 69 | $max_ssl = $max_num; | ||
| 28 | %crypto_list=&load_numbers($crypto_num); | 70 | %crypto_list=&load_numbers($crypto_num); |
| 71 | $max_crypto = $max_num; | ||
| 29 | 72 | ||
| 30 | $ssl="ssl/ssl.h"; | 73 | $ssl="ssl/ssl.h"; |
| 31 | 74 | ||
| 32 | $crypto ="crypto/crypto.h"; | 75 | $crypto ="crypto/crypto.h"; |
| 33 | $crypto.=" crypto/des/des.h"; | 76 | $crypto.=" crypto/des/des.h" unless $no_des; |
| 34 | $crypto.=" crypto/idea/idea.h"; | 77 | $crypto.=" crypto/idea/idea.h" unless $no_idea; |
| 35 | $crypto.=" crypto/rc4/rc4.h"; | 78 | $crypto.=" crypto/rc4/rc4.h" unless $no_rc4; |
| 36 | $crypto.=" crypto/rc5/rc5.h"; | 79 | $crypto.=" crypto/rc5/rc5.h" unless $no_rc5; |
| 37 | $crypto.=" crypto/rc2/rc2.h"; | 80 | $crypto.=" crypto/rc2/rc2.h" unless $no_rc2; |
| 38 | $crypto.=" crypto/bf/blowfish.h"; | 81 | $crypto.=" crypto/bf/blowfish.h" unless $no_bf; |
| 39 | $crypto.=" crypto/cast/cast.h"; | 82 | $crypto.=" crypto/cast/cast.h" unless $no_cast; |
| 40 | $crypto.=" crypto/md2/md2.h"; | 83 | $crypto.=" crypto/md2/md2.h" unless $no_md2; |
| 41 | $crypto.=" crypto/md5/md5.h"; | 84 | $crypto.=" crypto/md5/md5.h" unless $no_md5; |
| 42 | $crypto.=" crypto/mdc2/mdc2.h"; | 85 | $crypto.=" crypto/mdc2/mdc2.h" unless $no_mdc2; |
| 43 | $crypto.=" crypto/sha/sha.h"; | 86 | $crypto.=" crypto/sha/sha.h" unless $no_sha; |
| 44 | $crypto.=" crypto/ripemd/ripemd.h"; | 87 | $crypto.=" crypto/ripemd/ripemd.h" unless $no_ripemd; |
| 45 | 88 | ||
| 46 | $crypto.=" crypto/bn/bn.h"; | 89 | $crypto.=" crypto/bn/bn.h"; |
| 47 | $crypto.=" crypto/rsa/rsa.h"; | 90 | $crypto.=" crypto/rsa/rsa.h" unless $no_rsa; |
| 48 | $crypto.=" crypto/dsa/dsa.h"; | 91 | $crypto.=" crypto/dsa/dsa.h" unless $no_dsa; |
| 49 | $crypto.=" crypto/dh/dh.h"; | 92 | $crypto.=" crypto/dh/dh.h" unless $no_dh; |
| 93 | $crypto.=" crypto/hmac/hmac.h" unless $no_hmac; | ||
| 50 | 94 | ||
| 51 | $crypto.=" crypto/stack/stack.h"; | 95 | $crypto.=" crypto/stack/stack.h"; |
| 52 | $crypto.=" crypto/buffer/buffer.h"; | 96 | $crypto.=" crypto/buffer/buffer.h"; |
| @@ -63,182 +107,255 @@ $crypto.=" crypto/asn1/asn1.h"; | |||
| 63 | $crypto.=" crypto/asn1/asn1_mac.h"; | 107 | $crypto.=" crypto/asn1/asn1_mac.h"; |
| 64 | $crypto.=" crypto/err/err.h"; | 108 | $crypto.=" crypto/err/err.h"; |
| 65 | $crypto.=" crypto/pkcs7/pkcs7.h"; | 109 | $crypto.=" crypto/pkcs7/pkcs7.h"; |
| 110 | $crypto.=" crypto/pkcs12/pkcs12.h"; | ||
| 66 | $crypto.=" crypto/x509/x509.h"; | 111 | $crypto.=" crypto/x509/x509.h"; |
| 67 | $crypto.=" crypto/x509/x509_vfy.h"; | 112 | $crypto.=" crypto/x509/x509_vfy.h"; |
| 113 | $crypto.=" crypto/x509v3/x509v3.h"; | ||
| 68 | $crypto.=" crypto/rand/rand.h"; | 114 | $crypto.=" crypto/rand/rand.h"; |
| 69 | $crypto.=" crypto/hmac/hmac.h"; | 115 | $crypto.=" crypto/comp/comp.h"; |
| 116 | $crypto.=" crypto/tmdiff.h"; | ||
| 117 | |||
| 118 | @ssl_func = &do_defs("SSLEAY", $ssl); | ||
| 119 | @crypto_func = &do_defs("LIBEAY", $crypto); | ||
| 120 | |||
| 121 | |||
| 122 | if ($do_update) { | ||
| 123 | |||
| 124 | if ($do_ssl == 1) { | ||
| 125 | open(OUT, ">>$ssl_num"); | ||
| 126 | &update_numbers(*OUT,"SSLEAY",*ssl_list,$max_ssl, @ssl_func); | ||
| 127 | close OUT; | ||
| 128 | } | ||
| 70 | 129 | ||
| 71 | $match{'NOPROTO'}=1; | 130 | if($do_crypto == 1) { |
| 72 | $match2{'PERL5'}=1; | 131 | open(OUT, ">>$crypto_num"); |
| 132 | &update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto, @crypto_func); | ||
| 133 | close OUT; | ||
| 134 | } | ||
| 73 | 135 | ||
| 74 | &print_def_file(*STDOUT,"SSLEAY",*ssl_list,&do_defs("SSLEAY",$ssl)) | 136 | } else { |
| 75 | if $do_ssl == 1; | 137 | |
| 138 | &print_def_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func) | ||
| 139 | if $do_ssl == 1; | ||
| 140 | |||
| 141 | &print_def_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func) | ||
| 142 | if $do_crypto == 1; | ||
| 143 | |||
| 144 | } | ||
| 76 | 145 | ||
| 77 | &print_def_file(*STDOUT,"LIBEAY",*crypto_list,&do_defs("LIBEAY",$crypto)) | ||
| 78 | if $do_crypto == 1; | ||
| 79 | 146 | ||
| 80 | sub do_defs | 147 | sub do_defs |
| 81 | { | 148 | { |
| 82 | local($name,$files)=@_; | 149 | my($name,$files)=@_; |
| 83 | local(@ret); | 150 | my @ret; |
| 151 | my %funcs; | ||
| 84 | 152 | ||
| 85 | $off=-1; | ||
| 86 | foreach $file (split(/\s+/,$files)) | 153 | foreach $file (split(/\s+/,$files)) |
| 87 | { | 154 | { |
| 88 | # print STDERR "reading $file\n"; | ||
| 89 | open(IN,"<$file") || die "unable to open $file:$!\n"; | 155 | open(IN,"<$file") || die "unable to open $file:$!\n"; |
| 90 | $depth=0; | 156 | |
| 91 | $pr=-1; | 157 | my $line = "", $def= ""; |
| 92 | @np=""; | 158 | my %tag = ( |
| 93 | $/=undef; | 159 | FreeBSD => 0, |
| 94 | $a=<IN>; | 160 | NOPROTO => 0, |
| 95 | while (($i=index($a,"/*")) >= 0) | 161 | WIN16 => 0, |
| 96 | { | 162 | PERL5 => 0, |
| 97 | $j=index($a,"*/"); | 163 | _WINDLL => 0, |
| 98 | break unless ($j >= 0); | 164 | NO_FP_API => 0, |
| 99 | $a=substr($a,0,$i).substr($a,$j+2); | 165 | CONST_STRICT => 0, |
| 100 | # print "$i $j\n"; | 166 | TRUE => 1, |
| 167 | ); | ||
| 168 | while(<IN>) { | ||
| 169 | last if (/BEGIN ERROR CODES/); | ||
| 170 | if ($line ne '') { | ||
| 171 | $_ = $line . $_; | ||
| 172 | $line = ''; | ||
| 101 | } | 173 | } |
| 102 | foreach (split("\n",$a)) | 174 | |
| 103 | { | 175 | if (/\\$/) { |
| 104 | if (/^\#\s*ifndef (.*)/) | 176 | $line = $_; |
| 105 | { | 177 | next; |
| 178 | } | ||
| 179 | |||
| 180 | $cpp = 1 if /^#.*ifdef.*cplusplus/; | ||
| 181 | if ($cpp) { | ||
| 182 | $cpp = 0 if /^#.*endif/; | ||
| 183 | next; | ||
| 184 | } | ||
| 185 | |||
| 186 | s/\/\*.*?\*\///gs; # ignore comments | ||
| 187 | s/{[^{}]*}//gs; # ignore {} blocks | ||
| 188 | if (/^\#\s*ifndef (.*)/) { | ||
| 106 | push(@tag,$1); | 189 | push(@tag,$1); |
| 107 | $tag{$1}=-1; | 190 | $tag{$1}=-1; |
| 108 | next; | 191 | next; |
| 109 | } | 192 | } elsif (/^\#\s*if !defined\(([^\)]+)\)/) { |
| 110 | elsif (/^\#\s*if !defined\(([^\)]+)\)/) | ||
| 111 | { | ||
| 112 | push(@tag,$1); | 193 | push(@tag,$1); |
| 113 | $tag{$1}=-1; | 194 | $tag{$1}=-1; |
| 114 | next; | 195 | next; |
| 115 | } | 196 | } elsif (/^\#\s*ifdef (.*)/) { |
| 116 | elsif (/^\#\s*ifdef (.*)/) | ||
| 117 | { | ||
| 118 | push(@tag,$1); | 197 | push(@tag,$1); |
| 119 | $tag{$1}=1; | 198 | $tag{$1}=1; |
| 120 | next; | 199 | next; |
| 121 | } | 200 | } elsif (/^\#\s*if defined(.*)/) { |
| 122 | elsif (/^\#\s*if defined(.*)/) | ||
| 123 | { | ||
| 124 | push(@tag,$1); | 201 | push(@tag,$1); |
| 125 | $tag{$1}=1; | 202 | $tag{$1}=1; |
| 126 | next; | 203 | next; |
| 127 | } | 204 | } elsif (/^\#\s*endif/) { |
| 128 | elsif (/^\#\s*endif/) | ||
| 129 | { | ||
| 130 | $tag{$tag[$#tag]}=0; | 205 | $tag{$tag[$#tag]}=0; |
| 131 | pop(@tag); | 206 | pop(@tag); |
| 132 | next; | 207 | next; |
| 133 | } | 208 | } elsif (/^\#\s*else/) { |
| 134 | elsif (/^\#\s*else/) | 209 | my $t=$tag[$#tag]; |
| 135 | { | ||
| 136 | $t=$tag[$#tag]; | ||
| 137 | $tag{$t}= -$tag{$t}; | 210 | $tag{$t}= -$tag{$t}; |
| 138 | next; | 211 | next; |
| 212 | } elsif (/^\#\s*if\s+1/) { | ||
| 213 | # Dummy tag | ||
| 214 | push(@tag,"TRUE"); | ||
| 215 | $tag{"TRUE"}=1; | ||
| 216 | next; | ||
| 217 | } elsif (/^\#/) { | ||
| 218 | next; | ||
| 219 | } | ||
| 220 | if ($safe_stack_def && | ||
| 221 | /^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) { | ||
| 222 | $funcs{"sk_${1}_new"} = 1; | ||
| 223 | $funcs{"sk_${1}_new_null"} = 1; | ||
| 224 | $funcs{"sk_${1}_free"} = 1; | ||
| 225 | $funcs{"sk_${1}_num"} = 1; | ||
| 226 | $funcs{"sk_${1}_value"} = 1; | ||
| 227 | $funcs{"sk_${1}_set"} = 1; | ||
| 228 | $funcs{"sk_${1}_zero"} = 1; | ||
| 229 | $funcs{"sk_${1}_push"} = 1; | ||
| 230 | $funcs{"sk_${1}_unshift"} = 1; | ||
| 231 | $funcs{"sk_${1}_find"} = 1; | ||
| 232 | $funcs{"sk_${1}_delete"} = 1; | ||
| 233 | $funcs{"sk_${1}_delete_ptr"} = 1; | ||
| 234 | $funcs{"sk_${1}_insert"} = 1; | ||
| 235 | $funcs{"sk_${1}_set_cmp_func"} = 1; | ||
| 236 | $funcs{"sk_${1}_dup"} = 1; | ||
| 237 | $funcs{"sk_${1}_pop_free"} = 1; | ||
| 238 | $funcs{"sk_${1}_shift"} = 1; | ||
| 239 | $funcs{"sk_${1}_pop"} = 1; | ||
| 240 | $funcs{"sk_${1}_sort"} = 1; | ||
| 241 | } elsif ($safe_stack_def && | ||
| 242 | /^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { | ||
| 243 | $funcs{"d2i_ASN1_SET_OF_${1}"} = 1; | ||
| 244 | $funcs{"i2d_ASN1_SET_OF_${1}"} = 1; | ||
| 245 | } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || | ||
| 246 | /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) { | ||
| 247 | if($W32) { | ||
| 248 | $funcs{"PEM_read_${1}"} = 1; | ||
| 249 | $funcs{"PEM_write_${1}"} = 1; | ||
| 139 | } | 250 | } |
| 140 | #printf STDERR "$_\n%2d %2d %2d %2d %2d $NT\n", | 251 | $funcs{"PEM_read_bio_${1}"} = 1; |
| 141 | #$tag{'NOPROTO'},$tag{'FreeBSD'},$tag{'WIN16'},$tag{'PERL5'},$tag{'NO_FP_API'}; | 252 | $funcs{"PEM_write_bio_${1}"} = 1; |
| 142 | 253 | } elsif ( | |
| 143 | $t=undef; | ||
| 144 | if (/^extern .*;$/) | ||
| 145 | { $t=&do_extern($name,$_); } | ||
| 146 | elsif ( ($tag{'NOPROTO'} == 1) && | ||
| 147 | ($tag{'FreeBSD'} != 1) && | 254 | ($tag{'FreeBSD'} != 1) && |
| 148 | (($NT && ($tag{'WIN16'} != 1)) || | 255 | ($tag{'CONST_STRICT'} != 1) && |
| 149 | (!$NT && ($tag{'WIN16'} != -1))) && | 256 | (($W32 && ($tag{'WIN16'} != 1)) || |
| 257 | (!$W32 && ($tag{'WIN16'} != -1))) && | ||
| 150 | ($tag{'PERL5'} != 1) && | 258 | ($tag{'PERL5'} != 1) && |
| 151 | # ($tag{'_WINDLL'} != -1) && | 259 | # ($tag{'_WINDLL'} != -1) && |
| 152 | ((!$NT && $tag{'_WINDLL'} != -1) || | 260 | ((!$W32 && $tag{'_WINDLL'} != -1) || |
| 153 | ($NT && $tag{'_WINDLL'} != 1)) && | 261 | ($W32 && $tag{'_WINDLL'} != 1)) && |
| 154 | ((($tag{'NO_FP_API'} != 1) && $NT) || | 262 | ((($tag{'NO_FP_API'} != 1) && $W32) || |
| 155 | (($tag{'NO_FP_API'} != -1) && !$NT))) | 263 | (($tag{'NO_FP_API'} != -1) && !$W32))) |
| 156 | { $t=&do_line($name,$_); } | ||
| 157 | else | ||
| 158 | { $t=undef; } | ||
| 159 | if (($t ne undef) && (!$done{$name,$t})) | ||
| 160 | { | 264 | { |
| 161 | $done{$name,$t}++; | 265 | if (/{|\/\*/) { # } |
| 162 | push(@ret,$t); | 266 | $line = $_; |
| 163 | #printf STDERR "one:$t\n" if $t =~ /BIO_/; | 267 | } else { |
| 268 | $def .= $_; | ||
| 269 | } | ||
| 164 | } | 270 | } |
| 165 | } | 271 | } |
| 166 | close(IN); | 272 | close(IN); |
| 273 | |||
| 274 | foreach (split /;/, $def) { | ||
| 275 | s/^[\n\s]*//g; | ||
| 276 | s/[\n\s]*$//g; | ||
| 277 | next if(/typedef\W/); | ||
| 278 | next if(/EVP_bf/ and $no_bf); | ||
| 279 | next if(/EVP_cast/ and $no_cast); | ||
| 280 | next if(/EVP_des/ and $no_des); | ||
| 281 | next if(/EVP_dss/ and $no_dsa); | ||
| 282 | next if(/EVP_idea/ and $no_idea); | ||
| 283 | next if(/EVP_md2/ and $no_md2); | ||
| 284 | next if(/EVP_md5/ and $no_md5); | ||
| 285 | next if(/EVP_rc2/ and $no_rc2); | ||
| 286 | next if(/EVP_rc4/ and $no_rc4); | ||
| 287 | next if(/EVP_rc5/ and $no_rc5); | ||
| 288 | next if(/EVP_ripemd/ and $no_ripemd); | ||
| 289 | next if(/EVP_sha/ and $no_sha); | ||
| 290 | if (/\(\*(\w*)\([^\)]+/) { | ||
| 291 | $funcs{$1} = 1; | ||
| 292 | } elsif (/\w+\W+(\w+)\W*\(\s*\)$/s) { | ||
| 293 | # K&R C | ||
| 294 | next; | ||
| 295 | } elsif (/\w+\W+\w+\W*\(.*\)$/s) { | ||
| 296 | while (not /\(\)$/s) { | ||
| 297 | s/[^\(\)]*\)$/\)/s; | ||
| 298 | s/\([^\(\)]*\)\)$/\)/s; | ||
| 299 | } | ||
| 300 | s/\(void\)//; | ||
| 301 | /(\w+)\W*\(\)/s; | ||
| 302 | $funcs{$1} = 1; | ||
| 303 | } elsif (/\(/ and not (/=/)) { | ||
| 304 | print STDERR "File $file: cannot parse: $_;\n"; | ||
| 305 | } | ||
| 167 | } | 306 | } |
| 168 | return(@ret); | ||
| 169 | } | 307 | } |
| 170 | 308 | ||
| 171 | sub do_line | 309 | # Prune the returned functions |
| 172 | { | 310 | |
| 173 | local($file,$_)=@_; | 311 | delete $funcs{"SSL_add_dir_cert_subjects_to_stack"}; |
| 174 | local($n); | 312 | delete $funcs{"des_crypt"}; |
| 175 | 313 | delete $funcs{"RSA_PKCS1_RSAref"} unless $rsaref; | |
| 176 | return(undef) if /^$/; | 314 | |
| 177 | return(undef) if /^\s/; | 315 | if($W32) { |
| 178 | #printf STDERR "two:$_\n" if $_ =~ /BIO_/; | 316 | delete $funcs{"BIO_s_file_internal"}; |
| 179 | if (/(CRYPTO_get_locking_callback)/) | 317 | delete $funcs{"BIO_new_file_internal"}; |
| 180 | { return($1); } | 318 | delete $funcs{"BIO_new_fp_internal"}; |
| 181 | elsif (/(CRYPTO_get_id_callback)/) | 319 | } else { |
| 182 | { return($1); } | 320 | if(exists $funcs{"ERR_load_CRYPTO_strings"}) { |
| 183 | elsif (/(CRYPTO_get_add_lock_callback)/) | 321 | delete $funcs{"ERR_load_CRYPTO_strings"}; |
| 184 | { return($1); } | 322 | $funcs{"ERR_load_CRYPTOlib_strings"} = 1; |
| 185 | elsif (/(SSL_CTX_get_verify_callback)/) | ||
| 186 | { return($1); } | ||
| 187 | elsif (/(SSL_get_info_callback)/) | ||
| 188 | { return($1); } | ||
| 189 | elsif ((!$NT) && /(ERR_load_CRYPTO_strings)/) | ||
| 190 | { return("ERR_load_CRYPTOlib_strings"); } | ||
| 191 | elsif (!$NT && /BIO_s_file/) | ||
| 192 | { return(undef); } | ||
| 193 | elsif (!$NT && /BIO_new_file/) | ||
| 194 | { return(undef); } | ||
| 195 | elsif (!$NT && /BIO_new_fp/) | ||
| 196 | { return(undef); } | ||
| 197 | elsif ($NT && /BIO_s_file_internal/) | ||
| 198 | { return(undef); } | ||
| 199 | elsif ($NT && /BIO_new_file_internal/) | ||
| 200 | { return(undef); } | ||
| 201 | elsif ($NT && /BIO_new_fp_internal/) | ||
| 202 | { return(undef); } | ||
| 203 | else | ||
| 204 | { | ||
| 205 | /\s\**(\S+)\s*\(/; | ||
| 206 | return($1); | ||
| 207 | } | 323 | } |
| 324 | delete $funcs{"BIO_s_file"}; | ||
| 325 | delete $funcs{"BIO_new_file"}; | ||
| 326 | delete $funcs{"BIO_new_fp"}; | ||
| 327 | } | ||
| 328 | if (!$NT) { | ||
| 329 | delete $funcs{"BIO_s_log"}; | ||
| 208 | } | 330 | } |
| 209 | 331 | ||
| 210 | sub do_extern | 332 | push @ret, keys %funcs; |
| 211 | { | ||
| 212 | local($file,$_)=@_; | ||
| 213 | local($n); | ||
| 214 | 333 | ||
| 215 | /\s\**(\S+);$/; | 334 | return(@ret); |
| 216 | return($1); | 335 | } |
| 217 | } | ||
| 218 | 336 | ||
| 219 | sub print_def_file | 337 | sub print_def_file |
| 220 | { | 338 | { |
| 221 | local(*OUT,$name,*nums,@functions)=@_; | 339 | (*OUT,my $name,*nums,@functions)=@_; |
| 222 | local($n)=1; | 340 | my $n =1; |
| 223 | 341 | ||
| 224 | if ($NT) | 342 | if ($W32) |
| 225 | { $name.="32"; } | 343 | { $name.="32"; } |
| 226 | else | 344 | else |
| 227 | { $name.="16"; } | 345 | { $name.="16"; } |
| 228 | 346 | ||
| 229 | print OUT <<"EOF"; | 347 | print OUT <<"EOF"; |
| 230 | ; | 348 | ; |
| 231 | ; Definition file for the DDL version of the $name library from SSLeay | 349 | ; Definition file for the DLL version of the $name library from OpenSSL |
| 232 | ; | 350 | ; |
| 233 | 351 | ||
| 234 | LIBRARY $name | 352 | LIBRARY $name |
| 235 | 353 | ||
| 236 | DESCRIPTION 'SSLeay $name - eay\@cryptsoft.com' | 354 | DESCRIPTION 'OpenSSL $name - http://www.openssl.org/' |
| 237 | 355 | ||
| 238 | EOF | 356 | EOF |
| 239 | 357 | ||
| 240 | if (!$NT) | 358 | if (!$W32) { |
| 241 | { | ||
| 242 | print <<"EOF"; | 359 | print <<"EOF"; |
| 243 | CODE PRELOAD MOVEABLE | 360 | CODE PRELOAD MOVEABLE |
| 244 | DATA PRELOAD MOVEABLE SINGLE | 361 | DATA PRELOAD MOVEABLE SINGLE |
| @@ -249,7 +366,7 @@ HEAPSIZE 4096 | |||
| 249 | STACKSIZE 8192 | 366 | STACKSIZE 8192 |
| 250 | 367 | ||
| 251 | EOF | 368 | EOF |
| 252 | } | 369 | } |
| 253 | 370 | ||
| 254 | print "EXPORTS\n"; | 371 | print "EXPORTS\n"; |
| 255 | 372 | ||
| @@ -258,35 +375,52 @@ EOF | |||
| 258 | (@r)=grep(!/^SSLeay/,@functions); | 375 | (@r)=grep(!/^SSLeay/,@functions); |
| 259 | @functions=((sort @e),(sort @r)); | 376 | @functions=((sort @e),(sort @r)); |
| 260 | 377 | ||
| 261 | foreach $func (@functions) | 378 | foreach $func (@functions) { |
| 262 | { | 379 | if (!defined($nums{$func})) { |
| 263 | if (!defined($nums{$func})) | 380 | printf STDERR "$func does not have a number assigned\n" |
| 264 | { | 381 | if(!$do_update); |
| 265 | printf STDERR "$func does not have a number assigned\n"; | 382 | } else { |
| 266 | } | ||
| 267 | else | ||
| 268 | { | ||
| 269 | $n=$nums{$func}; | 383 | $n=$nums{$func}; |
| 270 | printf OUT " %s%-35s@%d\n",($NT)?"":"_",$func,$n; | 384 | printf OUT " %s%-40s@%d\n",($W32)?"":"_",$func,$n; |
| 271 | } | ||
| 272 | } | 385 | } |
| 273 | printf OUT "\n"; | ||
| 274 | } | 386 | } |
| 387 | printf OUT "\n"; | ||
| 388 | } | ||
| 275 | 389 | ||
| 276 | sub load_numbers | 390 | sub load_numbers |
| 277 | { | 391 | { |
| 278 | local($name)=@_; | 392 | my($name)=@_; |
| 279 | local($j,@a,%ret); | 393 | my(@a,%ret); |
| 394 | |||
| 395 | $max_num = 0; | ||
| 280 | 396 | ||
| 281 | open(IN,"<$name") || die "unable to open $name:$!\n"; | 397 | open(IN,"<$name") || die "unable to open $name:$!\n"; |
| 282 | while (<IN>) | 398 | while (<IN>) { |
| 283 | { | ||
| 284 | chop; | 399 | chop; |
| 285 | s/#.*$//; | 400 | s/#.*$//; |
| 286 | next if /^\s*$/; | 401 | next if /^\s*$/; |
| 287 | @a=split; | 402 | @a=split; |
| 288 | $ret{$a[0]}=$a[1]; | 403 | $ret{$a[0]}=$a[1]; |
| 289 | } | 404 | $max_num = $a[1] if $a[1] > $max_num; |
| 405 | } | ||
| 290 | close(IN); | 406 | close(IN); |
| 291 | return(%ret); | 407 | return(%ret); |
| 408 | } | ||
| 409 | |||
| 410 | sub update_numbers | ||
| 411 | { | ||
| 412 | (*OUT,$name,*nums,my $start_num, my @functions)=@_; | ||
| 413 | my $new_funcs = 0; | ||
| 414 | print STDERR "Updating $name\n"; | ||
| 415 | foreach $func (@functions) { | ||
| 416 | if (!exists $nums{$func}) { | ||
| 417 | $new_funcs++; | ||
| 418 | printf OUT "%s%-40s%d\n","",$func, ++$start_num; | ||
| 419 | } | ||
| 420 | } | ||
| 421 | if($new_funcs) { | ||
| 422 | print STDERR "$new_funcs New Functions added\n"; | ||
| 423 | } else { | ||
| 424 | print STDERR "No New Functions Added\n"; | ||
| 292 | } | 425 | } |
| 426 | } | ||
diff --git a/src/lib/libcrypto/util/mkdir-p.pl b/src/lib/libcrypto/util/mkdir-p.pl new file mode 100644 index 0000000000..6c69c2daa4 --- /dev/null +++ b/src/lib/libcrypto/util/mkdir-p.pl | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | # mkdir-p.pl | ||
| 4 | |||
| 5 | # On some systems, the -p option to mkdir (= also create any missing parent | ||
| 6 | # directories) is not available. | ||
| 7 | |||
| 8 | my $arg; | ||
| 9 | |||
| 10 | foreach $arg (@ARGV) { | ||
| 11 | &do_mkdir_p($arg); | ||
| 12 | } | ||
| 13 | |||
| 14 | |||
| 15 | sub do_mkdir_p { | ||
| 16 | local($dir) = @_; | ||
| 17 | |||
| 18 | $dir =~ s|/*\Z(?!\n)||s; | ||
| 19 | |||
| 20 | if (-d $dir) { | ||
| 21 | return; | ||
| 22 | } | ||
| 23 | |||
| 24 | if ($dir =~ m|[^/]/|s) { | ||
| 25 | local($parent) = $dir; | ||
| 26 | $parent =~ s|[^/]*\Z(?!\n)||s; | ||
| 27 | |||
| 28 | do_mkdir_p($parent); | ||
| 29 | } | ||
| 30 | |||
| 31 | mkdir($dir, 0777) || die "Cannot create directory $dir: $!\n"; | ||
| 32 | print "created directory `$dir'\n"; | ||
| 33 | } | ||
diff --git a/src/lib/libcrypto/util/mkerr.pl b/src/lib/libcrypto/util/mkerr.pl new file mode 100644 index 0000000000..4b3bccb13e --- /dev/null +++ b/src/lib/libcrypto/util/mkerr.pl | |||
| @@ -0,0 +1,503 @@ | |||
| 1 | #!/usr/local/bin/perl -w | ||
| 2 | |||
| 3 | my $config = "crypto/err/openssl.ec"; | ||
| 4 | my $debug = 0; | ||
| 5 | my $rebuild = 0; | ||
| 6 | my $static = 1; | ||
| 7 | my $recurse = 0; | ||
| 8 | my $reindex = 0; | ||
| 9 | my $dowrite = 0; | ||
| 10 | |||
| 11 | |||
| 12 | while (@ARGV) { | ||
| 13 | my $arg = $ARGV[0]; | ||
| 14 | if($arg eq "-conf") { | ||
| 15 | shift @ARGV; | ||
| 16 | $config = shift @ARGV; | ||
| 17 | } elsif($arg eq "-debug") { | ||
| 18 | $debug = 1; | ||
| 19 | shift @ARGV; | ||
| 20 | } elsif($arg eq "-rebuild") { | ||
| 21 | $rebuild = 1; | ||
| 22 | shift @ARGV; | ||
| 23 | } elsif($arg eq "-recurse") { | ||
| 24 | $recurse = 1; | ||
| 25 | shift @ARGV; | ||
| 26 | } elsif($arg eq "-reindex") { | ||
| 27 | $reindex = 1; | ||
| 28 | shift @ARGV; | ||
| 29 | } elsif($arg eq "-nostatic") { | ||
| 30 | $static = 0; | ||
| 31 | shift @ARGV; | ||
| 32 | } elsif($arg eq "-write") { | ||
| 33 | $dowrite = 1; | ||
| 34 | shift @ARGV; | ||
| 35 | } else { | ||
| 36 | last; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | if($recurse) { | ||
| 41 | @source = (<crypto/*.c>, <crypto/*/*.c>, ,<rsaref/*.c>, <ssl/*.c>); | ||
| 42 | } else { | ||
| 43 | @source = @ARGV; | ||
| 44 | } | ||
| 45 | |||
| 46 | # Read in the config file | ||
| 47 | |||
| 48 | open(IN, "<$config") || die "Can't open config file $config"; | ||
| 49 | |||
| 50 | # Parse config file | ||
| 51 | |||
| 52 | while(<IN>) | ||
| 53 | { | ||
| 54 | if(/^L\s+(\S+)\s+(\S+)\s+(\S+)/) { | ||
| 55 | $hinc{$1} = $2; | ||
| 56 | $cskip{$3} = $1; | ||
| 57 | if($3 ne "NONE") { | ||
| 58 | $csrc{$1} = $3; | ||
| 59 | $fmax{$1} = 99; | ||
| 60 | $rmax{$1} = 99; | ||
| 61 | $fnew{$1} = 0; | ||
| 62 | $rnew{$1} = 0; | ||
| 63 | } | ||
| 64 | } elsif (/^F\s+(\S+)/) { | ||
| 65 | # Add extra function with $1 | ||
| 66 | } elsif (/^R\s+(\S+)\s+(\S+)/) { | ||
| 67 | $rextra{$1} = $2; | ||
| 68 | $rcodes{$1} = $2; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | close IN; | ||
| 73 | |||
| 74 | # Scan each header file in turn and make a list of error codes | ||
| 75 | # and function names | ||
| 76 | |||
| 77 | while (($lib, $hdr) = each %hinc) | ||
| 78 | { | ||
| 79 | next if($hdr eq "NONE"); | ||
| 80 | print STDERR "Scanning header file $hdr\n" if $debug; | ||
| 81 | open(IN, "<$hdr") || die "Can't open Header file $hdr\n"; | ||
| 82 | my $line = "", $def= ""; | ||
| 83 | while(<IN>) { | ||
| 84 | last if(/BEGIN\s+ERROR\s+CODES/); | ||
| 85 | if ($line ne '') { | ||
| 86 | $_ = $line . $_; | ||
| 87 | $line = ''; | ||
| 88 | } | ||
| 89 | |||
| 90 | if (/\\$/) { | ||
| 91 | $line = $_; | ||
| 92 | next; | ||
| 93 | } | ||
| 94 | |||
| 95 | $cpp = 1 if /^#.*ifdef.*cplusplus/; # skip "C" declaration | ||
| 96 | if ($cpp) { | ||
| 97 | $cpp = 0 if /^#.*endif/; | ||
| 98 | next; | ||
| 99 | } | ||
| 100 | |||
| 101 | next if (/^#/); # skip preprocessor directives | ||
| 102 | |||
| 103 | s/\/\*.*?\*\///gs; # ignore comments | ||
| 104 | s/{[^{}]*}//gs; # ignore {} blocks | ||
| 105 | |||
| 106 | if (/{|\/\*/) { # Add a } so editor works... | ||
| 107 | $line = $_; | ||
| 108 | } else { | ||
| 109 | $def .= $_; | ||
| 110 | } | ||
| 111 | } | ||
| 112 | |||
| 113 | foreach (split /;/, $def) { | ||
| 114 | s/^[\n\s]*//g; | ||
| 115 | s/[\n\s]*$//g; | ||
| 116 | next if(/typedef\W/); | ||
| 117 | if (/\(\*(\w*)\([^\)]+/) { | ||
| 118 | my $name = $1; | ||
| 119 | $name =~ tr/[a-z]/[A-Z]/; | ||
| 120 | $ftrans{$name} = $1; | ||
| 121 | } elsif (/\w+\W+(\w+)\W*\(\s*\)$/s){ | ||
| 122 | # K&R C | ||
| 123 | next ; | ||
| 124 | } elsif (/\w+\W+\w+\W*\(.*\)$/s) { | ||
| 125 | while (not /\(\)$/s) { | ||
| 126 | s/[^\(\)]*\)$/\)/s; | ||
| 127 | s/\([^\(\)]*\)\)$/\)/s; | ||
| 128 | } | ||
| 129 | s/\(void\)//; | ||
| 130 | /(\w+)\W*\(\)/s; | ||
| 131 | my $name = $1; | ||
| 132 | $name =~ tr/[a-z]/[A-Z]/; | ||
| 133 | $ftrans{$name} = $1; | ||
| 134 | } elsif (/\(/ and not (/=/ or /DECLARE_STACK/)) { | ||
| 135 | print STDERR "Header $hdr: cannot parse: $_;\n"; | ||
| 136 | } | ||
| 137 | } | ||
| 138 | |||
| 139 | next if $reindex; | ||
| 140 | |||
| 141 | # Scan function and reason codes and store them: keep a note of the | ||
| 142 | # maximum code used. | ||
| 143 | |||
| 144 | while(<IN>) { | ||
| 145 | if(/^#define\s+(\S+)\s+(\S+)/) { | ||
| 146 | $name = $1; | ||
| 147 | $code = $2; | ||
| 148 | unless($name =~ /^${lib}_([RF])_(\w+)$/) { | ||
| 149 | print STDERR "Invalid error code $name\n"; | ||
| 150 | next; | ||
| 151 | } | ||
| 152 | if($1 eq "R") { | ||
| 153 | $rcodes{$name} = $code; | ||
| 154 | if(!(exists $rextra{$name}) && | ||
| 155 | ($code > $rmax{$lib}) ) { | ||
| 156 | $rmax{$lib} = $code; | ||
| 157 | } | ||
| 158 | } else { | ||
| 159 | if($code > $fmax{$lib}) { | ||
| 160 | $fmax{$lib} = $code; | ||
| 161 | } | ||
| 162 | $fcodes{$name} = $code; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | } | ||
| 166 | close IN; | ||
| 167 | } | ||
| 168 | |||
| 169 | # Scan each C source file and look for function and reason codes | ||
| 170 | # This is done by looking for strings that "look like" function or | ||
| 171 | # reason codes: basically anything consisting of all upper case and | ||
| 172 | # numerics which has _F_ or _R_ in it and which has the name of an | ||
| 173 | # error library at the start. This seems to work fine except for the | ||
| 174 | # oddly named structure BIO_F_CTX which needs to be ignored. | ||
| 175 | # If a code doesn't exist in list compiled from headers then mark it | ||
| 176 | # with the value "X" as a place holder to give it a value later. | ||
| 177 | # Store all function and reason codes found in %ufcodes and %urcodes | ||
| 178 | # so all those unreferenced can be printed out. | ||
| 179 | |||
| 180 | |||
| 181 | foreach $file (@source) { | ||
| 182 | # Don't parse the error source file. | ||
| 183 | next if exists $cskip{$file}; | ||
| 184 | open(IN, "<$file") || die "Can't open source file $file\n"; | ||
| 185 | while(<IN>) { | ||
| 186 | if(/(([A-Z0-9]+)_F_([A-Z0-9_]+))/) { | ||
| 187 | next unless exists $csrc{$2}; | ||
| 188 | next if($1 eq "BIO_F_BUFFER_CTX"); | ||
| 189 | $ufcodes{$1} = 1; | ||
| 190 | if(!exists $fcodes{$1}) { | ||
| 191 | $fcodes{$1} = "X"; | ||
| 192 | $fnew{$2}++; | ||
| 193 | } | ||
| 194 | $notrans{$1} = 1 unless exists $ftrans{$3}; | ||
| 195 | } | ||
| 196 | if(/(([A-Z0-9]+)_R_[A-Z0-9_]+)/) { | ||
| 197 | next unless exists $csrc{$2}; | ||
| 198 | $urcodes{$1} = 1; | ||
| 199 | if(!exists $rcodes{$1}) { | ||
| 200 | $rcodes{$1} = "X"; | ||
| 201 | $rnew{$2}++; | ||
| 202 | } | ||
| 203 | } | ||
| 204 | } | ||
| 205 | close IN; | ||
| 206 | } | ||
| 207 | |||
| 208 | # Now process each library in turn. | ||
| 209 | |||
| 210 | foreach $lib (keys %csrc) | ||
| 211 | { | ||
| 212 | my $hfile = $hinc{$lib}; | ||
| 213 | my $cfile = $csrc{$lib}; | ||
| 214 | if(!$fnew{$lib} && !$rnew{$lib}) { | ||
| 215 | print STDERR "$lib:\t\tNo new error codes\n"; | ||
| 216 | next unless $rebuild; | ||
| 217 | } else { | ||
| 218 | print STDERR "$lib:\t\t$fnew{$lib} New Functions,"; | ||
| 219 | print STDERR " $rnew{$lib} New Reasons.\n"; | ||
| 220 | next unless $dowrite; | ||
| 221 | } | ||
| 222 | |||
| 223 | # If we get here then we have some new error codes so we | ||
| 224 | # need to rebuild the header file and C file. | ||
| 225 | |||
| 226 | # Make a sorted list of error and reason codes for later use. | ||
| 227 | |||
| 228 | my @function = sort grep(/^${lib}_/,keys %fcodes); | ||
| 229 | my @reasons = sort grep(/^${lib}_/,keys %rcodes); | ||
| 230 | |||
| 231 | # Rewrite the header file | ||
| 232 | |||
| 233 | open(IN, "<$hfile") || die "Can't Open Header File $hfile\n"; | ||
| 234 | |||
| 235 | # Copy across the old file | ||
| 236 | while(<IN>) { | ||
| 237 | push @out, $_; | ||
| 238 | last if (/BEGIN ERROR CODES/); | ||
| 239 | } | ||
| 240 | close IN; | ||
| 241 | |||
| 242 | open (OUT, ">$hfile") || die "Can't Open File $hfile for writing\n"; | ||
| 243 | |||
| 244 | print OUT @out; | ||
| 245 | undef @out; | ||
| 246 | print OUT <<"EOF"; | ||
| 247 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
| 248 | * made after this point may be overwritten when the script is next run. | ||
| 249 | */ | ||
| 250 | |||
| 251 | /* Error codes for the $lib functions. */ | ||
| 252 | |||
| 253 | /* Function codes. */ | ||
| 254 | EOF | ||
| 255 | |||
| 256 | foreach $i (@function) { | ||
| 257 | $z=6-int(length($i)/8); | ||
| 258 | if($fcodes{$i} eq "X") { | ||
| 259 | $fcodes{$i} = ++$fmax{$lib}; | ||
| 260 | print STDERR "New Function code $i\n" if $debug; | ||
| 261 | } | ||
| 262 | printf OUT "#define $i%s $fcodes{$i}\n","\t" x $z; | ||
| 263 | } | ||
| 264 | |||
| 265 | print OUT "\n/* Reason codes. */\n"; | ||
| 266 | |||
| 267 | foreach $i (@reasons) { | ||
| 268 | $z=6-int(length($i)/8); | ||
| 269 | if($rcodes{$i} eq "X") { | ||
| 270 | $rcodes{$i} = ++$rmax{$lib}; | ||
| 271 | print STDERR "New Reason code $i\n" if $debug; | ||
| 272 | } | ||
| 273 | printf OUT "#define $i%s $rcodes{$i}\n","\t" x $z; | ||
| 274 | } | ||
| 275 | print OUT <<"EOF"; | ||
| 276 | |||
| 277 | #ifdef __cplusplus | ||
| 278 | } | ||
| 279 | #endif | ||
| 280 | #endif | ||
| 281 | |||
| 282 | EOF | ||
| 283 | close OUT; | ||
| 284 | |||
| 285 | # Rewrite the C source file containing the error details. | ||
| 286 | |||
| 287 | my $hincf; | ||
| 288 | if($static) { | ||
| 289 | $hfile =~ /([^\/]+)$/; | ||
| 290 | $hincf = "<openssl/$1>"; | ||
| 291 | } else { | ||
| 292 | $hincf = "\"$hfile\""; | ||
| 293 | } | ||
| 294 | |||
| 295 | |||
| 296 | open (OUT,">$cfile") || die "Can't open $cfile for writing"; | ||
| 297 | |||
| 298 | print OUT <<"EOF"; | ||
| 299 | /* $cfile */ | ||
| 300 | /* ==================================================================== | ||
| 301 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 302 | * | ||
| 303 | * Redistribution and use in source and binary forms, with or without | ||
| 304 | * modification, are permitted provided that the following conditions | ||
| 305 | * are met: | ||
| 306 | * | ||
| 307 | * 1. Redistributions of source code must retain the above copyright | ||
| 308 | * notice, this list of conditions and the following disclaimer. | ||
| 309 | * | ||
| 310 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 311 | * notice, this list of conditions and the following disclaimer in | ||
| 312 | * the documentation and/or other materials provided with the | ||
| 313 | * distribution. | ||
| 314 | * | ||
| 315 | * 3. All advertising materials mentioning features or use of this | ||
| 316 | * software must display the following acknowledgment: | ||
| 317 | * "This product includes software developed by the OpenSSL Project | ||
| 318 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 319 | * | ||
| 320 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 321 | * endorse or promote products derived from this software without | ||
| 322 | * prior written permission. For written permission, please contact | ||
| 323 | * openssl-core\@OpenSSL.org. | ||
| 324 | * | ||
| 325 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 326 | * nor may "OpenSSL" appear in their names without prior written | ||
| 327 | * permission of the OpenSSL Project. | ||
| 328 | * | ||
| 329 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 330 | * acknowledgment: | ||
| 331 | * "This product includes software developed by the OpenSSL Project | ||
| 332 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 333 | * | ||
| 334 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 335 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 336 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 337 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 338 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 339 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 340 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 341 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 342 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 343 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 344 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 345 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 346 | * ==================================================================== | ||
| 347 | * | ||
| 348 | * This product includes cryptographic software written by Eric Young | ||
| 349 | * (eay\@cryptsoft.com). This product includes software written by Tim | ||
| 350 | * Hudson (tjh\@cryptsoft.com). | ||
| 351 | * | ||
| 352 | */ | ||
| 353 | |||
| 354 | /* 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. | ||
| 356 | */ | ||
| 357 | |||
| 358 | #include <stdio.h> | ||
| 359 | #include <openssl/err.h> | ||
| 360 | #include $hincf | ||
| 361 | |||
| 362 | /* BEGIN ERROR CODES */ | ||
| 363 | #ifndef NO_ERR | ||
| 364 | static ERR_STRING_DATA ${lib}_str_functs[]= | ||
| 365 | { | ||
| 366 | EOF | ||
| 367 | # Add each function code: if a function name is found then use it. | ||
| 368 | foreach $i (@function) { | ||
| 369 | my $fn; | ||
| 370 | $i =~ /^${lib}_F_(\S+)$/; | ||
| 371 | $fn = $1; | ||
| 372 | if(exists $ftrans{$fn}) { | ||
| 373 | $fn = $ftrans{$fn}; | ||
| 374 | } | ||
| 375 | print OUT "{ERR_PACK(0,$i,0),\t\"$fn\"},\n"; | ||
| 376 | } | ||
| 377 | print OUT <<"EOF"; | ||
| 378 | {0,NULL} | ||
| 379 | }; | ||
| 380 | |||
| 381 | static ERR_STRING_DATA ${lib}_str_reasons[]= | ||
| 382 | { | ||
| 383 | EOF | ||
| 384 | # Add each reason code. | ||
| 385 | foreach $i (@reasons) { | ||
| 386 | my $rn; | ||
| 387 | my $nspc = 0; | ||
| 388 | $i =~ /^${lib}_R_(\S+)$/; | ||
| 389 | $rn = $1; | ||
| 390 | $rn =~ tr/_[A-Z]/ [a-z]/; | ||
| 391 | $nspc = 40 - length($i) unless length($i) > 40; | ||
| 392 | $nspc = " " x $nspc; | ||
| 393 | print OUT "{${i}${nspc},\"$rn\"},\n"; | ||
| 394 | } | ||
| 395 | if($static) { | ||
| 396 | print OUT <<"EOF"; | ||
| 397 | {0,NULL} | ||
| 398 | }; | ||
| 399 | |||
| 400 | #endif | ||
| 401 | |||
| 402 | void ERR_load_${lib}_strings(void) | ||
| 403 | { | ||
| 404 | static int init=1; | ||
| 405 | |||
| 406 | if (init) | ||
| 407 | { | ||
| 408 | init=0; | ||
| 409 | #ifndef NO_ERR | ||
| 410 | ERR_load_strings(ERR_LIB_${lib},${lib}_str_functs); | ||
| 411 | ERR_load_strings(ERR_LIB_${lib},${lib}_str_reasons); | ||
| 412 | #endif | ||
| 413 | |||
| 414 | } | ||
| 415 | } | ||
| 416 | EOF | ||
| 417 | } else { | ||
| 418 | print OUT <<"EOF"; | ||
| 419 | {0,NULL} | ||
| 420 | }; | ||
| 421 | |||
| 422 | #endif | ||
| 423 | |||
| 424 | #ifdef ${lib}_LIB_NAME | ||
| 425 | static ERR_STRING_DATA ${lib}_lib_name[]= | ||
| 426 | { | ||
| 427 | {0 ,${lib}_LIB_NAME}, | ||
| 428 | {0,NULL} | ||
| 429 | }; | ||
| 430 | #endif | ||
| 431 | |||
| 432 | |||
| 433 | int ${lib}_lib_error_code=0; | ||
| 434 | |||
| 435 | void ERR_load_${lib}_strings(void) | ||
| 436 | { | ||
| 437 | static int init=1; | ||
| 438 | |||
| 439 | if (${lib}_lib_error_code == 0) | ||
| 440 | ${lib}_lib_error_code=ERR_get_next_error_library(); | ||
| 441 | |||
| 442 | if (init) | ||
| 443 | { | ||
| 444 | init=0; | ||
| 445 | #ifndef NO_ERR | ||
| 446 | ERR_load_strings(${lib}_lib_error_code,${lib}_str_functs); | ||
| 447 | ERR_load_strings(${lib}_lib_error_code,${lib}_str_reasons); | ||
| 448 | #endif | ||
| 449 | |||
| 450 | #ifdef ${lib}_LIB_NAME | ||
| 451 | ${lib}_lib_name->error = ERR_PACK(${lib}_lib_error_code,0,0); | ||
| 452 | ERR_load_strings(0,${lib}_lib_name); | ||
| 453 | #endif; | ||
| 454 | } | ||
| 455 | } | ||
| 456 | |||
| 457 | void ERR_${lib}_error(int function, int reason, char *file, int line) | ||
| 458 | { | ||
| 459 | if (${lib}_lib_error_code == 0) | ||
| 460 | ${lib}_lib_error_code=ERR_get_next_error_library(); | ||
| 461 | ERR_PUT_error(${lib}_lib_error_code,function,reason,file,line); | ||
| 462 | } | ||
| 463 | EOF | ||
| 464 | |||
| 465 | } | ||
| 466 | |||
| 467 | close OUT; | ||
| 468 | |||
| 469 | } | ||
| 470 | |||
| 471 | if($debug && defined(%notrans)) { | ||
| 472 | print STDERR "The following function codes were not translated:\n"; | ||
| 473 | foreach(sort keys %notrans) | ||
| 474 | { | ||
| 475 | print STDERR "$_\n"; | ||
| 476 | } | ||
| 477 | } | ||
| 478 | |||
| 479 | # Make a list of unreferenced function and reason codes | ||
| 480 | |||
| 481 | foreach (keys %fcodes) { | ||
| 482 | push (@funref, $_) unless exists $ufcodes{$_}; | ||
| 483 | } | ||
| 484 | |||
| 485 | foreach (keys %rcodes) { | ||
| 486 | push (@runref, $_) unless exists $urcodes{$_}; | ||
| 487 | } | ||
| 488 | |||
| 489 | if($debug && defined(@funref) ) { | ||
| 490 | print STDERR "The following function codes were not referenced:\n"; | ||
| 491 | foreach(sort @funref) | ||
| 492 | { | ||
| 493 | print STDERR "$_\n"; | ||
| 494 | } | ||
| 495 | } | ||
| 496 | |||
| 497 | if($debug && defined(@runref) ) { | ||
| 498 | print STDERR "The following reason codes were not referenced:\n"; | ||
| 499 | foreach(sort @runref) | ||
| 500 | { | ||
| 501 | print STDERR "$_\n"; | ||
| 502 | } | ||
| 503 | } | ||
diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl new file mode 100644 index 0000000000..6fa424bd19 --- /dev/null +++ b/src/lib/libcrypto/util/mkfiles.pl | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # This is a hacked version of files.pl for systems that can't do a 'make files'. | ||
| 4 | # Do a perl util/mkminfo.pl >MINFO to build MINFO | ||
| 5 | # Written by Steve Henson 1999. | ||
| 6 | |||
| 7 | # List of directories to process | ||
| 8 | |||
| 9 | my @dirs = ( | ||
| 10 | ".", | ||
| 11 | "crypto", | ||
| 12 | "crypto/md2", | ||
| 13 | "crypto/md5", | ||
| 14 | "crypto/sha", | ||
| 15 | "crypto/mdc2", | ||
| 16 | "crypto/hmac", | ||
| 17 | "crypto/ripemd", | ||
| 18 | "crypto/des", | ||
| 19 | "crypto/rc2", | ||
| 20 | "crypto/rc4", | ||
| 21 | "crypto/rc5", | ||
| 22 | "crypto/idea", | ||
| 23 | "crypto/bf", | ||
| 24 | "crypto/cast", | ||
| 25 | "crypto/bn", | ||
| 26 | "crypto/rsa", | ||
| 27 | "crypto/dsa", | ||
| 28 | "crypto/dh", | ||
| 29 | "crypto/buffer", | ||
| 30 | "crypto/bio", | ||
| 31 | "crypto/stack", | ||
| 32 | "crypto/lhash", | ||
| 33 | "crypto/rand", | ||
| 34 | "crypto/err", | ||
| 35 | "crypto/objects", | ||
| 36 | "crypto/evp", | ||
| 37 | "crypto/asn1", | ||
| 38 | "crypto/pem", | ||
| 39 | "crypto/x509", | ||
| 40 | "crypto/x509v3", | ||
| 41 | "crypto/conf", | ||
| 42 | "crypto/txt_db", | ||
| 43 | "crypto/pkcs7", | ||
| 44 | "crypto/pkcs12", | ||
| 45 | "crypto/comp", | ||
| 46 | "ssl", | ||
| 47 | "rsaref", | ||
| 48 | "apps", | ||
| 49 | "test", | ||
| 50 | "tools" | ||
| 51 | ); | ||
| 52 | |||
| 53 | foreach (@dirs) { | ||
| 54 | &files_dir ($_, "Makefile.ssl"); | ||
| 55 | } | ||
| 56 | |||
| 57 | exit(0); | ||
| 58 | |||
| 59 | sub files_dir | ||
| 60 | { | ||
| 61 | my ($dir, $makefile) = @_; | ||
| 62 | |||
| 63 | my %sym; | ||
| 64 | |||
| 65 | open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile"; | ||
| 66 | |||
| 67 | my $s=""; | ||
| 68 | |||
| 69 | while (<IN>) | ||
| 70 | { | ||
| 71 | chop; | ||
| 72 | s/#.*//; | ||
| 73 | if (/^(\S+)\s*=\s*(.*)$/) | ||
| 74 | { | ||
| 75 | $o=""; | ||
| 76 | ($s,$b)=($1,$2); | ||
| 77 | for (;;) | ||
| 78 | { | ||
| 79 | if ($b =~ /\\$/) | ||
| 80 | { | ||
| 81 | chop($b); | ||
| 82 | $o.=$b." "; | ||
| 83 | $b=<IN>; | ||
| 84 | chop($b); | ||
| 85 | } | ||
| 86 | else | ||
| 87 | { | ||
| 88 | $o.=$b." "; | ||
| 89 | last; | ||
| 90 | } | ||
| 91 | } | ||
| 92 | $o =~ s/^\s+//; | ||
| 93 | $o =~ s/\s+$//; | ||
| 94 | $o =~ s/\s+/ /g; | ||
| 95 | |||
| 96 | $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g; | ||
| 97 | $sym{$s}=$o; | ||
| 98 | } | ||
| 99 | } | ||
| 100 | |||
| 101 | print "RELATIVE_DIRECTORY=$dir\n"; | ||
| 102 | |||
| 103 | foreach (sort keys %sym) | ||
| 104 | { | ||
| 105 | print "$_=$sym{$_}\n"; | ||
| 106 | } | ||
| 107 | print "RELATIVE_DIRECTORY=\n"; | ||
| 108 | |||
| 109 | close (IN); | ||
| 110 | } | ||
diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl new file mode 100644 index 0000000000..de555820ec --- /dev/null +++ b/src/lib/libcrypto/util/mklink.pl | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | # mklink.pl | ||
| 4 | |||
| 5 | # The first command line argument is a non-empty relative path | ||
| 6 | # specifying the "from" directory. | ||
| 7 | # Each other argument is a file name not containing / and | ||
| 8 | # names a file in the current directory. | ||
| 9 | # | ||
| 10 | # For each of these files, we create in the "from" directory a link | ||
| 11 | # of the same name pointing to the local file. | ||
| 12 | # | ||
| 13 | # We assume that the directory structure is a tree, i.e. that it does | ||
| 14 | # not contain symbolic links and that the parent of / is never referenced. | ||
| 15 | # Apart from this, this script should be able to handle even the most | ||
| 16 | # pathological cases. | ||
| 17 | |||
| 18 | my $from = shift; | ||
| 19 | my @files = @ARGV; | ||
| 20 | |||
| 21 | my @from_path = split(/\//, $from); | ||
| 22 | my $pwd = `pwd`; | ||
| 23 | chop($pwd); | ||
| 24 | my @pwd_path = split(/\//, $pwd); | ||
| 25 | |||
| 26 | my @to_path = (); | ||
| 27 | |||
| 28 | my $dirname; | ||
| 29 | foreach $dirname (@from_path) { | ||
| 30 | |||
| 31 | # In this loop, @to_path always is a relative path from | ||
| 32 | # @pwd_path (interpreted is an absolute path) to the original pwd. | ||
| 33 | |||
| 34 | # At the end, @from_path (as a relative path from the original pwd) | ||
| 35 | # designates the same directory as the absolute path @pwd_path, | ||
| 36 | # which means that @to_path then is a path from there to the original pwd. | ||
| 37 | |||
| 38 | next if ($dirname eq "" || $dirname eq "."); | ||
| 39 | |||
| 40 | if ($dirname eq "..") { | ||
| 41 | @to_path = (pop(@pwd_path), @to_path); | ||
| 42 | } else { | ||
| 43 | @to_path = ("..", @to_path); | ||
| 44 | push(@pwd_path, $dirname); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | |||
| 48 | my $to = join('/', @to_path); | ||
| 49 | |||
| 50 | my $file; | ||
| 51 | foreach $file (@files) { | ||
| 52 | # print "ln -s $to/$file $from/$file\n"; | ||
| 53 | symlink("$to/$file", "$from/$file"); | ||
| 54 | print $file . " => $from/$file\n"; | ||
| 55 | } | ||
diff --git a/src/lib/libcrypto/util/mklink.sh b/src/lib/libcrypto/util/mklink.sh deleted file mode 100644 index 1e052ed6ee..0000000000 --- a/src/lib/libcrypto/util/mklink.sh +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # A bit of an ugly shell script used to actually 'link' files. | ||
| 4 | # Used by 'make links' | ||
| 5 | # | ||
| 6 | |||
| 7 | PATH=$PATH:.:util:../util:../../util | ||
| 8 | export PATH | ||
| 9 | |||
| 10 | from=$1 | ||
| 11 | shift | ||
| 12 | |||
| 13 | here=`pwd` | ||
| 14 | tmp=`dirname $from` | ||
| 15 | while [ "$tmp"x != "x" -a "$tmp"x != ".x" ] | ||
| 16 | do | ||
| 17 | t=`basename $here` | ||
| 18 | here=`dirname $here` | ||
| 19 | to="/$t$to" | ||
| 20 | tmp=`dirname $tmp` | ||
| 21 | done | ||
| 22 | to=..$to | ||
| 23 | |||
| 24 | #echo from=$from | ||
| 25 | #echo to =$to | ||
| 26 | #exit 1 | ||
| 27 | |||
| 28 | if [ "$*"x != "x" ]; then | ||
| 29 | for i in $* | ||
| 30 | do | ||
| 31 | /bin/rm -f $from/$i | ||
| 32 | point.sh $to/$i $from/$i | ||
| 33 | done | ||
| 34 | fi | ||
| 35 | exit 0; | ||
diff --git a/src/lib/libcrypto/util/perlpath.pl b/src/lib/libcrypto/util/perlpath.pl index 9e57e10ad4..a1f236bd98 100644 --- a/src/lib/libcrypto/util/perlpath.pl +++ b/src/lib/libcrypto/util/perlpath.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # modify the '#!/usr/local/bin/perl' | 3 | # modify the '#!/usr/local/bin/perl' |
| 4 | # line in all scripts that rely on perl. | 4 | # line in all scripts that rely on perl. |
| @@ -17,7 +17,12 @@ sub wanted | |||
| 17 | @a=<IN>; | 17 | @a=<IN>; |
| 18 | close(IN); | 18 | close(IN); |
| 19 | 19 | ||
| 20 | $a[0]="#!$ARGV[0]/perl\n"; | 20 | if (-d $ARGV[0]) { |
| 21 | $a[0]="#!$ARGV[0]/perl\n"; | ||
| 22 | } | ||
| 23 | else { | ||
| 24 | $a[0]="#!$ARGV[0]\n"; | ||
| 25 | } | ||
| 21 | 26 | ||
| 22 | # Playing it safe... | 27 | # Playing it safe... |
| 23 | $new="$_.new"; | 28 | $new="$_.new"; |
diff --git a/src/lib/libcrypto/util/pl/BC-16.pl b/src/lib/libcrypto/util/pl/BC-16.pl index 7c3fdb68f4..6c6df4fe0b 100644 --- a/src/lib/libcrypto/util/pl/BC-16.pl +++ b/src/lib/libcrypto/util/pl/BC-16.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries | 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries |
| 3 | # | 3 | # |
| 4 | 4 | ||
| @@ -66,18 +66,18 @@ $asm='bcc -c -B -Tml'; | |||
| 66 | $afile='/o'; | 66 | $afile='/o'; |
| 67 | if ($no_asm) | 67 | if ($no_asm) |
| 68 | { | 68 | { |
| 69 | $bn_mulw_obj=''; | 69 | $bn_asm_obj=''; |
| 70 | $bn_mulw_src=''; | 70 | $bn_asm_src=''; |
| 71 | } | 71 | } |
| 72 | elsif ($asmbits == 32) | 72 | elsif ($asmbits == 32) |
| 73 | { | 73 | { |
| 74 | $bn_mulw_obj='crypto\bn\asm\x86w32.obj'; | 74 | $bn_asm_obj='crypto\bn\asm\x86w32.obj'; |
| 75 | $bn_mulw_src='crypto\bn\asm\x86w32.asm'; | 75 | $bn_asm_src='crypto\bn\asm\x86w32.asm'; |
| 76 | } | 76 | } |
| 77 | else | 77 | else |
| 78 | { | 78 | { |
| 79 | $bn_mulw_obj='crypto\bn\asm\x86w16.obj'; | 79 | $bn_asm_obj='crypto\bn\asm\x86w16.obj'; |
| 80 | $bn_mulw_src='crypto\bn\asm\x86w16.asm'; | 80 | $bn_asm_src='crypto\bn\asm\x86w16.asm'; |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | sub do_lib_rule | 83 | sub do_lib_rule |
diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl index 3898d16f61..09c45a21a6 100644 --- a/src/lib/libcrypto/util/pl/BC-32.pl +++ b/src/lib/libcrypto/util/pl/BC-32.pl | |||
| @@ -1,102 +1,121 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries | 2 | # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si> |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | $ssl= "ssleay32"; | ||
| 6 | $crypto="libeay32"; | ||
| 7 | $RSAref="RSAref32"; | ||
| 8 | |||
| 5 | $o='\\'; | 9 | $o='\\'; |
| 6 | $cp='copy'; | 10 | $cp='copy'; |
| 7 | $rm='del'; | 11 | $rm='del'; |
| 8 | 12 | ||
| 9 | # C compiler stuff | 13 | # C compiler stuff |
| 10 | $cc='bcc32'; | 14 | $cc='bcc32'; |
| 11 | 15 | $lflags="-ap -Tpe -x -Gn "; | |
| 16 | $mlflags=''; | ||
| 17 | |||
| 18 | $out_def="out32"; | ||
| 19 | $tmp_def="tmp32"; | ||
| 20 | $inc_def="inc32"; | ||
| 21 | #enable max error messages, disable most common warnings | ||
| 22 | $cflags="-DWIN32_LEAN_AND_MEAN -j255 -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN "; | ||
| 12 | if ($debug) | 23 | if ($debug) |
| 13 | { $op="-v "; } | 24 | { |
| 14 | else { $op="-O "; } | 25 | $cflags.="-Od -y -v -vi- -D_DEBUG"; |
| 15 | 26 | $mlflags.=' '; | |
| 16 | $cflags="-d $op -DL_ENDIAN "; | 27 | } |
| 17 | # I add the stack opt | ||
| 18 | $base_lflags="-c"; | ||
| 19 | $lflags="$base_lflags"; | ||
| 20 | |||
| 21 | $cflags.=" -DWINDOWS -DWIN32"; | ||
| 22 | $app_cflag="-WC"; | ||
| 23 | $lib_cflag="-WC"; | ||
| 24 | $lflags.=" -Tpe"; | ||
| 25 | |||
| 26 | if ($shlib) | ||
| 27 | { | ||
| 28 | $mlflags="$base_lflags -Tpe"; # stack if defined in .def file | ||
| 29 | $libs="libw ldllcew"; | ||
| 30 | } | ||
| 31 | else | 28 | else |
| 32 | { $mlflags=''; } | 29 | { |
| 30 | $cflags.="-O2 -ff -fp"; | ||
| 31 | } | ||
| 33 | 32 | ||
| 34 | $obj='.obj'; | 33 | $obj='.obj'; |
| 35 | $ofile="-o"; | 34 | $ofile="-o"; |
| 36 | 35 | ||
| 37 | # EXE linking stuff | 36 | # EXE linking stuff |
| 38 | $link="tlink32"; | 37 | $link="ilink32"; |
| 39 | $efile=""; | 38 | $efile=""; |
| 40 | $exep='.exe'; | 39 | $exep='.exe'; |
| 41 | $ex_libs="CW32.LIB IMPORT32.LIB"; | 40 | if ($no_sock) |
| 42 | $ex_libs.=$no_sock?"":" wsock32.lib"; | 41 | { $ex_libs=""; } |
| 43 | $shlib_ex_obj="" if $shlib; | 42 | else { $ex_libs="cw32mt.lib import32.lib"; } |
| 44 | $app_ex_obj="C0X32.OBJ"; | ||
| 45 | 43 | ||
| 46 | # static library stuff | 44 | # static library stuff |
| 47 | $mklib='tlib'; | 45 | $mklib='tlib /P64'; |
| 48 | $ranlib=''; | 46 | $ranlib=''; |
| 49 | $plib=""; | 47 | $plib=""; |
| 50 | $libp=".lib"; | 48 | $libp=".lib"; |
| 51 | $shlibp=($shlib)?".dll":".lib"; | 49 | $shlibp=($shlib)?".dll":".lib"; |
| 52 | $lfile=''; | 50 | $lfile=''; |
| 53 | 51 | ||
| 54 | $asm='ml /Cp /c /Cx'; | 52 | $shlib_ex_obj=""; |
| 53 | $app_ex_obj="c0x32.obj"; | ||
| 54 | |||
| 55 | $asm='n_o_T_a_s_m'; | ||
| 56 | $asm.=" /Zi" if $debug; | ||
| 55 | $afile='/Fo'; | 57 | $afile='/Fo'; |
| 56 | if ($noasm) | 58 | |
| 59 | $bn_mulw_obj=''; | ||
| 60 | $bn_mulw_src=''; | ||
| 61 | $des_enc_obj=''; | ||
| 62 | $des_enc_src=''; | ||
| 63 | $bf_enc_obj=''; | ||
| 64 | $bf_enc_src=''; | ||
| 65 | |||
| 66 | if (!$no_asm) | ||
| 57 | { | 67 | { |
| 58 | $bn_mulw_obj=''; | 68 | $bn_mulw_obj='crypto\bn\asm\bn-win32.obj'; |
| 59 | $bn_mulw_src=''; | 69 | $bn_mulw_src='crypto\bn\asm\bn-win32.asm'; |
| 70 | $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; | ||
| 71 | $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; | ||
| 72 | $bf_enc_obj='crypto\bf\asm\b-win32.obj'; | ||
| 73 | $bf_enc_src='crypto\bf\asm\b-win32.asm'; | ||
| 74 | $cast_enc_obj='crypto\cast\asm\c-win32.obj'; | ||
| 75 | $cast_enc_src='crypto\cast\asm\c-win32.asm'; | ||
| 76 | $rc4_enc_obj='crypto\rc4\asm\r4-win32.obj'; | ||
| 77 | $rc4_enc_src='crypto\rc4\asm\r4-win32.asm'; | ||
| 78 | $rc5_enc_obj='crypto\rc5\asm\r5-win32.obj'; | ||
| 79 | $rc5_enc_src='crypto\rc5\asm\r5-win32.asm'; | ||
| 80 | $md5_asm_obj='crypto\md5\asm\m5-win32.obj'; | ||
| 81 | $md5_asm_src='crypto\md5\asm\m5-win32.asm'; | ||
| 82 | $sha1_asm_obj='crypto\sha\asm\s1-win32.obj'; | ||
| 83 | $sha1_asm_src='crypto\sha\asm\s1-win32.asm'; | ||
| 84 | $rmd160_asm_obj='crypto\ripemd\asm\rm-win32.obj'; | ||
| 85 | $rmd160_asm_src='crypto\ripemd\asm\rm-win32.asm'; | ||
| 86 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; | ||
| 60 | } | 87 | } |
| 61 | else | 88 | |
| 89 | if ($shlib) | ||
| 62 | { | 90 | { |
| 63 | $bn_mulw_obj='crypto\bn\asm\x86b32.obj'; | 91 | $mlflags.=" $lflags /dll"; |
| 64 | $bn_mulw_src='crypto\bn\asm\x86m32.asm'; | 92 | # $cflags =~ s| /MD| /MT|; |
| 93 | $lib_cflag=" /GD -D_WINDLL -D_DLL"; | ||
| 94 | $out_def="out32dll"; | ||
| 95 | $tmp_def="tmp32dll"; | ||
| 65 | } | 96 | } |
| 66 | 97 | ||
| 67 | sub do_lib_rule | 98 | sub do_lib_rule |
| 68 | { | 99 | { |
| 69 | local($target,$name,$shlib)=@_; | 100 | local($objs,$target,$name,$shlib)=@_; |
| 70 | local($ret,$Name); | 101 | local($ret,$Name); |
| 71 | 102 | ||
| 72 | $taget =~ s/\//$o/g if $o ne '/'; | 103 | $taget =~ s/\//$o/g if $o ne '/'; |
| 73 | ($Name=$name) =~ tr/a-z/A-Z/; | 104 | ($Name=$name) =~ tr/a-z/A-Z/; |
| 74 | 105 | ||
| 75 | $ret.="$target: \$(${Name}OBJ)\n"; | 106 | # $target="\$(LIB_D)$o$target"; |
| 76 | $ret.="\t\$(RM) \$(O_$Name)\n"; | 107 | $ret.="$target: $objs\n"; |
| 77 | |||
| 78 | # Due to a pathetic line length limit, I unwrap the args. | ||
| 79 | local($lib_names)=""; | ||
| 80 | local($dll_names)=""; | ||
| 81 | foreach $_ (sort split(/\s+/,$Vars{"${Name}OBJ"})) | ||
| 82 | { | ||
| 83 | $lib_names.=" +$_ &\n"; | ||
| 84 | $dll_names.=" $_\n"; | ||
| 85 | } | ||
| 86 | |||
| 87 | if (!$shlib) | 108 | if (!$shlib) |
| 88 | { | 109 | { |
| 89 | $ret.="\t\$(MKLIB) $target & <<|\n$lib_names\n,\n|\n"; | 110 | # $ret.="\t\$(RM) \$(O_$Name)\n"; |
| 111 | $ret.="\techo LIB $<\n"; | ||
| 112 | $ret.="\t\$(MKLIB) $lfile$target \$(addprefix +, $objs)\n"; | ||
| 90 | } | 113 | } |
| 91 | else | 114 | else |
| 92 | { | 115 | { |
| 93 | # $(SHLIB_EX_OBJ) | 116 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; |
| 94 | local($ex)=($Name eq "SSL")?' $(L_CRYPTO) winsock':""; | 117 | $ex.=' wsock32.lib gdi32.lib'; |
| 95 | $ret.="\t\$(LINK) \$(MLFLAGS) @&&|\n"; | 118 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; |
| 96 | $ret.=$dll_names; | ||
| 97 | $ret.="\n $target\n\n $ex $libs\nms$o${name}16.def;\n|\n"; | ||
| 98 | ($out_lib=$target) =~ s/O_/L_/; | ||
| 99 | $ret.="\timplib /nowep $out_lib $target\n\n"; | ||
| 100 | } | 119 | } |
| 101 | $ret.="\n"; | 120 | $ret.="\n"; |
| 102 | return($ret); | 121 | return($ret); |
| @@ -105,30 +124,12 @@ sub do_lib_rule | |||
| 105 | sub do_link_rule | 124 | sub do_link_rule |
| 106 | { | 125 | { |
| 107 | local($target,$files,$dep_libs,$libs)=@_; | 126 | local($target,$files,$dep_libs,$libs)=@_; |
| 108 | local($ret,$f,$_,@f); | 127 | local($ret,$_); |
| 109 | 128 | ||
| 110 | $file =~ s/\//$o/g if $o ne '/'; | 129 | $file =~ s/\//$o/g if $o ne '/'; |
| 111 | $n=&bname($targer); | 130 | $n=&bname($targer); |
| 112 | $ret.="$target: $files $dep_libs\n"; | 131 | $ret.="$target: $files $dep_libs\n"; |
| 113 | $ret.=" \$(LINK) @&&|"; | 132 | $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; |
| 114 | |||
| 115 | # Due to a pathetic line length limit, I have to unwrap the args. | ||
| 116 | $r=" \$(LFLAGS) "; | ||
| 117 | if ($files =~ /\(([^)]*)\)$/) | ||
| 118 | { | ||
| 119 | @a=('$(APP_EX_OBJ)'); | ||
| 120 | push(@a,sort split(/\s+/,$Vars{$1})); | ||
| 121 | foreach $_ (@a) | ||
| 122 | { | ||
| 123 | $ret.="\n $r $_ +"; | ||
| 124 | $r=""; | ||
| 125 | } | ||
| 126 | chop($ret); | ||
| 127 | $ret.="\n"; | ||
| 128 | } | ||
| 129 | else | ||
| 130 | { $ret.="\n $r \$(APP_EX_OBJ) $files\n"; } | ||
| 131 | $ret.=" $target\n\n $libs\n\n|\n\n"; | ||
| 132 | return($ret); | 133 | return($ret); |
| 133 | } | 134 | } |
| 134 | 135 | ||
diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl new file mode 100644 index 0000000000..84c2a22db3 --- /dev/null +++ b/src/lib/libcrypto/util/pl/Mingw32.pl | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # Mingw32.pl -- Mingw32 with GNU cp (Mingw32f.pl uses DOS tools) | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='cp'; | ||
| 8 | $rm='rem'; # use 'rm -f' if using GNU file utilities | ||
| 9 | $mkdir='gmkdir'; | ||
| 10 | |||
| 11 | # gcc wouldn't accept backslashes in paths | ||
| 12 | #$o='\\'; | ||
| 13 | #$cp='copy'; | ||
| 14 | #$rm='del'; | ||
| 15 | |||
| 16 | # C compiler stuff | ||
| 17 | |||
| 18 | $cc='gcc'; | ||
| 19 | if ($debug) | ||
| 20 | { $cflags="-g2 -ggdb"; } | ||
| 21 | else | ||
| 22 | { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } | ||
| 23 | |||
| 24 | $obj='.o'; | ||
| 25 | $ofile='-o '; | ||
| 26 | |||
| 27 | # EXE linking stuff | ||
| 28 | $link='${CC}'; | ||
| 29 | $lflags='${CFLAGS}'; | ||
| 30 | $efile='-o '; | ||
| 31 | $exep=''; | ||
| 32 | $ex_libs="-lwsock32 -lgdi32"; | ||
| 33 | |||
| 34 | # static library stuff | ||
| 35 | $mklib='ar r'; | ||
| 36 | $mlflags=''; | ||
| 37 | $ranlib='ranlib'; | ||
| 38 | $plib='lib'; | ||
| 39 | $libp=".a"; | ||
| 40 | $shlibp=".a"; | ||
| 41 | $lfile=''; | ||
| 42 | |||
| 43 | $asm='as'; | ||
| 44 | $afile='-o '; | ||
| 45 | $bn_asm_obj=""; | ||
| 46 | $bn_asm_src=""; | ||
| 47 | $des_enc_obj=""; | ||
| 48 | $des_enc_src=""; | ||
| 49 | $bf_enc_obj=""; | ||
| 50 | $bf_enc_src=""; | ||
| 51 | |||
| 52 | sub do_lib_rule | ||
| 53 | { | ||
| 54 | local($obj,$target,$name,$shlib)=@_; | ||
| 55 | local($ret,$_,$Name); | ||
| 56 | |||
| 57 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 58 | $target="$target"; | ||
| 59 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 60 | |||
| 61 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 62 | $ret.="\t\$(RM) $target\n"; | ||
| 63 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 64 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 65 | } | ||
| 66 | |||
| 67 | sub do_link_rule | ||
| 68 | { | ||
| 69 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 70 | local($ret,$_); | ||
| 71 | |||
| 72 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 73 | $n=&bname($target); | ||
| 74 | $ret.="$target: $files $dep_libs\n"; | ||
| 75 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 76 | return($ret); | ||
| 77 | } | ||
| 78 | 1; | ||
| 79 | |||
diff --git a/src/lib/libcrypto/util/pl/Mingw32f.pl b/src/lib/libcrypto/util/pl/Mingw32f.pl new file mode 100644 index 0000000000..a53c537646 --- /dev/null +++ b/src/lib/libcrypto/util/pl/Mingw32f.pl | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # Mingw32f.pl -- copy files; Mingw32.pl is needed to do the compiling. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='\\'; | ||
| 7 | $cp='copy'; | ||
| 8 | $rm='del'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | $cc='gcc'; | ||
| 13 | if ($debug) | ||
| 14 | { $cflags="-g2 -ggdb"; } | ||
| 15 | else | ||
| 16 | { $cflags="-O3 -fomit-frame-pointer"; } | ||
| 17 | |||
| 18 | $obj='.o'; | ||
| 19 | $ofile='-o '; | ||
| 20 | |||
| 21 | # EXE linking stuff | ||
| 22 | $link='${CC}'; | ||
| 23 | $lflags='${CFLAGS}'; | ||
| 24 | $efile='-o '; | ||
| 25 | $exep=''; | ||
| 26 | $ex_libs="-lwsock32 -lgdi32"; | ||
| 27 | |||
| 28 | # static library stuff | ||
| 29 | $mklib='ar r'; | ||
| 30 | $mlflags=''; | ||
| 31 | $ranlib='ranlib'; | ||
| 32 | $plib='lib'; | ||
| 33 | $libp=".a"; | ||
| 34 | $shlibp=".a"; | ||
| 35 | $lfile=''; | ||
| 36 | |||
| 37 | $asm='as'; | ||
| 38 | $afile='-o '; | ||
| 39 | $bn_asm_obj=""; | ||
| 40 | $bn_asm_src=""; | ||
| 41 | $des_enc_obj=""; | ||
| 42 | $des_enc_src=""; | ||
| 43 | $bf_enc_obj=""; | ||
| 44 | $bf_enc_src=""; | ||
| 45 | |||
| 46 | sub do_lib_rule | ||
| 47 | { | ||
| 48 | local($obj,$target,$name,$shlib)=@_; | ||
| 49 | local($ret,$_,$Name); | ||
| 50 | |||
| 51 | $target =~ s/\//$o/g if $o ne '/'; | ||
| 52 | $target="$target"; | ||
| 53 | ($Name=$name) =~ tr/a-z/A-Z/; | ||
| 54 | |||
| 55 | $ret.="$target: \$(${Name}OBJ)\n"; | ||
| 56 | $ret.="\t\$(RM) $target\n"; | ||
| 57 | $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n"; | ||
| 58 | $ret.="\t\$(RANLIB) $target\n\n"; | ||
| 59 | } | ||
| 60 | |||
| 61 | sub do_link_rule | ||
| 62 | { | ||
| 63 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 64 | local($ret,$_); | ||
| 65 | |||
| 66 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 67 | $n=&bname($target); | ||
| 68 | $ret.="$target: $files $dep_libs\n"; | ||
| 69 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 70 | return($ret); | ||
| 71 | } | ||
| 72 | 1; | ||
| 73 | |||
diff --git a/src/lib/libcrypto/util/pl/VC-16.pl b/src/lib/libcrypto/util/pl/VC-16.pl index a6e6c0241c..a5079d4ca7 100644 --- a/src/lib/libcrypto/util/pl/VC-16.pl +++ b/src/lib/libcrypto/util/pl/VC-16.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries | 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries |
| 3 | # | 3 | # |
| 4 | 4 | ||
| @@ -84,8 +84,8 @@ $lfile=''; | |||
| 84 | $asm='ml /Cp /c /Cx'; | 84 | $asm='ml /Cp /c /Cx'; |
| 85 | $afile='/Fo'; | 85 | $afile='/Fo'; |
| 86 | 86 | ||
| 87 | $bn_mulw_obj=''; | 87 | $bn_asm_obj=''; |
| 88 | $bn_mulw_src=''; | 88 | $bn_asm_src=''; |
| 89 | $des_enc_obj=''; | 89 | $des_enc_obj=''; |
| 90 | $des_enc_src=''; | 90 | $des_enc_src=''; |
| 91 | $bf_enc_obj=''; | 91 | $bf_enc_obj=''; |
| @@ -95,13 +95,13 @@ if (!$no_asm) | |||
| 95 | { | 95 | { |
| 96 | if ($asmbits == 32) | 96 | if ($asmbits == 32) |
| 97 | { | 97 | { |
| 98 | $bn_mulw_obj='crypto\bn\asm\x86w32.obj'; | 98 | $bn_asm_obj='crypto\bn\asm\x86w32.obj'; |
| 99 | $bn_mulw_src='crypto\bn\asm\x86w32.asm'; | 99 | $bn_asm_src='crypto\bn\asm\x86w32.asm'; |
| 100 | } | 100 | } |
| 101 | else | 101 | else |
| 102 | { | 102 | { |
| 103 | $bn_mulw_obj='crypto\bn\asm\x86w16.obj'; | 103 | $bn_asm_obj='crypto\bn\asm\x86w16.obj'; |
| 104 | $bn_mulw_src='crypto\bn\asm\x86w16.asm'; | 104 | $bn_asm_src='crypto\bn\asm\x86w16.asm'; |
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | 107 | ||
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl index 701e282c33..6db1c9fe23 100644 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ b/src/lib/libcrypto/util/pl/VC-32.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries | 2 | # VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries |
| 3 | # | 3 | # |
| 4 | 4 | ||
| @@ -7,7 +7,7 @@ $crypto="libeay32"; | |||
| 7 | $RSAref="RSAref32"; | 7 | $RSAref="RSAref32"; |
| 8 | 8 | ||
| 9 | $o='\\'; | 9 | $o='\\'; |
| 10 | $cp='copy'; | 10 | $cp='copy nul+'; # Timestamps get stuffed otherwise |
| 11 | $rm='del'; | 11 | $rm='del'; |
| 12 | 12 | ||
| 13 | # C compiler stuff | 13 | # C compiler stuff |
| @@ -22,10 +22,11 @@ $inc_def="inc32"; | |||
| 22 | 22 | ||
| 23 | if ($debug) | 23 | if ($debug) |
| 24 | { | 24 | { |
| 25 | $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWINDOWS -DWIN32 -D_DEBUG -DL_ENDIAN"; | 25 | $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWINDOWS -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG"; |
| 26 | $lflags.=" /debug"; | 26 | $lflags.=" /debug"; |
| 27 | $mlflags.=' /debug'; | 27 | $mlflags.=' /debug'; |
| 28 | } | 28 | } |
| 29 | $cflags .= " -DWINNT" if $NT == 1; | ||
| 29 | 30 | ||
| 30 | $obj='.obj'; | 31 | $obj='.obj'; |
| 31 | $ofile="/Fo"; | 32 | $ofile="/Fo"; |
| @@ -48,13 +49,17 @@ $lfile='/out:'; | |||
| 48 | 49 | ||
| 49 | $shlib_ex_obj=""; | 50 | $shlib_ex_obj=""; |
| 50 | $app_ex_obj="setargv.obj"; | 51 | $app_ex_obj="setargv.obj"; |
| 51 | 52 | if ($nasm) { | |
| 52 | $asm='ml /Cp /coff /c /Cx'; | 53 | $asm='nasmw -f win32'; |
| 53 | $asm.=" /Zi" if $debug; | 54 | $afile='-o '; |
| 54 | $afile='/Fo'; | 55 | } else { |
| 55 | 56 | $asm='ml /Cp /coff /c /Cx'; | |
| 56 | $bn_mulw_obj=''; | 57 | $asm.=" /Zi" if $debug; |
| 57 | $bn_mulw_src=''; | 58 | $afile='/Fo'; |
| 59 | } | ||
| 60 | |||
| 61 | $bn_asm_obj=''; | ||
| 62 | $bn_asm_src=''; | ||
| 58 | $des_enc_obj=''; | 63 | $des_enc_obj=''; |
| 59 | $des_enc_src=''; | 64 | $des_enc_src=''; |
| 60 | $bf_enc_obj=''; | 65 | $bf_enc_obj=''; |
| @@ -62,8 +67,8 @@ $bf_enc_src=''; | |||
| 62 | 67 | ||
| 63 | if (!$no_asm) | 68 | if (!$no_asm) |
| 64 | { | 69 | { |
| 65 | $bn_mulw_obj='crypto\bn\asm\bn-win32.obj'; | 70 | $bn_asm_obj='crypto\bn\asm\bn-win32.obj'; |
| 66 | $bn_mulw_src='crypto\bn\asm\bn-win32.asm'; | 71 | $bn_asm_src='crypto\bn\asm\bn-win32.asm'; |
| 67 | $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; | 72 | $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; |
| 68 | $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; | 73 | $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; |
| 69 | $bf_enc_obj='crypto\bf\asm\b-win32.obj'; | 74 | $bf_enc_obj='crypto\bf\asm\b-win32.obj'; |
| @@ -92,6 +97,8 @@ if ($shlib) | |||
| 92 | $tmp_def="tmp32dll"; | 97 | $tmp_def="tmp32dll"; |
| 93 | } | 98 | } |
| 94 | 99 | ||
| 100 | $cflags.=" /Fd$out_def"; | ||
| 101 | |||
| 95 | sub do_lib_rule | 102 | sub do_lib_rule |
| 96 | { | 103 | { |
| 97 | local($objs,$target,$name,$shlib)=@_; | 104 | local($objs,$target,$name,$shlib)=@_; |
| @@ -110,7 +117,7 @@ sub do_lib_rule | |||
| 110 | else | 117 | else |
| 111 | { | 118 | { |
| 112 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; | 119 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; |
| 113 | $ex.=' wsock32.lib gdi32.lib'; | 120 | $ex.=' wsock32.lib gdi32.lib advapi32.lib'; |
| 114 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; | 121 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; |
| 115 | } | 122 | } |
| 116 | $ret.="\n"; | 123 | $ret.="\n"; |
diff --git a/src/lib/libcrypto/util/pl/linux.pl b/src/lib/libcrypto/util/pl/linux.pl index 2b13da1bfc..a8cfdc578a 100644 --- a/src/lib/libcrypto/util/pl/linux.pl +++ b/src/lib/libcrypto/util/pl/linux.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # linux.pl - the standard unix makefile stuff. | 3 | # linux.pl - the standard unix makefile stuff. |
| 4 | # | 4 | # |
| @@ -17,8 +17,8 @@ else | |||
| 17 | 17 | ||
| 18 | if (!$no_asm) | 18 | if (!$no_asm) |
| 19 | { | 19 | { |
| 20 | $bn_mulw_obj='$(OBJ_D)/bn86-elf.o'; | 20 | $bn_asm_obj='$(OBJ_D)/bn86-elf.o'; |
| 21 | $bn_mulw_src='crypto/bn/asm/bn86unix.cpp'; | 21 | $bn_asm_src='crypto/bn/asm/bn86unix.cpp'; |
| 22 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; | 22 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; |
| 23 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; | 23 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; |
| 24 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; | 24 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; |
| @@ -27,8 +27,12 @@ if (!$no_asm) | |||
| 27 | $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; | 27 | $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; |
| 28 | $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; | 28 | $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; |
| 29 | $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; | 29 | $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; |
| 30 | $rc5_enc_obj='$(OBJ_D)/r586-elf.o'; | ||
| 31 | $rc5_enc_src='crypto/rc5/asm/r586unix.cpp'; | ||
| 30 | $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; | 32 | $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; |
| 31 | $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; | 33 | $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; |
| 34 | $rmd160_asm_obj='$(OBJ_D)/rm86-elf.o'; | ||
| 35 | $rmd160_asm_src='crypto/ripemd/asm/rm86unix.cpp'; | ||
| 32 | $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; | 36 | $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; |
| 33 | $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; | 37 | $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; |
| 34 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; | 38 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; |
| @@ -51,9 +55,9 @@ sub do_shlib_rule | |||
| 51 | $target =~ s/\//$o/g if $o ne '/'; | 55 | $target =~ s/\//$o/g if $o ne '/'; |
| 52 | ($Name=$name) =~ tr/a-z/A-Z/; | 56 | ($Name=$name) =~ tr/a-z/A-Z/; |
| 53 | 57 | ||
| 54 | $ret.="\$(LIB_D)$o$target: \$(${Name}OBJ)\n"; | 58 | $ret.="$target: \$(${Name}OBJ)\n"; |
| 55 | $ret.="\t\$(RM) \$(LIB_D)$o$target\n"; | 59 | $ret.="\t\$(RM) target\n"; |
| 56 | $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o \$(LIB_D)$o$target \$(${Name}OBJ)\n"; | 60 | $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o $target \$(${Name}OBJ)\n"; |
| 57 | ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; | 61 | ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; |
| 58 | if ($so_name ne "") | 62 | if ($so_name ne "") |
| 59 | { | 63 | { |
diff --git a/src/lib/libcrypto/util/pl/ultrix.pl b/src/lib/libcrypto/util/pl/ultrix.pl new file mode 100644 index 0000000000..ea370c71f9 --- /dev/null +++ b/src/lib/libcrypto/util/pl/ultrix.pl | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # linux.pl - the standard unix makefile stuff. | ||
| 4 | # | ||
| 5 | |||
| 6 | $o='/'; | ||
| 7 | $cp='/bin/cp'; | ||
| 8 | $rm='/bin/rm -f'; | ||
| 9 | |||
| 10 | # C compiler stuff | ||
| 11 | |||
| 12 | $cc='cc'; | ||
| 13 | if ($debug) | ||
| 14 | { $cflags="-g -DREF_CHECK -DCRYPTO_MDEBUG"; } | ||
| 15 | else | ||
| 16 | { $cflags="-O2"; } | ||
| 17 | |||
| 18 | $cflags.=" -std1 -DL_ENDIAN"; | ||
| 19 | |||
| 20 | if (!$no_asm) | ||
| 21 | { | ||
| 22 | $bn_asm_obj='$(OBJ_D)/mips1.o'; | ||
| 23 | $bn_asm_src='crypto/bn/asm/mips1.s'; | ||
| 24 | } | ||
| 25 | |||
| 26 | sub do_link_rule | ||
| 27 | { | ||
| 28 | local($target,$files,$dep_libs,$libs)=@_; | ||
| 29 | local($ret,$_); | ||
| 30 | |||
| 31 | $file =~ s/\//$o/g if $o ne '/'; | ||
| 32 | $n=&bname($target); | ||
| 33 | $ret.="$target: $files $dep_libs\n"; | ||
| 34 | $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; | ||
| 35 | return($ret); | ||
| 36 | } | ||
| 37 | |||
| 38 | 1; | ||
diff --git a/src/lib/libcrypto/util/pl/unix.pl b/src/lib/libcrypto/util/pl/unix.pl index ab4978fd20..146611ad99 100644 --- a/src/lib/libcrypto/util/pl/unix.pl +++ b/src/lib/libcrypto/util/pl/unix.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # unix.pl - the standard unix makefile stuff. | 3 | # unix.pl - the standard unix makefile stuff. |
| 4 | # | 4 | # |
| @@ -38,7 +38,7 @@ $ex_libs=""; | |||
| 38 | # static library stuff | 38 | # static library stuff |
| 39 | $mklib='ar r'; | 39 | $mklib='ar r'; |
| 40 | $mlflags=''; | 40 | $mlflags=''; |
| 41 | $ranlib='util/ranlib.sh'; | 41 | $ranlib=&which("ranlib") or $ranlib="true"; |
| 42 | $plib='lib'; | 42 | $plib='lib'; |
| 43 | $libp=".a"; | 43 | $libp=".a"; |
| 44 | $shlibp=".a"; | 44 | $shlibp=".a"; |
| @@ -46,8 +46,8 @@ $lfile=''; | |||
| 46 | 46 | ||
| 47 | $asm='as'; | 47 | $asm='as'; |
| 48 | $afile='-o '; | 48 | $afile='-o '; |
| 49 | $bn_mulw_obj=""; | 49 | $bn_asm_obj=""; |
| 50 | $bn_mulw_src=""; | 50 | $bn_asm_src=""; |
| 51 | $des_enc_obj=""; | 51 | $des_enc_obj=""; |
| 52 | $des_enc_src=""; | 52 | $des_enc_src=""; |
| 53 | $bf_enc_obj=""; | 53 | $bf_enc_obj=""; |
| @@ -59,7 +59,7 @@ sub do_lib_rule | |||
| 59 | local($ret,$_,$Name); | 59 | local($ret,$_,$Name); |
| 60 | 60 | ||
| 61 | $target =~ s/\//$o/g if $o ne '/'; | 61 | $target =~ s/\//$o/g if $o ne '/'; |
| 62 | $target="\$(LIB_D)$o$target"; | 62 | $target="$target"; |
| 63 | ($Name=$name) =~ tr/a-z/A-Z/; | 63 | ($Name=$name) =~ tr/a-z/A-Z/; |
| 64 | 64 | ||
| 65 | $ret.="$target: \$(${Name}OBJ)\n"; | 65 | $ret.="$target: \$(${Name}OBJ)\n"; |
| @@ -80,4 +80,17 @@ sub do_link_rule | |||
| 80 | return($ret); | 80 | return($ret); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | sub which | ||
| 84 | { | ||
| 85 | my ($name)=@_; | ||
| 86 | my $path; | ||
| 87 | foreach $path (split /:/, $ENV{PATH}) | ||
| 88 | { | ||
| 89 | if (-x "$path/$name") | ||
| 90 | { | ||
| 91 | return "$path/$name"; | ||
| 92 | } | ||
| 93 | } | ||
| 94 | } | ||
| 95 | |||
| 83 | 1; | 96 | 1; |
diff --git a/src/lib/libcrypto/util/point.sh b/src/lib/libcrypto/util/point.sh index 92c12e8282..47543c88e2 100644 --- a/src/lib/libcrypto/util/point.sh +++ b/src/lib/libcrypto/util/point.sh | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | /bin/rm -f $2 | 3 | rm -f $2 |
| 4 | ln -s $1 $2 | 4 | ln -s $1 $2 |
| 5 | echo "$2 => $1" | ||
| 6 | |||
diff --git a/src/lib/libcrypto/util/ranlib.sh b/src/lib/libcrypto/util/ranlib.sh deleted file mode 100644 index 543f712c6b..0000000000 --- a/src/lib/libcrypto/util/ranlib.sh +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | cwd=`pwd` | ||
| 4 | cd /tmp | ||
| 5 | |||
| 6 | if [ -s /bin/ranlib ] ; then | ||
| 7 | RL=/bin/ranlib | ||
| 8 | else if [ -s /usr/bin/ranlib ] ; then | ||
| 9 | RL=/usr/bin/ranlib | ||
| 10 | fi | ||
| 11 | fi | ||
| 12 | |||
| 13 | if [ "x$RL" != "x" ] | ||
| 14 | then | ||
| 15 | case "$1" in | ||
| 16 | /*) | ||
| 17 | $RL "$1" | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | $RL "$cwd/$1" | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | fi | ||
diff --git a/src/lib/libcrypto/util/sep_lib.sh b/src/lib/libcrypto/util/sep_lib.sh index 2348db874e..34c2c9f8ba 100644 --- a/src/lib/libcrypto/util/sep_lib.sh +++ b/src/lib/libcrypto/util/sep_lib.sh | |||
| @@ -21,9 +21,6 @@ do | |||
| 21 | /bin/rm -f *.old | 21 | /bin/rm -f *.old |
| 22 | /bin/mv Makefile.uni Makefile | 22 | /bin/mv Makefile.uni Makefile |
| 23 | 23 | ||
| 24 | cp $cwd/util/ranlib.sh . | ||
| 25 | chmod +x ranlib.sh | ||
| 26 | |||
| 27 | if [ -d asm ]; then | 24 | if [ -d asm ]; then |
| 28 | mkdir asm/perlasm | 25 | mkdir asm/perlasm |
| 29 | cp $cwd/crypto/perlasm/*.pl asm/perlasm | 26 | cp $cwd/crypto/perlasm/*.pl asm/perlasm |
diff --git a/src/lib/libcrypto/util/sp-diff.pl b/src/lib/libcrypto/util/sp-diff.pl index 2c88336858..f81e50201b 100644 --- a/src/lib/libcrypto/util/sp-diff.pl +++ b/src/lib/libcrypto/util/sp-diff.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | # | 2 | # |
| 3 | # This file takes as input, the files that have been output from | 3 | # This file takes as input, the files that have been output from |
| 4 | # ssleay speed. | 4 | # ssleay speed. |
diff --git a/src/lib/libcrypto/util/src-dep.pl b/src/lib/libcrypto/util/src-dep.pl index 91242f7bb6..ad997e4746 100644 --- a/src/lib/libcrypto/util/src-dep.pl +++ b/src/lib/libcrypto/util/src-dep.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | 2 | ||
| 3 | # we make up an array of | 3 | # we make up an array of |
| 4 | # $file{function_name}=filename; | 4 | # $file{function_name}=filename; |
diff --git a/src/lib/libcrypto/util/ssldir.pl b/src/lib/libcrypto/util/ssldir.pl deleted file mode 100644 index 10584686da..0000000000 --- a/src/lib/libcrypto/util/ssldir.pl +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | $#ARGV == 0 || die "usage: ssldir.pl /new/path\n"; | ||
| 4 | @files=('crypto/cryptlib.h', | ||
| 5 | 'Makefile.ssl', | ||
| 6 | 'tools/c_rehash', | ||
| 7 | 'util/mk1mf.pl', | ||
| 8 | ); | ||
| 9 | |||
| 10 | %cryptlib=( | ||
| 11 | '\sX509_CERT_AREA\s',"#define X509_CERT_AREA\t\t".'"%s"', | ||
| 12 | '\sX509_CERT_DIR\s', "#define X509_CERT_DIR\t\t".'"%s/certs"', | ||
| 13 | '\sX509_CERT_FILE\s', "#define X509_CERT_FILE\t\t".'"%s/cert.pem"', | ||
| 14 | '\sX509_PRIVATE_DIR\s',"#define X509_PRIVATE_DIR\t".'"%s/private"', | ||
| 15 | ); | ||
| 16 | |||
| 17 | %Makefile_ssl=( | ||
| 18 | '^INSTALLTOP=','INSTALLTOP=%s', | ||
| 19 | ); | ||
| 20 | |||
| 21 | %c_rehash=( | ||
| 22 | '^DIR=', 'DIR=%s', | ||
| 23 | ); | ||
| 24 | |||
| 25 | %mk1mf=( | ||
| 26 | '^$INSTALLTOP=','$INSTALLTOP="%s";', | ||
| 27 | ); | ||
| 28 | |||
| 29 | &dofile("crypto/cryptlib.h",$ARGV[0],%cryptlib); | ||
| 30 | &dofile("Makefile.ssl",$ARGV[0],%Makefile_ssl); | ||
| 31 | &dofile("tools/c_rehash",$ARGV[0],%c_rehash); | ||
| 32 | &dofile("util/mk1mf.pl",$ARGV[0],%mk1mf); | ||
| 33 | |||
| 34 | sub dofile | ||
| 35 | { | ||
| 36 | ($f,$p,%m)=@_; | ||
| 37 | |||
| 38 | open(IN,"<$f") || die "unable to open $f:$!\n"; | ||
| 39 | @a=<IN>; | ||
| 40 | close(IN); | ||
| 41 | foreach $k (keys %m) | ||
| 42 | { | ||
| 43 | grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a); | ||
| 44 | } | ||
| 45 | ($ff=$f) =~ s/\..*$//; | ||
| 46 | open(OUT,">$ff.new") || die "unable to open $f:$!\n"; | ||
| 47 | print OUT @a; | ||
| 48 | close(OUT); | ||
| 49 | rename($f,"$ff.old") || die "unable to rename $f\n"; | ||
| 50 | rename("$ff.new",$f) || die "unable to rename $ff.new\n"; | ||
| 51 | } | ||
| 52 | |||
diff --git a/src/lib/libcrypto/util/ssleay.num b/src/lib/libcrypto/util/ssleay.num index 359fa15df1..8121738bd6 100644 --- a/src/lib/libcrypto/util/ssleay.num +++ b/src/lib/libcrypto/util/ssleay.num | |||
| @@ -154,3 +154,64 @@ TLSv1_server_method 171 | |||
| 154 | TLSv1_client_method 172 | 154 | TLSv1_client_method 172 |
| 155 | BIO_new_buffer_ssl_connect 173 | 155 | BIO_new_buffer_ssl_connect 173 |
| 156 | BIO_new_ssl_connect 174 | 156 | BIO_new_ssl_connect 174 |
| 157 | SSL_get_ex_data_X509_STORE_CTX_idx 175 | ||
| 158 | SSL_CTX_set_tmp_dh_callback 176 | ||
| 159 | SSL_CTX_set_tmp_rsa_callback 177 | ||
| 160 | SSL_CTX_set_timeout 178 | ||
| 161 | SSL_CTX_get_timeout 179 | ||
| 162 | SSL_CTX_get_cert_store 180 | ||
| 163 | SSL_CTX_set_cert_store 181 | ||
| 164 | SSL_want 182 | ||
| 165 | SSL_library_init 183 | ||
| 166 | SSL_COMP_add_compression_method 184 | ||
| 167 | SSL_add_file_cert_subjects_to_stack 185 | ||
| 168 | SSL_set_tmp_rsa_callback 186 | ||
| 169 | SSL_set_tmp_dh_callback 187 | ||
| 170 | SSL_add_dir_cert_subjects_to_stack 188 | ||
| 171 | SSL_set_session_id_context 189 | ||
| 172 | sk_SSL_CIPHER_new 190 | ||
| 173 | sk_SSL_CIPHER_new_null 191 | ||
| 174 | sk_SSL_CIPHER_free 192 | ||
| 175 | sk_SSL_CIPHER_num 193 | ||
| 176 | sk_SSL_CIPHER_value 194 | ||
| 177 | sk_SSL_CIPHER_set 195 | ||
| 178 | sk_SSL_CIPHER_zero 196 | ||
| 179 | sk_SSL_CIPHER_push 197 | ||
| 180 | sk_SSL_CIPHER_pop 198 | ||
| 181 | sk_SSL_CIPHER_find 199 | ||
| 182 | sk_SSL_CIPHER_delete 200 | ||
| 183 | sk_SSL_CIPHER_delete_ptr 201 | ||
| 184 | sk_SSL_CIPHER_set_cmp_func 202 | ||
| 185 | sk_SSL_CIPHER_dup 203 | ||
| 186 | sk_SSL_CIPHER_pop_free 204 | ||
| 187 | sk_SSL_CIPHER_shift 205 | ||
| 188 | sk_SSL_COMP_new 206 | ||
| 189 | sk_SSL_COMP_new_null 207 | ||
| 190 | sk_SSL_COMP_free 208 | ||
| 191 | sk_SSL_COMP_num 209 | ||
| 192 | sk_SSL_COMP_value 210 | ||
| 193 | sk_SSL_COMP_set 211 | ||
| 194 | sk_SSL_COMP_zero 212 | ||
| 195 | sk_SSL_COMP_push 213 | ||
| 196 | sk_SSL_COMP_pop 214 | ||
| 197 | sk_SSL_COMP_find 215 | ||
| 198 | sk_SSL_COMP_delete 216 | ||
| 199 | sk_SSL_COMP_delete_ptr 217 | ||
| 200 | sk_SSL_COMP_set_cmp_func 218 | ||
| 201 | sk_SSL_COMP_dup 219 | ||
| 202 | sk_SSL_COMP_pop_free 220 | ||
| 203 | sk_SSL_COMP_shift 221 | ||
| 204 | SSL_CTX_use_certificate_chain_file 222 | ||
| 205 | sk_SSL_COMP_insert 223 | ||
| 206 | sk_SSL_CIPHER_insert 224 | ||
| 207 | SSL_CTX_set_verify_depth 225 | ||
| 208 | SSL_set_verify_depth 226 | ||
| 209 | sk_SSL_CIPHER_unshift 227 | ||
| 210 | SSL_CTX_get_verify_depth 228 | ||
| 211 | SSL_get_verify_depth 229 | ||
| 212 | sk_SSL_COMP_unshift 230 | ||
| 213 | SSL_CTX_set_session_id_context 231 | ||
| 214 | SSL_CTX_set_cert_verify_callback 232 | ||
| 215 | sk_SSL_COMP_sort 233 | ||
| 216 | sk_SSL_CIPHER_sort 234 | ||
| 217 | SSL_CTX_set_default_passwd_cb_userdata 235 | ||
diff --git a/src/lib/libcrypto/util/tab_num.pl b/src/lib/libcrypto/util/tab_num.pl index 77b591d92f..a81ed0edc2 100644 --- a/src/lib/libcrypto/util/tab_num.pl +++ b/src/lib/libcrypto/util/tab_num.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
| 2 | 2 | ||
| 3 | $num=1; | 3 | $num=1; |
| 4 | $width=40; | 4 | $width=40; |
diff --git a/src/lib/libcrypto/util/up_ver.pl b/src/lib/libcrypto/util/up_ver.pl deleted file mode 100644 index 32c086b2aa..0000000000 --- a/src/lib/libcrypto/util/up_ver.pl +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | # | ||
| 3 | # Up the version numbers in the files. | ||
| 4 | # | ||
| 5 | |||
| 6 | @files=( | ||
| 7 | "crypto/crypto.h", | ||
| 8 | "crypto/des/ecb_enc.c", | ||
| 9 | "crypto/idea/i_ecb.c", | ||
| 10 | "crypto/lhash/lhash.c", | ||
| 11 | "crypto/conf/conf.c", | ||
| 12 | "crypto/md2/md2_dgst.c", | ||
| 13 | "crypto/md5/md5_dgst.c", | ||
| 14 | "crypto/ripemd/rmd_dgst.c", | ||
| 15 | "crypto/pem/pem_lib.c", | ||
| 16 | "crypto/bn/bn_lib.c", | ||
| 17 | "crypto/dh/dh_lib.c", | ||
| 18 | "crypto/rc2/rc2_ecb.c", | ||
| 19 | "crypto/rc4/rc4_skey.c", | ||
| 20 | "crypto/rc5/rc5_ecb.c", | ||
| 21 | "crypto/bf/bf_ecb.c", | ||
| 22 | "crypto/cast/c_ecb.c", | ||
| 23 | "crypto/rsa/rsa_lib.c", | ||
| 24 | "crypto/dsa/dsa_lib.c", | ||
| 25 | "crypto/sha/sha1dgst.c", | ||
| 26 | "crypto/sha/sha_dgst.c", | ||
| 27 | "crypto/asn1/asn1_lib.c", | ||
| 28 | "crypto/x509/x509_vfy.c", | ||
| 29 | "crypto/evp/evp_enc.c", | ||
| 30 | "crypto/rand/md_rand.c", | ||
| 31 | "crypto/stack/stack.c", | ||
| 32 | "crypto/txt_db/txt_db.c", | ||
| 33 | "crypto/cversion.c", | ||
| 34 | "ssl/ssl_lib.c", | ||
| 35 | "ssl/s2_lib.c", | ||
| 36 | "ssl/s3_lib.c", | ||
| 37 | "ssl/t1_lib.c", | ||
| 38 | "README", | ||
| 39 | ); | ||
| 40 | |||
| 41 | @month=('Jan','Feb','Mar','Apr','May','Jun', | ||
| 42 | 'Jul','Aug','Sep','Oct','Nov','Dec'); | ||
| 43 | @a=localtime(time()); | ||
| 44 | $time=sprintf("%02d-%s-%04d",$a[3],$month[$a[4]],$a[5]+1900); | ||
| 45 | |||
| 46 | $ver=$ARGV[0]; | ||
| 47 | ($ver ne "") || die "no version number specified\n"; | ||
| 48 | ($a,$b,$c,$d)=unpack('axaxac',$ver); | ||
| 49 | $d=defined($d)?$d-96:0; | ||
| 50 | $xver=sprintf("%x%x%x%x",$a,$b,$c,$d); | ||
| 51 | |||
| 52 | foreach $file (@files) | ||
| 53 | { | ||
| 54 | open(IN,"<$file") || die "unable to open $file:$!\n"; | ||
| 55 | open(OUT,">$file.new") || die "unable to open $file.new:$!\n"; | ||
| 56 | $found=0; | ||
| 57 | |||
| 58 | print STDERR "$file:"; | ||
| 59 | |||
| 60 | while (<IN>) | ||
| 61 | { | ||
| 62 | if ((s/SSLeay \d\.\d.\d[^"]*(\"|\s)/SSLeay $ver $time\1/) || | ||
| 63 | s/^(\#define\s+SSLEAY_VERSION_NUMBER\s+0x)[0-9a-zA-Z]+(.*)$/$1$xver$2/) | ||
| 64 | { | ||
| 65 | print STDERR " Done"; | ||
| 66 | $found++; | ||
| 67 | print OUT; | ||
| 68 | while (<IN>) { print OUT; } | ||
| 69 | last; | ||
| 70 | } | ||
| 71 | print OUT; | ||
| 72 | } | ||
| 73 | print STDERR "\n"; | ||
| 74 | close(IN); | ||
| 75 | close(OUT); | ||
| 76 | (!$found) && die "unable to update the version number in $file\n"; | ||
| 77 | rename($file,"$file.old") || die "unable to rename $file:$!\n"; | ||
| 78 | rename("$file.new",$file) || die "unable to rename $file.new:$!\n"; | ||
| 79 | } | ||
diff --git a/src/lib/libcrypto/util/x86asm.sh b/src/lib/libcrypto/util/x86asm.sh index 81d3289860..d2090a9849 100644 --- a/src/lib/libcrypto/util/x86asm.sh +++ b/src/lib/libcrypto/util/x86asm.sh | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | echo Generating x86 assember | 3 | echo Generating x86 assember |
| 4 | echo Bignum | 4 | echo Bignum |
| 5 | (cd crypto/bn/asm; perl bn-586.pl cpp > bn86unix.cpp) | 5 | (cd crypto/bn/asm; perl x86.pl cpp > bn86unix.cpp) |
| 6 | (cd crypto/bn/asm; perl bn-586.pl win32 > bn-win32.asm) | 6 | (cd crypto/bn/asm; perl x86.pl win32 > bn-win32.asm) |
| 7 | 7 | ||
| 8 | echo DES | 8 | echo DES |
| 9 | (cd crypto/des/asm; perl des-586.pl cpp > dx86unix.cpp) | 9 | (cd crypto/des/asm; perl des-586.pl cpp > dx86unix.cpp) |
