summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util')
-rw-r--r--src/lib/libcrypto/util/add_cr.pl2
-rw-r--r--src/lib/libcrypto/util/ck_errf.pl3
-rw-r--r--src/lib/libcrypto/util/clean-depend.pl38
-rw-r--r--src/lib/libcrypto/util/deleof.pl2
-rw-r--r--src/lib/libcrypto/util/do_ms.sh8
-rw-r--r--src/lib/libcrypto/util/domd11
-rw-r--r--src/lib/libcrypto/util/err-ins.pl2
-rw-r--r--src/lib/libcrypto/util/files.pl2
-rw-r--r--src/lib/libcrypto/util/libeay.num789
-rw-r--r--src/lib/libcrypto/util/mk1mf.pl316
-rw-r--r--src/lib/libcrypto/util/mkdef.pl444
-rw-r--r--src/lib/libcrypto/util/mkdir-p.pl33
-rw-r--r--src/lib/libcrypto/util/mkerr.pl503
-rw-r--r--src/lib/libcrypto/util/mkfiles.pl110
-rw-r--r--src/lib/libcrypto/util/mklink.pl55
-rw-r--r--src/lib/libcrypto/util/mklink.sh35
-rw-r--r--src/lib/libcrypto/util/perlpath.pl9
-rw-r--r--src/lib/libcrypto/util/pl/BC-16.pl14
-rw-r--r--src/lib/libcrypto/util/pl/BC-32.pl153
-rw-r--r--src/lib/libcrypto/util/pl/Mingw32.pl79
-rw-r--r--src/lib/libcrypto/util/pl/Mingw32f.pl73
-rw-r--r--src/lib/libcrypto/util/pl/VC-16.pl14
-rw-r--r--src/lib/libcrypto/util/pl/VC-32.pl33
-rw-r--r--src/lib/libcrypto/util/pl/linux.pl16
-rw-r--r--src/lib/libcrypto/util/pl/ultrix.pl38
-rw-r--r--src/lib/libcrypto/util/pl/unix.pl23
-rw-r--r--src/lib/libcrypto/util/point.sh4
-rw-r--r--src/lib/libcrypto/util/ranlib.sh23
-rw-r--r--src/lib/libcrypto/util/sep_lib.sh3
-rw-r--r--src/lib/libcrypto/util/sp-diff.pl2
-rw-r--r--src/lib/libcrypto/util/src-dep.pl2
-rw-r--r--src/lib/libcrypto/util/ssldir.pl52
-rw-r--r--src/lib/libcrypto/util/ssleay.num61
-rw-r--r--src/lib/libcrypto/util/tab_num.pl2
-rw-r--r--src/lib/libcrypto/util/up_ver.pl79
-rw-r--r--src/lib/libcrypto/util/x86asm.sh4
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
5use strict;
6
7while(<STDIN>) {
8 print;
9 last if /^# DO NOT DELETE THIS LINE/;
10}
11
12my %files;
13
14while(<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
23my $file;
24foreach $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
38print "\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
3while (<>) 3while (<>)
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
6PATH=util:../util:$PATH 6PATH=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
10perl util/mk1mf.pl VC-WIN16 dll >ms/w31dll.mak 10perl 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
12perl util/mk1mf.pl VC-WIN32 dll >ms/ntdll.mak 12perl util/mk1mf.pl dll VC-WIN32 >ms/ntdll.mak
13perl util/mk1mf.pl Mingw32 >ms/mingw32.mak
14perl util/mk1mf.pl Mingw32-files >ms/mingw32f.mak
13 15
14perl util/mkdef.pl 16 libeay > ms/libeay16.def 16perl util/mkdef.pl 16 libeay > ms/libeay16.def
15perl util/mkdef.pl 32 libeay > ms/libeay32.def 17perl 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
5TOP=$1
6shift
7
8cp Makefile.ssl Makefile.save
9makedepend -f Makefile.ssl $@
10$TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new
11mv 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
580X509_NAME_print 586 580X509_NAME_print 586
581X509_NAME_set 587 581X509_NAME_set 587
582X509_OBJECT_free_contents 588 582X509_OBJECT_free_contents 588
583X509_OBJECT_retrive_by_subject 589 583X509_OBJECT_retrieve_by_subject 589
584X509_OBJECT_up_ref_count 590 584X509_OBJECT_up_ref_count 590
585X509_PKEY_free 591 585X509_PKEY_free 591
586X509_PKEY_new 592 586X509_PKEY_new 592
@@ -695,12 +695,12 @@ a2i_ASN1_INTEGER 700
695a2i_ASN1_STRING 701 695a2i_ASN1_STRING 701
696asn1_Finish 702 696asn1_Finish 702
697asn1_GetSequence 703 697asn1_GetSequence 703
698bn_div64 704 698bn_div_words 704
699bn_expand2 705 699bn_expand2 705
700bn_mul_add_words 706 700bn_mul_add_words 706
701bn_mul_words 707 701bn_mul_words 707
702bn_qadd 708 702BN_uadd 708
703bn_qsub 709 703BN_usub 709
704bn_sqr_words 710 704bn_sqr_words 710
705crypt 711 705crypt 711
706d2i_ASN1_BIT_STRING 712 706d2i_ASN1_BIT_STRING 712
@@ -1063,3 +1063,784 @@ EVP_rc5_32_12_16_cfb 1088
1063EVP_rc5_32_12_16_ecb 1089 1063EVP_rc5_32_12_16_ecb 1089
1064EVP_rc5_32_12_16_ofb 1090 1064EVP_rc5_32_12_16_ofb 1090
1065asn1_add_error 1091 1065asn1_add_error 1091
1066d2i_ASN1_BMPSTRING 1092
1067i2d_ASN1_BMPSTRING 1093
1068BIO_f_ber 1094
1069BN_init 1095
1070COMP_CTX_new 1096
1071COMP_CTX_free 1097
1072COMP_CTX_compress_block 1098
1073COMP_CTX_expand_block 1099
1074X509_STORE_CTX_get_ex_new_index 1100
1075OBJ_NAME_add 1101
1076BIO_socket_nbio 1102
1077EVP_rc2_64_cbc 1103
1078OBJ_NAME_cleanup 1104
1079OBJ_NAME_get 1105
1080OBJ_NAME_init 1106
1081OBJ_NAME_new_index 1107
1082OBJ_NAME_remove 1108
1083BN_MONT_CTX_copy 1109
1084BIO_new_socks4a_connect 1110
1085BIO_s_socks4a_connect 1111
1086PROXY_set_connect_mode 1112
1087RAND_SSLeay 1113
1088RAND_set_rand_method 1114
1089RSA_memory_lock 1115
1090bn_sub_words 1116
1091bn_mul_normal 1117
1092bn_mul_comba8 1118
1093bn_mul_comba4 1119
1094bn_sqr_normal 1120
1095bn_sqr_comba8 1121
1096bn_sqr_comba4 1122
1097bn_cmp_words 1123
1098bn_mul_recursive 1124
1099bn_mul_part_recursive 1125
1100bn_sqr_recursive 1126
1101bn_mul_low_normal 1127
1102BN_RECP_CTX_init 1128
1103BN_RECP_CTX_new 1129
1104BN_RECP_CTX_free 1130
1105BN_RECP_CTX_set 1131
1106BN_mod_mul_reciprocal 1132
1107BN_mod_exp_recp 1133
1108BN_div_recp 1134
1109BN_CTX_init 1135
1110BN_MONT_CTX_init 1136
1111RAND_get_rand_method 1137
1112PKCS7_add_attribute 1138
1113PKCS7_add_signed_attribute 1139
1114PKCS7_digest_from_attributes 1140
1115PKCS7_get_attribute 1141
1116PKCS7_get_issuer_and_serial 1142
1117PKCS7_get_signed_attribute 1143
1118COMP_compress_block 1144
1119COMP_expand_block 1145
1120COMP_rle 1146
1121COMP_zlib 1147
1122ms_time_diff 1148
1123ms_time_new 1149
1124ms_time_free 1150
1125ms_time_cmp 1151
1126ms_time_get 1152
1127PKCS7_set_attributes 1153
1128PKCS7_set_signed_attributes 1154
1129X509_ATTRIBUTE_create 1155
1130X509_ATTRIBUTE_dup 1156
1131ASN1_GENERALIZEDTIME_check 1157
1132ASN1_GENERALIZEDTIME_print 1158
1133ASN1_GENERALIZEDTIME_set 1159
1134ASN1_GENERALIZEDTIME_set_string 1160
1135ASN1_TIME_print 1161
1136BASIC_CONSTRAINTS_free 1162
1137BASIC_CONSTRAINTS_new 1163
1138ERR_load_X509V3_strings 1164
1139NETSCAPE_CERT_SEQUENCE_free 1165
1140NETSCAPE_CERT_SEQUENCE_new 1166
1141OBJ_txt2obj 1167
1142PEM_read_NETSCAPE_CERT_SEQUENCE 1168
1143PEM_read_bio_NETSCAPE_CERT_SEQUENCE 1169
1144PEM_write_NETSCAPE_CERT_SEQUENCE 1170
1145PEM_write_bio_NETSCAPE_CERT_SEQUENCE 1171
1146X509V3_EXT_add 1172
1147X509V3_EXT_add_alias 1173
1148X509V3_EXT_add_conf 1174
1149X509V3_EXT_cleanup 1175
1150X509V3_EXT_conf 1176
1151X509V3_EXT_conf_nid 1177
1152X509V3_EXT_get 1178
1153X509V3_EXT_get_nid 1179
1154X509V3_EXT_print 1180
1155X509V3_EXT_print_fp 1181
1156X509V3_add_standard_extensions 1182
1157X509V3_add_value 1183
1158X509V3_add_value_bool 1184
1159X509V3_add_value_int 1185
1160X509V3_conf_free 1186
1161X509V3_get_value_bool 1187
1162X509V3_get_value_int 1188
1163X509V3_parse_list 1189
1164d2i_ASN1_GENERALIZEDTIME 1190
1165d2i_ASN1_TIME 1191
1166d2i_BASIC_CONSTRAINTS 1192
1167d2i_NETSCAPE_CERT_SEQUENCE 1193
1168d2i_ext_ku 1194
1169ext_ku_free 1195
1170ext_ku_new 1196
1171i2d_ASN1_GENERALIZEDTIME 1197
1172i2d_ASN1_TIME 1198
1173i2d_BASIC_CONSTRAINTS 1199
1174i2d_NETSCAPE_CERT_SEQUENCE 1200
1175i2d_ext_ku 1201
1176EVP_MD_CTX_copy 1202
1177i2d_ASN1_ENUMERATED 1203
1178d2i_ASN1_ENUMERATED 1204
1179ASN1_ENUMERATED_set 1205
1180ASN1_ENUMERATED_get 1206
1181BN_to_ASN1_ENUMERATED 1207
1182ASN1_ENUMERATED_to_BN 1208
1183i2a_ASN1_ENUMERATED 1209
1184a2i_ASN1_ENUMERATED 1210
1185i2d_GENERAL_NAME 1211
1186d2i_GENERAL_NAME 1212
1187GENERAL_NAME_new 1213
1188GENERAL_NAME_free 1214
1189GENERAL_NAMES_new 1215
1190GENERAL_NAMES_free 1216
1191d2i_GENERAL_NAMES 1217
1192i2d_GENERAL_NAMES 1218
1193i2v_GENERAL_NAMES 1219
1194i2s_ASN1_OCTET_STRING 1220
1195s2i_ASN1_OCTET_STRING 1221
1196X509V3_EXT_check_conf 1222
1197hex_to_string 1223
1198string_to_hex 1224
1199des_ede3_cbcm_encrypt 1225
1200RSA_padding_add_PKCS1_OAEP 1226
1201RSA_padding_check_PKCS1_OAEP 1227
1202X509_CRL_print_fp 1228
1203X509_CRL_print 1229
1204i2v_GENERAL_NAME 1230
1205v2i_GENERAL_NAME 1231
1206i2d_PKEY_USAGE_PERIOD 1232
1207d2i_PKEY_USAGE_PERIOD 1233
1208PKEY_USAGE_PERIOD_new 1234
1209PKEY_USAGE_PERIOD_free 1235
1210v2i_GENERAL_NAMES 1236
1211i2s_ASN1_INTEGER 1237
1212X509V3_EXT_d2i 1238
1213name_cmp 1239
1214str_dup 1240
1215i2s_ASN1_ENUMERATED 1241
1216i2s_ASN1_ENUMERATED_TABLE 1242
1217BIO_s_log 1243
1218BIO_f_reliable 1244
1219PKCS7_dataFinal 1245
1220PKCS7_dataDecode 1246
1221X509V3_EXT_CRL_add_conf 1247
1222BN_set_params 1248
1223BN_get_params 1249
1224BIO_get_ex_num 1250
1225BIO_set_ex_free_func 1251
1226EVP_ripemd160 1252
1227ASN1_TIME_set 1253
1228i2d_AUTHORITY_KEYID 1254
1229d2i_AUTHORITY_KEYID 1255
1230AUTHORITY_KEYID_new 1256
1231AUTHORITY_KEYID_free 1257
1232ASN1_seq_unpack 1258
1233ASN1_seq_pack 1259
1234ASN1_unpack_string 1260
1235ASN1_pack_string 1261
1236PKCS12_pack_safebag 1262
1237PKCS12_MAKE_KEYBAG 1263
1238PKCS8_encrypt 1264
1239PKCS12_MAKE_SHKEYBAG 1265
1240PKCS12_pack_p7data 1266
1241PKCS12_pack_p7encdata 1267
1242PKCS12_add_localkeyid 1268
1243PKCS12_add_friendlyname_asc 1269
1244PKCS12_add_friendlyname_uni 1270
1245PKCS12_get_friendlyname 1271
1246PKCS12_pbe_crypt 1272
1247PKCS12_decrypt_d2i 1273
1248PKCS12_i2d_encrypt 1274
1249PKCS12_init 1275
1250PKCS12_key_gen_asc 1276
1251PKCS12_key_gen_uni 1277
1252PKCS12_gen_mac 1278
1253PKCS12_verify_mac 1279
1254PKCS12_set_mac 1280
1255PKCS12_setup_mac 1281
1256asc2uni 1282
1257uni2asc 1283
1258i2d_PKCS12_BAGS 1284
1259PKCS12_BAGS_new 1285
1260d2i_PKCS12_BAGS 1286
1261PKCS12_BAGS_free 1287
1262i2d_PKCS12 1288
1263d2i_PKCS12 1289
1264PKCS12_new 1290
1265PKCS12_free 1291
1266i2d_PKCS12_MAC_DATA 1292
1267PKCS12_MAC_DATA_new 1293
1268d2i_PKCS12_MAC_DATA 1294
1269PKCS12_MAC_DATA_free 1295
1270i2d_PKCS12_SAFEBAG 1296
1271PKCS12_SAFEBAG_new 1297
1272d2i_PKCS12_SAFEBAG 1298
1273PKCS12_SAFEBAG_free 1299
1274ERR_load_PKCS12_strings 1300
1275PKCS12_PBE_add 1301
1276PKCS8_add_keyusage 1302
1277PKCS12_get_attr_gen 1303
1278PKCS12_parse 1304
1279PKCS12_create 1305
1280i2d_PKCS12_bio 1306
1281i2d_PKCS12_fp 1307
1282d2i_PKCS12_bio 1308
1283d2i_PKCS12_fp 1309
1284i2d_PBEPARAM 1310
1285PBEPARAM_new 1311
1286d2i_PBEPARAM 1312
1287PBEPARAM_free 1313
1288i2d_PKCS8_PRIV_KEY_INFO 1314
1289PKCS8_PRIV_KEY_INFO_new 1315
1290d2i_PKCS8_PRIV_KEY_INFO 1316
1291PKCS8_PRIV_KEY_INFO_free 1317
1292EVP_PKCS82PKEY 1318
1293EVP_PKEY2PKCS8 1319
1294PKCS8_set_broken 1320
1295EVP_PBE_ALGOR_CipherInit 1321
1296EVP_PBE_alg_add 1322
1297PKCS5_pbe_set 1323
1298EVP_PBE_cleanup 1324
1299i2d_SXNET 1325
1300d2i_SXNET 1326
1301SXNET_new 1327
1302SXNET_free 1328
1303i2d_SXNETID 1329
1304d2i_SXNETID 1330
1305SXNETID_new 1331
1306SXNETID_free 1332
1307DSA_SIG_new 1333
1308DSA_SIG_free 1334
1309DSA_do_sign 1335
1310DSA_do_verify 1336
1311d2i_DSA_SIG 1337
1312i2d_DSA_SIG 1338
1313
1314i2d_ASN1_VISIBLESTRING 1339
1315d2i_ASN1_VISIBLESTRING 1340
1316i2d_ASN1_UTF8STRING 1341
1317d2i_ASN1_UTF8STRING 1342
1318i2d_DIRECTORYSTRING 1343
1319d2i_DIRECTORYSTRING 1344
1320i2d_DISPLAYTEXT 1345
1321d2i_DISPLAYTEXT 1346
1322sk_X509_NAME_new 1347
1323sk_X509_NAME_new_null 1348
1324sk_X509_NAME_free 1349
1325sk_X509_NAME_num 1350
1326sk_X509_NAME_value 1351
1327sk_X509_NAME_set 1352
1328sk_X509_NAME_zero 1353
1329sk_X509_NAME_push 1354
1330sk_X509_NAME_pop 1355
1331sk_X509_NAME_find 1356
1332sk_X509_NAME_delete 1357
1333sk_X509_NAME_delete_ptr 1358
1334sk_X509_NAME_set_cmp_func 1359
1335sk_X509_NAME_dup 1360
1336sk_X509_NAME_pop_free 1361
1337sk_X509_NAME_shift 1362
1338sk_X509_new 1363
1339sk_X509_new_null 1364
1340sk_X509_free 1365
1341sk_X509_num 1366
1342sk_X509_value 1367
1343sk_X509_set 1368
1344sk_X509_zero 1369
1345sk_X509_push 1370
1346sk_X509_pop 1371
1347sk_X509_find 1372
1348sk_X509_delete 1373
1349sk_X509_delete_ptr 1374
1350sk_X509_set_cmp_func 1375
1351sk_X509_dup 1376
1352sk_X509_pop_free 1377
1353sk_X509_shift 1378
1354d2i_ASN1_SET_OF_X509 1379
1355i2d_ASN1_SET_OF_X509 1380
1356sk_X509_ATTRIBUTE_new 1381
1357sk_X509_ATTRIBUTE_new_null 1382
1358sk_X509_ATTRIBUTE_free 1383
1359sk_X509_ATTRIBUTE_num 1384
1360sk_X509_ATTRIBUTE_value 1385
1361sk_X509_ATTRIBUTE_set 1386
1362sk_X509_ATTRIBUTE_zero 1387
1363sk_X509_ATTRIBUTE_push 1388
1364sk_X509_ATTRIBUTE_pop 1389
1365sk_X509_ATTRIBUTE_find 1390
1366sk_X509_ATTRIBUTE_delete 1391
1367sk_X509_ATTRIBUTE_delete_ptr 1392
1368sk_X509_ATTRIBUTE_set_cmp_func 1393
1369sk_X509_ATTRIBUTE_dup 1394
1370sk_X509_ATTRIBUTE_pop_free 1395
1371sk_X509_ATTRIBUTE_shift 1396
1372i2d_PBKDF2PARAM 1397
1373PBKDF2PARAM_new 1398
1374d2i_PBKDF2PARAM 1399
1375PBKDF2PARAM_free 1400
1376i2d_PBE2PARAM 1401
1377PBE2PARAM_new 1402
1378d2i_PBE2PARAM 1403
1379PBE2PARAM_free 1404
1380sk_GENERAL_NAME_new 1405
1381sk_GENERAL_NAME_new_null 1406
1382sk_GENERAL_NAME_free 1407
1383sk_GENERAL_NAME_num 1408
1384sk_GENERAL_NAME_value 1409
1385sk_GENERAL_NAME_set 1410
1386sk_GENERAL_NAME_zero 1411
1387sk_GENERAL_NAME_push 1412
1388sk_GENERAL_NAME_pop 1413
1389sk_GENERAL_NAME_find 1414
1390sk_GENERAL_NAME_delete 1415
1391sk_GENERAL_NAME_delete_ptr 1416
1392sk_GENERAL_NAME_set_cmp_func 1417
1393sk_GENERAL_NAME_dup 1418
1394sk_GENERAL_NAME_pop_free 1419
1395sk_GENERAL_NAME_shift 1420
1396d2i_ASN1_SET_OF_GENERAL_NAME 1421
1397i2d_ASN1_SET_OF_GENERAL_NAME 1422
1398sk_SXNETID_new 1423
1399sk_SXNETID_new_null 1424
1400sk_SXNETID_free 1425
1401sk_SXNETID_num 1426
1402sk_SXNETID_value 1427
1403sk_SXNETID_set 1428
1404sk_SXNETID_zero 1429
1405sk_SXNETID_push 1430
1406sk_SXNETID_pop 1431
1407sk_SXNETID_find 1432
1408sk_SXNETID_delete 1433
1409sk_SXNETID_delete_ptr 1434
1410sk_SXNETID_set_cmp_func 1435
1411sk_SXNETID_dup 1436
1412sk_SXNETID_pop_free 1437
1413sk_SXNETID_shift 1438
1414d2i_ASN1_SET_OF_SXNETID 1439
1415i2d_ASN1_SET_OF_SXNETID 1440
1416sk_POLICYQUALINFO_new 1441
1417sk_POLICYQUALINFO_new_null 1442
1418sk_POLICYQUALINFO_free 1443
1419sk_POLICYQUALINFO_num 1444
1420sk_POLICYQUALINFO_value 1445
1421sk_POLICYQUALINFO_set 1446
1422sk_POLICYQUALINFO_zero 1447
1423sk_POLICYQUALINFO_push 1448
1424sk_POLICYQUALINFO_pop 1449
1425sk_POLICYQUALINFO_find 1450
1426sk_POLICYQUALINFO_delete 1451
1427sk_POLICYQUALINFO_delete_ptr 1452
1428sk_POLICYQUALINFO_set_cmp_func 1453
1429sk_POLICYQUALINFO_dup 1454
1430sk_POLICYQUALINFO_pop_free 1455
1431sk_POLICYQUALINFO_shift 1456
1432d2i_ASN1_SET_OF_POLICYQUALINFO 1457
1433i2d_ASN1_SET_OF_POLICYQUALINFO 1458
1434sk_POLICYINFO_new 1459
1435sk_POLICYINFO_new_null 1460
1436sk_POLICYINFO_free 1461
1437sk_POLICYINFO_num 1462
1438sk_POLICYINFO_value 1463
1439sk_POLICYINFO_set 1464
1440sk_POLICYINFO_zero 1465
1441sk_POLICYINFO_push 1466
1442sk_POLICYINFO_pop 1467
1443sk_POLICYINFO_find 1468
1444sk_POLICYINFO_delete 1469
1445sk_POLICYINFO_delete_ptr 1470
1446sk_POLICYINFO_set_cmp_func 1471
1447sk_POLICYINFO_dup 1472
1448sk_POLICYINFO_pop_free 1473
1449sk_POLICYINFO_shift 1474
1450d2i_ASN1_SET_OF_POLICYINFO 1475
1451i2d_ASN1_SET_OF_POLICYINFO 1476
1452SXNET_add_id_asc 1477
1453SXNET_add_id_ulong 1478
1454SXNET_add_id_INTEGER 1479
1455SXNET_get_id_asc 1480
1456SXNET_get_id_ulong 1481
1457SXNET_get_id_INTEGER 1482
1458X509V3_set_conf_lhash 1483
1459i2d_CERTIFICATEPOLICIES 1484
1460CERTIFICATEPOLICIES_new 1485
1461CERTIFICATEPOLICIES_free 1486
1462d2i_CERTIFICATEPOLICIES 1487
1463i2d_POLICYINFO 1488
1464POLICYINFO_new 1489
1465d2i_POLICYINFO 1490
1466POLICYINFO_free 1491
1467i2d_POLICYQUALINFO 1492
1468POLICYQUALINFO_new 1493
1469d2i_POLICYQUALINFO 1494
1470POLICYQUALINFO_free 1495
1471i2d_USERNOTICE 1496
1472USERNOTICE_new 1497
1473d2i_USERNOTICE 1498
1474USERNOTICE_free 1499
1475i2d_NOTICEREF 1500
1476NOTICEREF_new 1501
1477d2i_NOTICEREF 1502
1478NOTICEREF_free 1503
1479X509V3_get_string 1504
1480X509V3_get_section 1505
1481X509V3_string_free 1506
1482X509V3_section_free 1507
1483X509V3_set_ctx 1508
1484s2i_ASN1_INTEGER 1509
1485CRYPTO_set_locked_mem_functions 1510
1486CRYPTO_get_locked_mem_functions 1511
1487CRYPTO_malloc_locked 1512
1488CRYPTO_free_locked 1513
1489BN_mod_exp2_mont 1514
1490ERR_get_error_line_data 1515
1491ERR_peek_error_line_data 1516
1492PKCS12_PBE_keyivgen 1517
1493X509_ALGOR_dup 1518
1494sk_DIST_POINT_new 1519
1495sk_DIST_POINT_new_null 1520
1496sk_DIST_POINT_free 1521
1497sk_DIST_POINT_num 1522
1498sk_DIST_POINT_value 1523
1499sk_DIST_POINT_set 1524
1500sk_DIST_POINT_zero 1525
1501sk_DIST_POINT_push 1526
1502sk_DIST_POINT_pop 1527
1503sk_DIST_POINT_find 1528
1504sk_DIST_POINT_delete 1529
1505sk_DIST_POINT_delete_ptr 1530
1506sk_DIST_POINT_set_cmp_func 1531
1507sk_DIST_POINT_dup 1532
1508sk_DIST_POINT_pop_free 1533
1509sk_DIST_POINT_shift 1534
1510d2i_ASN1_SET_OF_DIST_POINT 1535
1511i2d_ASN1_SET_OF_DIST_POINT 1536
1512i2d_CRL_DIST_POINTS 1537
1513CRL_DIST_POINTS_new 1538
1514CRL_DIST_POINTS_free 1539
1515d2i_CRL_DIST_POINTS 1540
1516i2d_DIST_POINT 1541
1517DIST_POINT_new 1542
1518d2i_DIST_POINT 1543
1519DIST_POINT_free 1544
1520i2d_DIST_POINT_NAME 1545
1521DIST_POINT_NAME_new 1546
1522DIST_POINT_NAME_free 1547
1523d2i_DIST_POINT_NAME 1548
1524X509V3_add_value_uchar 1549
1525sk_X509_INFO_new 1550
1526sk_X509_EXTENSION_new 1551
1527sk_X509_NAME_ENTRY_unshift 1552
1528sk_ASN1_TYPE_value 1553
1529sk_X509_EXTENSION_find 1554
1530d2i_ASN1_SET_OF_X509_ATTRIBUTE 1555
1531sk_ASN1_TYPE_pop 1556
1532sk_X509_EXTENSION_set_cmp_func 1557
1533sk_ASN1_TYPE_new_null 1558
1534sk_X509_NAME_ENTRY_delete 1559
1535i2d_ASN1_SET_OF_ASN1_TYPE 1560
1536sk_X509_NAME_ENTRY_dup 1561
1537sk_X509_unshift 1562
1538sk_X509_NAME_unshift 1563
1539sk_ASN1_TYPE_num 1564
1540sk_X509_EXTENSION_new_null 1565
1541sk_X509_INFO_value 1566
1542d2i_ASN1_SET_OF_X509_EXTENSION 1567
1543sk_X509_INFO_delete_ptr 1568
1544sk_X509_NAME_ENTRY_new 1569
1545sk_DIST_POINT_insert 1570
1546sk_ASN1_TYPE_set_cmp_func 1571
1547sk_X509_EXTENSION_value 1572
1548sk_DIST_POINT_unshift 1573
1549d2i_ASN1_SET_OF_X509_NAME_ENTRY 1574
1550sk_X509_INFO_pop 1575
1551sk_X509_EXTENSION_pop 1576
1552sk_X509_NAME_ENTRY_shift 1577
1553sk_X509_INFO_num 1578
1554sk_X509_EXTENSION_num 1579
1555sk_X509_INFO_pop_free 1580
1556sk_POLICYQUALINFO_unshift 1581
1557sk_POLICYINFO_unshift 1582
1558sk_X509_NAME_ENTRY_new_null 1583
1559sk_X509_NAME_ENTRY_pop 1584
1560sk_X509_ATTRIBUTE_unshift 1585
1561sk_X509_NAME_ENTRY_num 1586
1562sk_GENERAL_NAME_unshift 1587
1563sk_X509_INFO_free 1588
1564d2i_ASN1_SET_OF_ASN1_TYPE 1589
1565sk_X509_INFO_insert 1590
1566sk_X509_NAME_ENTRY_value 1591
1567sk_POLICYQUALINFO_insert 1592
1568sk_ASN1_TYPE_set 1593
1569sk_X509_EXTENSION_delete_ptr 1594
1570sk_X509_INFO_unshift 1595
1571sk_ASN1_TYPE_unshift 1596
1572sk_ASN1_TYPE_free 1597
1573sk_ASN1_TYPE_delete_ptr 1598
1574sk_ASN1_TYPE_pop_free 1599
1575sk_X509_EXTENSION_unshift 1600
1576sk_X509_EXTENSION_pop_free 1601
1577sk_X509_NAME_ENTRY_set_cmp_func 1602
1578sk_ASN1_TYPE_insert 1603
1579sk_X509_NAME_ENTRY_free 1604
1580sk_SXNETID_insert 1605
1581sk_X509_NAME_insert 1606
1582sk_X509_insert 1607
1583sk_X509_INFO_delete 1608
1584sk_X509_INFO_set_cmp_func 1609
1585sk_X509_ATTRIBUTE_insert 1610
1586sk_X509_INFO_zero 1611
1587sk_X509_INFO_set 1612
1588sk_X509_EXTENSION_set 1613
1589sk_X509_EXTENSION_free 1614
1590i2d_ASN1_SET_OF_X509_ATTRIBUTE 1615
1591sk_SXNETID_unshift 1616
1592sk_X509_INFO_push 1617
1593sk_X509_EXTENSION_insert 1618
1594sk_X509_INFO_new_null 1619
1595sk_ASN1_TYPE_dup 1620
1596sk_X509_INFO_find 1621
1597sk_POLICYINFO_insert 1622
1598sk_ASN1_TYPE_zero 1623
1599i2d_ASN1_SET_OF_X509_EXTENSION 1624
1600sk_X509_NAME_ENTRY_set 1625
1601sk_ASN1_TYPE_push 1626
1602sk_X509_NAME_ENTRY_insert 1627
1603sk_ASN1_TYPE_new 1628
1604sk_GENERAL_NAME_insert 1629
1605sk_ASN1_TYPE_shift 1630
1606sk_ASN1_TYPE_delete 1631
1607sk_X509_NAME_ENTRY_pop_free 1632
1608i2d_ASN1_SET_OF_X509_NAME_ENTRY 1633
1609sk_X509_NAME_ENTRY_zero 1634
1610sk_ASN1_TYPE_find 1635
1611sk_X509_NAME_ENTRY_delete_ptr 1636
1612sk_X509_NAME_ENTRY_push 1637
1613sk_X509_EXTENSION_zero 1638
1614sk_X509_INFO_shift 1639
1615sk_X509_INFO_dup 1640
1616sk_X509_EXTENSION_dup 1641
1617sk_X509_EXTENSION_delete 1642
1618sk_X509_EXTENSION_shift 1643
1619sk_X509_EXTENSION_push 1644
1620sk_X509_NAME_ENTRY_find 1645
1621X509V3_EXT_i2d 1646
1622X509V3_EXT_val_prn 1647
1623X509V3_EXT_add_list 1648
1624EVP_CIPHER_type 1649
1625EVP_PBE_CipherInit 1650
1626X509V3_add_value_bool_nf 1651
1627d2i_ASN1_UINTEGER 1652
1628sk_value 1653
1629sk_num 1654
1630sk_set 1655
1631sk_X509_REVOKED_set_cmp_func 1656
1632sk_X509_REVOKED_unshift 1657
1633sk_X509_REVOKED_dup 1658
1634sk_X509_REVOKED_free 1659
1635sk_X509_REVOKED_new 1660
1636i2d_ASN1_SET_OF_X509_REVOKED 1661
1637sk_X509_REVOKED_shift 1662
1638sk_X509_REVOKED_delete_ptr 1663
1639sk_X509_REVOKED_pop_free 1664
1640sk_X509_REVOKED_insert 1665
1641sk_X509_REVOKED_zero 1666
1642sk_X509_REVOKED_pop 1667
1643sk_X509_REVOKED_value 1668
1644sk_X509_REVOKED_num 1669
1645sk_X509_REVOKED_push 1670
1646sk_sort 1671
1647sk_X509_REVOKED_find 1672
1648sk_X509_REVOKED_delete 1673
1649d2i_ASN1_SET_OF_X509_REVOKED 1674
1650sk_X509_REVOKED_new_null 1675
1651sk_X509_REVOKED_set 1676
1652sk_X509_ALGOR_new 1677
1653sk_X509_CRL_set_cmp_func 1678
1654sk_X509_CRL_set 1679
1655sk_X509_ALGOR_unshift 1680
1656sk_X509_CRL_free 1681
1657i2d_ASN1_SET_OF_X509_ALGOR 1682
1658sk_X509_ALGOR_pop 1683
1659sk_X509_CRL_unshift 1684
1660i2d_ASN1_SET_OF_X509_CRL 1685
1661sk_X509_ALGOR_num 1686
1662sk_X509_CRL_insert 1687
1663sk_X509_CRL_pop_free 1688
1664sk_X509_CRL_delete_ptr 1689
1665sk_X509_ALGOR_insert 1690
1666sk_X509_CRL_dup 1691
1667sk_X509_CRL_zero 1692
1668sk_X509_CRL_new 1693
1669sk_X509_CRL_push 1694
1670sk_X509_ALGOR_new_null 1695
1671d2i_ASN1_SET_OF_X509_ALGOR 1696
1672sk_X509_CRL_shift 1697
1673sk_X509_CRL_find 1698
1674sk_X509_CRL_delete 1699
1675sk_X509_ALGOR_free 1700
1676sk_X509_ALGOR_delete 1701
1677d2i_ASN1_SET_OF_X509_CRL 1702
1678sk_X509_ALGOR_delete_ptr 1703
1679sk_X509_CRL_pop 1704
1680sk_X509_ALGOR_set 1705
1681sk_X509_CRL_num 1706
1682sk_X509_CRL_value 1707
1683sk_X509_ALGOR_shift 1708
1684sk_X509_ALGOR_zero 1709
1685sk_X509_CRL_new_null 1710
1686sk_X509_ALGOR_push 1711
1687sk_X509_ALGOR_value 1712
1688sk_X509_ALGOR_find 1713
1689sk_X509_ALGOR_set_cmp_func 1714
1690sk_X509_ALGOR_dup 1715
1691sk_X509_ALGOR_pop_free 1716
1692sk_PKCS7_SIGNER_INFO_new 1717
1693sk_PKCS7_SIGNER_INFO_zero 1718
1694sk_PKCS7_SIGNER_INFO_unshift 1719
1695sk_PKCS7_RECIP_INFO_dup 1720
1696sk_PKCS7_SIGNER_INFO_insert 1721
1697sk_PKCS7_SIGNER_INFO_push 1722
1698i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO 1723
1699sk_PKCS7_RECIP_INFO_new 1724
1700sk_X509_LOOKUP_new_null 1725
1701sk_PKCS7_SIGNER_INFO_find 1726
1702sk_PKCS7_SIGNER_INFO_set_cmp_func 1727
1703sk_X509_LOOKUP_zero 1728
1704sk_PKCS7_RECIP_INFO_shift 1729
1705sk_PKCS7_RECIP_INFO_new_null 1730
1706sk_PKCS7_SIGNER_INFO_shift 1731
1707sk_PKCS7_SIGNER_INFO_pop 1732
1708sk_PKCS7_SIGNER_INFO_pop_free 1733
1709sk_X509_LOOKUP_push 1734
1710sk_X509_LOOKUP_dup 1735
1711sk_PKCS7_SIGNER_INFO_num 1736
1712sk_X509_LOOKUP_find 1737
1713i2d_ASN1_SET_OF_PKCS7_RECIP_INFO 1738
1714sk_X509_LOOKUP_new 1739
1715sk_PKCS7_SIGNER_INFO_delete 1740
1716sk_PKCS7_RECIP_INFO_set_cmp_func 1741
1717sk_PKCS7_SIGNER_INFO_delete_ptr 1742
1718sk_PKCS7_RECIP_INFO_pop 1743
1719sk_X509_LOOKUP_insert 1744
1720sk_PKCS7_RECIP_INFO_value 1745
1721sk_PKCS7_RECIP_INFO_num 1746
1722sk_PKCS7_SIGNER_INFO_value 1747
1723d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO 1748
1724sk_X509_LOOKUP_pop 1749
1725sk_X509_LOOKUP_num 1750
1726sk_X509_LOOKUP_delete 1751
1727sk_PKCS7_RECIP_INFO_free 1752
1728d2i_ASN1_SET_OF_PKCS7_RECIP_INFO 1753
1729sk_PKCS7_SIGNER_INFO_set 1754
1730sk_X509_LOOKUP_pop_free 1755
1731sk_X509_LOOKUP_shift 1756
1732sk_X509_LOOKUP_unshift 1757
1733sk_PKCS7_SIGNER_INFO_new_null 1758
1734sk_PKCS7_RECIP_INFO_delete_ptr 1759
1735sk_PKCS7_RECIP_INFO_pop_free 1760
1736sk_PKCS7_RECIP_INFO_insert 1761
1737sk_PKCS7_SIGNER_INFO_free 1762
1738sk_PKCS7_RECIP_INFO_set 1763
1739sk_PKCS7_RECIP_INFO_zero 1764
1740sk_X509_LOOKUP_value 1765
1741sk_PKCS7_RECIP_INFO_push 1766
1742sk_PKCS7_RECIP_INFO_unshift 1767
1743sk_X509_LOOKUP_set_cmp_func 1768
1744sk_X509_LOOKUP_free 1769
1745sk_PKCS7_SIGNER_INFO_dup 1770
1746sk_X509_LOOKUP_delete_ptr 1771
1747sk_X509_LOOKUP_set 1772
1748sk_PKCS7_RECIP_INFO_find 1773
1749sk_PKCS7_RECIP_INFO_delete 1774
1750PKCS5_PBE_add 1775
1751PEM_write_bio_PKCS8 1776
1752i2d_PKCS8_fp 1777
1753PEM_read_bio_PKCS8_PRIV_KEY_INFO 1778
1754d2i_PKCS8_bio 1779
1755d2i_PKCS8_PRIV_KEY_INFO_fp 1780
1756PEM_write_bio_PKCS8_PRIV_KEY_INFO 1781
1757PEM_read_PKCS8 1782
1758d2i_PKCS8_PRIV_KEY_INFO_bio 1783
1759d2i_PKCS8_fp 1784
1760PEM_write_PKCS8 1785
1761PEM_read_PKCS8_PRIV_KEY_INFO 1786
1762PEM_read_bio_PKCS8 1787
1763PEM_write_PKCS8_PRIV_KEY_INFO 1788
1764PKCS5_PBE_keyivgen 1789
1765i2d_PKCS8_bio 1790
1766i2d_PKCS8_PRIV_KEY_INFO_fp 1791
1767i2d_PKCS8_PRIV_KEY_INFO_bio 1792
1768BIO_s_bio 1793
1769PKCS5_pbe2_set 1794
1770PKCS5_PBKDF2_HMAC_SHA1 1795
1771PKCS5_v2_PBE_keyivgen 1796
1772PEM_write_bio_PKCS8PrivateKey 1797
1773PEM_write_PKCS8PrivateKey 1798
1774BIO_ctrl_get_read_request 1799
1775BIO_ctrl_pending 1800
1776BIO_ctrl_wpending 1801
1777BIO_new_bio_pair 1802
1778BIO_ctrl_get_write_guarantee 1803
1779CRYPTO_num_locks 1804
1780CONF_load_bio 1805
1781CONF_load_fp 1806
1782sk_CONF_VALUE_delete 1807
1783sk_CONF_VALUE_pop 1808
1784sk_CONF_VALUE_num 1809
1785sk_CONF_VALUE_pop_free 1810
1786sk_CONF_VALUE_free 1811
1787sk_CONF_VALUE_shift 1812
1788sk_CONF_VALUE_unshift 1813
1789sk_CONF_VALUE_value 1814
1790sk_CONF_VALUE_set 1815
1791sk_CONF_VALUE_zero 1816
1792sk_CONF_VALUE_push 1817
1793sk_CONF_VALUE_delete_ptr 1818
1794sk_CONF_VALUE_find 1819
1795sk_CONF_VALUE_set_cmp_func 1820
1796sk_CONF_VALUE_new_null 1821
1797sk_CONF_VALUE_dup 1822
1798sk_CONF_VALUE_insert 1823
1799sk_CONF_VALUE_new 1824
1800sk_ASN1_OBJECT_find 1825
1801sk_ASN1_OBJECT_pop_free 1826
1802sk_ASN1_OBJECT_dup 1827
1803sk_ASN1_OBJECT_delete_ptr 1828
1804sk_ASN1_OBJECT_new 1829
1805sk_ASN1_OBJECT_unshift 1830
1806sk_ASN1_OBJECT_delete 1831
1807sk_ASN1_OBJECT_shift 1832
1808sk_ASN1_OBJECT_pop 1833
1809sk_ASN1_OBJECT_num 1834
1810sk_ASN1_OBJECT_value 1835
1811sk_ASN1_OBJECT_new_null 1836
1812i2d_ASN1_SET_OF_ASN1_OBJECT 1837
1813sk_ASN1_OBJECT_free 1838
1814sk_ASN1_OBJECT_set 1839
1815sk_ASN1_OBJECT_set_cmp_func 1840
1816sk_ASN1_OBJECT_zero 1841
1817sk_ASN1_OBJECT_insert 1842
1818sk_ASN1_OBJECT_push 1843
1819d2i_ASN1_SET_OF_ASN1_OBJECT 1844
1820PKCS7_signatureVerify 1845
1821RSA_set_method 1846
1822RSA_get_method 1847
1823RSA_get_default_method 1848
1824sk_CONF_VALUE_sort 1849
1825sk_X509_REVOKED_sort 1850
1826sk_X509_ATTRIBUTE_sort 1851
1827sk_X509_INFO_sort 1852
1828sk_POLICYINFO_sort 1853
1829sk_GENERAL_NAME_sort 1854
1830sk_X509_sort 1855
1831sk_X509_NAME_sort 1856
1832sk_ASN1_TYPE_sort 1857
1833sk_X509_ALGOR_sort 1858
1834sk_PKCS7_RECIP_INFO_sort 1859
1835sk_X509_NAME_ENTRY_sort 1860
1836sk_X509_EXTENSION_sort 1861
1837sk_SXNETID_sort 1862
1838sk_ASN1_OBJECT_sort 1863
1839sk_PKCS7_SIGNER_INFO_sort 1864
1840sk_X509_LOOKUP_sort 1865
1841sk_POLICYQUALINFO_sort 1866
1842sk_X509_CRL_sort 1867
1843sk_DIST_POINT_sort 1868
1844RSA_check_key 1869
1845OBJ_obj2txt 1870
1846DSA_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
12open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
13while(<IN>) {
14 $ssl_version=$1 if (/^VERSION=(.*)$/);
15 $OPTIONS=$1 if (/^OPTIONS=(.*)$/);
16 $INSTALLTOP=$1 if (/^INSTALLTOP=(.*$)/);
17}
18close(IN);
9 19
10$ssl_version="0.8.2"; 20die "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="";
29foreach (@ARGV) 43foreach (@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";
77and [options] can be one of 53and [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)
98EOF 75EOF
99 exit(1); 76 exit(1);
100 }
101 $type=$_;
102 } 77 }
78 $platform=$_;
79 }
80foreach (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
128push(@INC,"util/pl","pl"); 111push(@INC,"util/pl","pl");
129if ($type eq "VC-MSDOS") 112if ($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 }
135elsif ($type eq "VC-W31-16") 118elsif ($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 }
141elsif (($type eq "VC-W31-32") || ($type eq "VC-WIN16")) 124elsif (($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 }
147elsif (($type eq "VC-WIN32") || ($type eq "VC-NT")) 130elsif (($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 }
151elsif ($type eq "BC-NT") 135elsif ($platform eq "Mingw32")
136 {
137 require 'Mingw32.pl';
138 }
139elsif ($platform eq "Mingw32-files")
140 {
141 require 'Mingw32f.pl';
142 }
143elsif ($platform eq "BC-NT")
152 { 144 {
153 $bc=1; 145 $bc=1;
154 require 'BC-32.pl'; 146 require 'BC-32.pl';
155 } 147 }
156elsif ($type eq "BC-W31") 148elsif ($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 }
162elsif ($type eq "BC-Q16") 154elsif ($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 }
167elsif ($type eq "BC-MSDOS") 159elsif ($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 }
173elsif ($type eq "FreeBSD") 165elsif ($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 }
178elsif ($type eq "linux-elf") 170elsif ($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 }
176elsif ($platform eq "ultrix-mips")
177 {
178 require "unix.pl";
179 require "ultrix.pl";
180 $unix=1;
181 }
184else 182else
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
226if ($ranlib ne "")
227 {
228 $ranlib="\$(SRC_D)$o$ranlib";
229 }
230
231if ($msdos) 224if ($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";
258INSTALLTOP=$INSTALLTOP 251INSTALLTOP=$INSTALLTOP
259 252
260# Set your compiler options 253# Set your compiler options
254PLATFORM=$platform
261CC=$bin_dir${cc} 255CC=$bin_dir${cc}
262CFLAG=$cflags 256CFLAG=$cflags
263APP_CFLAG=$app_cflag 257APP_CFLAG=$app_cflag
@@ -269,18 +263,16 @@ SHLIB_EX_OBJ=$shlib_ex_obj
269# be added 263# be added
270EX_LIBS=$ex_libs 264EX_LIBS=$ex_libs
271 265
272# The SSLeay directory 266# The OpenSSL directory
273SRC_D=$src_dir 267SRC_D=$src_dir
274 268
275LINK=$link 269LINK=$link
276LFLAGS=$lflags 270LFLAGS=$lflags
277 271
278BN_MULW_OBJ=$bn_mulw_obj 272BN_ASM_OBJ=$bn_asm_obj
279BN_MULW_SRC=$bn_mulw_src 273BN_ASM_SRC=$bn_asm_src
280DES_ENC_OBJ=$des_enc_obj 274DES_ENC_OBJ=$des_enc_obj
281DES_ENC_SRC=$des_enc_src 275DES_ENC_SRC=$des_enc_src
282DES_CRYPT_OBJ=$des_crypt_obj
283DES_CRYPT_SRC=$des_crypt_src
284BF_ENC_OBJ=$bf_enc_obj 276BF_ENC_OBJ=$bf_enc_obj
285BF_ENC_SRC=$bf_enc_src 277BF_ENC_SRC=$bf_enc_src
286CAST_ENC_OBJ=$cast_enc_obj 278CAST_ENC_OBJ=$cast_enc_obj
@@ -302,11 +294,12 @@ OUT_D=$out_dir
302TMP_D=$tmp_dir 294TMP_D=$tmp_dir
303# The output directory for the header files 295# The output directory for the header files
304INC_D=$inc_dir 296INC_D=$inc_dir
297INCO_D=$inc_dir${o}openssl
305 298
306CP=$cp 299CP=$cp
307RM=$rm 300RM=$rm
308RANLIB=$ranlib 301RANLIB=$ranlib
309MKDIR=mkdir 302MKDIR=$mkdir
310MKLIB=$bin_dir$mklib 303MKLIB=$bin_dir$mklib
311MLFLAGS=$mlflags 304MLFLAGS=$mlflags
312ASM=$bin_dir$asm 305ASM=$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
318E_EXE=ssleay 311E_EXE=openssl
319SSL=$ssl 312SSL=$ssl
320CRYPTO=$crypto 313CRYPTO=$crypto
321RSAGLUE=$RSAglue 314RSAGLUE=$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#
326BIN_D=\$(OUT_D) 322BIN_D=\$(OUT_D)
327TEST_D=\$(OUT_D) 323TEST_D=\$(OUT_D)
328LIB_D=\$(OUT_D) 324LIB_D=\$(OUT_D)
@@ -337,8 +333,8 @@ O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp
337O_RSAGLUE= \$(LIB_D)$o$plib\$(RSAGLUE)$libp 333O_RSAGLUE= \$(LIB_D)$o$plib\$(RSAGLUE)$libp
338SO_SSL= $plib\$(SSL)$so_shlibp 334SO_SSL= $plib\$(SSL)$so_shlibp
339SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp 335SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp
340L_SSL= \$(LIB_D)$o\$(SSL)$libp 336L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp
341L_CRYPTO= \$(LIB_D)$o\$(CRYPTO)$libp 337L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp
342 338
343L_LIBS= \$(L_SSL) \$(L_CRYPTO) 339L_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)
357EOF 353EOF
358 354
359$rules=<<"EOF"; 355$rules=<<"EOF";
360all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INC_D) headers lib exe 356all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe
361 357
362banner: 358banner:
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
403EOF 403EOF
404
405my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
406$platform_cpp_symbol =~ s/-/_/g;
407if (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
430open (OUT,">>crypto/buildinf.h") || die "Can't open buildinf.h";
431printf 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"
436EOF
437printf OUT " #define DATE \"%s\"\n", scalar gmtime();
438printf OUT "#endif\n";
439close(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
708sub 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
814sub 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
831sub 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; 12my $do_update = 0;
13foreach (@ARGV) 13my $do_crypto = 0;
14my $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="";
23open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
24while(<IN>) {
25 $options=$1 if (/^OPTIONS=(.*)$/);
26}
27close(IN);
28
29foreach (@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
21if (!$do_ssl && !$do_crypto) 62if (!$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
122if ($do_update) {
123
124if ($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; 130if($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
80sub do_defs 147sub 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
171sub 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
210sub 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
219sub print_def_file 337sub 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
234LIBRARY $name 352LIBRARY $name
235 353
236DESCRIPTION 'SSLeay $name - eay\@cryptsoft.com' 354DESCRIPTION 'OpenSSL $name - http://www.openssl.org/'
237 355
238EOF 356EOF
239 357
240 if (!$NT) 358 if (!$W32) {
241 {
242 print <<"EOF"; 359 print <<"EOF";
243CODE PRELOAD MOVEABLE 360CODE PRELOAD MOVEABLE
244DATA PRELOAD MOVEABLE SINGLE 361DATA PRELOAD MOVEABLE SINGLE
@@ -249,7 +366,7 @@ HEAPSIZE 4096
249STACKSIZE 8192 366STACKSIZE 8192
250 367
251EOF 368EOF
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
276sub load_numbers 390sub 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
410sub 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
8my $arg;
9
10foreach $arg (@ARGV) {
11 &do_mkdir_p($arg);
12}
13
14
15sub 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
3my $config = "crypto/err/openssl.ec";
4my $debug = 0;
5my $rebuild = 0;
6my $static = 1;
7my $recurse = 0;
8my $reindex = 0;
9my $dowrite = 0;
10
11
12while (@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
40if($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
48open(IN, "<$config") || die "Can't open config file $config";
49
50# Parse config file
51
52while(<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
72close IN;
73
74# Scan each header file in turn and make a list of error codes
75# and function names
76
77while (($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
181foreach $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
210foreach $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. */
254EOF
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
282EOF
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
364static ERR_STRING_DATA ${lib}_str_functs[]=
365 {
366EOF
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
381static ERR_STRING_DATA ${lib}_str_reasons[]=
382 {
383EOF
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 }
395if($static) {
396 print OUT <<"EOF";
397{0,NULL}
398 };
399
400#endif
401
402void 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 }
416EOF
417} else {
418 print OUT <<"EOF";
419{0,NULL}
420 };
421
422#endif
423
424#ifdef ${lib}_LIB_NAME
425static ERR_STRING_DATA ${lib}_lib_name[]=
426 {
427{0 ,${lib}_LIB_NAME},
428{0,NULL}
429 };
430#endif
431
432
433int ${lib}_lib_error_code=0;
434
435void 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
457void 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 }
463EOF
464
465}
466
467 close OUT;
468
469}
470
471if($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
481foreach (keys %fcodes) {
482 push (@funref, $_) unless exists $ufcodes{$_};
483}
484
485foreach (keys %rcodes) {
486 push (@runref, $_) unless exists $urcodes{$_};
487}
488
489if($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
497if($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
9my @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
53foreach (@dirs) {
54 &files_dir ($_, "Makefile.ssl");
55}
56
57exit(0);
58
59sub files_dir
60{
61my ($dir, $makefile) = @_;
62
63my %sym;
64
65open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
66
67my $s="";
68
69while (<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
101print "RELATIVE_DIRECTORY=$dir\n";
102
103foreach (sort keys %sym)
104 {
105 print "$_=$sym{$_}\n";
106 }
107print "RELATIVE_DIRECTORY=\n";
108
109close (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
18my $from = shift;
19my @files = @ARGV;
20
21my @from_path = split(/\//, $from);
22my $pwd = `pwd`;
23chop($pwd);
24my @pwd_path = split(/\//, $pwd);
25
26my @to_path = ();
27
28my $dirname;
29foreach $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
48my $to = join('/', @to_path);
49
50my $file;
51foreach $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
7PATH=$PATH:.:util:../util:../../util
8export PATH
9
10from=$1
11shift
12
13here=`pwd`
14tmp=`dirname $from`
15while [ "$tmp"x != "x" -a "$tmp"x != ".x" ]
16do
17 t=`basename $here`
18 here=`dirname $here`
19 to="/$t$to"
20 tmp=`dirname $tmp`
21done
22to=..$to
23
24#echo from=$from
25#echo to =$to
26#exit 1
27
28if [ "$*"x != "x" ]; then
29 for i in $*
30 do
31 /bin/rm -f $from/$i
32 point.sh $to/$i $from/$i
33 done
34fi
35exit 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';
67if ($no_asm) 67if ($no_asm)
68 { 68 {
69 $bn_mulw_obj=''; 69 $bn_asm_obj='';
70 $bn_mulw_src=''; 70 $bn_asm_src='';
71 } 71 }
72elsif ($asmbits == 32) 72elsif ($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 }
77else 77else
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
83sub do_lib_rule 83sub 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 ";
12if ($debug) 23if ($debug)
13 { $op="-v "; } 24{
14else { $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
26if ($shlib)
27 {
28 $mlflags="$base_lflags -Tpe"; # stack if defined in .def file
29 $libs="libw ldllcew";
30 }
31else 28else
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"; 40if ($no_sock)
42$ex_libs.=$no_sock?"":" wsock32.lib"; 41 { $ex_libs=""; }
43$shlib_ex_obj="" if $shlib; 42else { $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';
56if ($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
66if (!$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 }
61else 88
89if ($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
67sub do_lib_rule 98sub 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
105sub do_link_rule 124sub 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';
19if ($debug)
20 { $cflags="-g2 -ggdb"; }
21else
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
52sub 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
67sub 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 }
781;
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';
13if ($debug)
14 { $cflags="-g2 -ggdb"; }
15else
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
46sub 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
61sub 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 }
721;
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
23if ($debug) 23if ($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 52if ($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
63if (!$no_asm) 68if (!$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
95sub do_lib_rule 102sub 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
18if (!$no_asm) 18if (!$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';
13if ($debug)
14 { $cflags="-g -DREF_CHECK -DCRYPTO_MDEBUG"; }
15else
16 { $cflags="-O2"; }
17
18$cflags.=" -std1 -DL_ENDIAN";
19
20if (!$no_asm)
21 {
22 $bn_asm_obj='$(OBJ_D)/mips1.o';
23 $bn_asm_src='crypto/bn/asm/mips1.s';
24 }
25
26sub 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
381;
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
83sub 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
831; 961;
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 3rm -f $2
4ln -s $1 $2 4ln -s $1 $2
5echo "$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
3cwd=`pwd`
4cd /tmp
5
6if [ -s /bin/ranlib ] ; then
7 RL=/bin/ranlib
8else if [ -s /usr/bin/ranlib ] ; then
9 RL=/usr/bin/ranlib
10fi
11fi
12
13if [ "x$RL" != "x" ]
14then
15 case "$1" in
16 /*)
17 $RL "$1"
18 ;;
19 *)
20 $RL "$cwd/$1"
21 ;;
22 esac
23fi
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
34sub 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
154TLSv1_client_method 172 154TLSv1_client_method 172
155BIO_new_buffer_ssl_connect 173 155BIO_new_buffer_ssl_connect 173
156BIO_new_ssl_connect 174 156BIO_new_ssl_connect 174
157SSL_get_ex_data_X509_STORE_CTX_idx 175
158SSL_CTX_set_tmp_dh_callback 176
159SSL_CTX_set_tmp_rsa_callback 177
160SSL_CTX_set_timeout 178
161SSL_CTX_get_timeout 179
162SSL_CTX_get_cert_store 180
163SSL_CTX_set_cert_store 181
164SSL_want 182
165SSL_library_init 183
166SSL_COMP_add_compression_method 184
167SSL_add_file_cert_subjects_to_stack 185
168SSL_set_tmp_rsa_callback 186
169SSL_set_tmp_dh_callback 187
170SSL_add_dir_cert_subjects_to_stack 188
171SSL_set_session_id_context 189
172sk_SSL_CIPHER_new 190
173sk_SSL_CIPHER_new_null 191
174sk_SSL_CIPHER_free 192
175sk_SSL_CIPHER_num 193
176sk_SSL_CIPHER_value 194
177sk_SSL_CIPHER_set 195
178sk_SSL_CIPHER_zero 196
179sk_SSL_CIPHER_push 197
180sk_SSL_CIPHER_pop 198
181sk_SSL_CIPHER_find 199
182sk_SSL_CIPHER_delete 200
183sk_SSL_CIPHER_delete_ptr 201
184sk_SSL_CIPHER_set_cmp_func 202
185sk_SSL_CIPHER_dup 203
186sk_SSL_CIPHER_pop_free 204
187sk_SSL_CIPHER_shift 205
188sk_SSL_COMP_new 206
189sk_SSL_COMP_new_null 207
190sk_SSL_COMP_free 208
191sk_SSL_COMP_num 209
192sk_SSL_COMP_value 210
193sk_SSL_COMP_set 211
194sk_SSL_COMP_zero 212
195sk_SSL_COMP_push 213
196sk_SSL_COMP_pop 214
197sk_SSL_COMP_find 215
198sk_SSL_COMP_delete 216
199sk_SSL_COMP_delete_ptr 217
200sk_SSL_COMP_set_cmp_func 218
201sk_SSL_COMP_dup 219
202sk_SSL_COMP_pop_free 220
203sk_SSL_COMP_shift 221
204SSL_CTX_use_certificate_chain_file 222
205sk_SSL_COMP_insert 223
206sk_SSL_CIPHER_insert 224
207SSL_CTX_set_verify_depth 225
208SSL_set_verify_depth 226
209sk_SSL_CIPHER_unshift 227
210SSL_CTX_get_verify_depth 228
211SSL_get_verify_depth 229
212sk_SSL_COMP_unshift 230
213SSL_CTX_set_session_id_context 231
214SSL_CTX_set_cert_verify_callback 232
215sk_SSL_COMP_sort 233
216sk_SSL_CIPHER_sort 234
217SSL_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
52foreach $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
3echo Generating x86 assember 3echo Generating x86 assember
4echo Bignum 4echo 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
8echo DES 8echo 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)