diff options
author | simon <simon@FreeBSD.org> | 2006-07-29 19:10:21 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2006-07-29 19:10:21 +0000 |
commit | fb3c70eda88d3175627edc6a3316b4508b3d29c5 (patch) | |
tree | 213a0c4d5ba3869f66ecf970819532048fed4a9d /crypto/openssl/util | |
parent | 3c8d7d9993705e30bc69e55cd19d8a298e582292 (diff) | |
download | FreeBSD-src-fb3c70eda88d3175627edc6a3316b4508b3d29c5.zip FreeBSD-src-fb3c70eda88d3175627edc6a3316b4508b3d29c5.tar.gz |
Vendor import of OpenSSL 0.9.8b
Diffstat (limited to 'crypto/openssl/util')
25 files changed, 1846 insertions, 398 deletions
diff --git a/crypto/openssl/util/ck_errf.pl b/crypto/openssl/util/ck_errf.pl index 7a24d6c..344b422 100755 --- a/crypto/openssl/util/ck_errf.pl +++ b/crypto/openssl/util/ck_errf.pl @@ -13,16 +13,21 @@ foreach $file (@ARGV) $func=""; while (<IN>) { - if (/^[a-zA-Z].+[\s*]([A-Za-z_0-9]+)\(.*\)/) + if (!/;$/ && /^([a-zA-Z].*[\s*])?([A-Za-z_0-9]+)\(.*[),]/) { - $func=$1; + /^([^()]*(\([^()]*\)[^()]*)*)\(/; + $1 =~ /([A-Za-z_0-9]*)$/; + $func = $1; $func =~ tr/A-Z/a-z/; } if (/([A-Z0-9]+)err\(([^,]+)/) { - next if ($func eq ""); $errlib=$1; $n=$2; + + if ($func eq "") + { print "$file:$.:???:$n\n"; next; } + if ($n !~ /([^_]+)_F_(.+)$/) { # print "check -$file:$.:$func:$n\n"; @@ -32,7 +37,7 @@ foreach $file (@ARGV) $n=$2; if ($lib ne $errlib) - { print "$file:$.:$func:$n\n"; next; } + { print "$file:$.:$func:$n [${errlib}err]\n"; next; } $n =~ tr/A-Z/a-z/; if (($n ne $func) && ($errlib ne "SYS")) diff --git a/crypto/openssl/util/copy.pl b/crypto/openssl/util/copy.pl new file mode 100644 index 0000000..e20b455 --- /dev/null +++ b/crypto/openssl/util/copy.pl @@ -0,0 +1,59 @@ +#!/usr/local/bin/perl + +use Fcntl; + + +# copy.pl + +# Perl script 'copy' comment. On Windows the built in "copy" command also +# copies timestamps: this messes up Makefile dependencies. + +my $arg; + +foreach $arg (@ARGV) { + $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... + foreach (glob $arg) + { + push @filelist, $_; + } +} + +$fnum = @filelist; + +if ($fnum <= 1) + { + die "Need at least two filenames"; + } + +$dest = pop @filelist; + +if ($fnum > 2 && ! -d $dest) + { + die "Destination must be a directory"; + } + +foreach (@filelist) + { + if (-d $dest) + { + $dfile = $_; + $dfile =~ s|^.*[/\\]([^/\\]*)$|$1|; + $dfile = "$dest/$dfile"; + } + else + { + $dfile = $dest; + } + sysopen(IN, $_, O_RDONLY|O_BINARY) || die "Can't Open $_"; + sysopen(OUT, $dfile, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY) + || die "Can't Open $dfile"; + while (sysread IN, $buf, 10240) + { + syswrite(OUT, $buf, length($buf)); + } + close(IN); + close(OUT); + print "Copying: $_ to $dfile\n"; + } + + diff --git a/crypto/openssl/util/domd b/crypto/openssl/util/domd index 5610521..691be7a 100755 --- a/crypto/openssl/util/domd +++ b/crypto/openssl/util/domd @@ -26,7 +26,7 @@ if [ "$MAKEDEPEND" = "gcc" ]; then ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new rm -f Makefile.tmp else - ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile $@ + ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND $@ ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new fi mv Makefile.new Makefile diff --git a/crypto/openssl/util/extract-section.pl b/crypto/openssl/util/extract-section.pl new file mode 100644 index 0000000..7a0ba4f --- /dev/null +++ b/crypto/openssl/util/extract-section.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl + +while(<STDIN>) { + if (/=for\s+comment\s+openssl_manual_section:(\S+)/) + { + print "$1\n"; + exit 0; + } +} + +print "$ARGV[0]\n"; + diff --git a/crypto/openssl/util/libeay.num b/crypto/openssl/util/libeay.num index d446b9e..f8555a1 100755 --- a/crypto/openssl/util/libeay.num +++ b/crypto/openssl/util/libeay.num @@ -123,10 +123,10 @@ BN_dup 128 EXIST::FUNCTION: BN_free 129 EXIST::FUNCTION: BN_from_montgomery 130 EXIST::FUNCTION: BN_gcd 131 EXIST::FUNCTION: -BN_generate_prime 132 EXIST::FUNCTION: +BN_generate_prime 132 EXIST::FUNCTION:DEPRECATED BN_get_word 133 EXIST::FUNCTION: BN_is_bit_set 134 EXIST::FUNCTION: -BN_is_prime 135 EXIST::FUNCTION: +BN_is_prime 135 EXIST::FUNCTION:DEPRECATED BN_lshift 136 EXIST::FUNCTION: BN_lshift1 137 EXIST::FUNCTION: BN_mask_bits 138 EXIST::FUNCTION: @@ -193,14 +193,14 @@ DH_check 200 EXIST::FUNCTION:DH DH_compute_key 201 EXIST::FUNCTION:DH DH_free 202 EXIST::FUNCTION:DH DH_generate_key 203 EXIST::FUNCTION:DH -DH_generate_parameters 204 EXIST::FUNCTION:DH +DH_generate_parameters 204 EXIST::FUNCTION:DEPRECATED,DH DH_new 205 EXIST::FUNCTION:DH DH_size 206 EXIST::FUNCTION:DH DHparams_print 207 EXIST::FUNCTION:BIO,DH DHparams_print_fp 208 EXIST::FUNCTION:DH,FP_API DSA_free 209 EXIST::FUNCTION:DSA DSA_generate_key 210 EXIST::FUNCTION:DSA -DSA_generate_parameters 211 EXIST::FUNCTION:DSA +DSA_generate_parameters 211 EXIST::FUNCTION:DEPRECATED,DSA DSA_is_prime 212 NOEXIST::FUNCTION: DSA_new 213 EXIST::FUNCTION:DSA DSA_print 214 EXIST::FUNCTION:BIO,DSA @@ -474,7 +474,7 @@ RSAPrivateKey_dup 481 EXIST::FUNCTION:RSA RSAPublicKey_dup 482 EXIST::FUNCTION:RSA RSA_PKCS1_SSLeay 483 EXIST::FUNCTION:RSA RSA_free 484 EXIST::FUNCTION:RSA -RSA_generate_key 485 EXIST::FUNCTION:RSA +RSA_generate_key 485 EXIST::FUNCTION:DEPRECATED,RSA RSA_new 486 EXIST::FUNCTION:RSA RSA_new_method 487 EXIST::FUNCTION:RSA RSA_print 488 EXIST::FUNCTION:BIO,RSA @@ -1104,7 +1104,7 @@ BN_RECP_CTX_set 1131 EXIST::FUNCTION: BN_mod_mul_reciprocal 1132 EXIST::FUNCTION: BN_mod_exp_recp 1133 EXIST::FUNCTION: BN_div_recp 1134 EXIST::FUNCTION: -BN_CTX_init 1135 EXIST::FUNCTION: +BN_CTX_init 1135 EXIST::FUNCTION:DEPRECATED BN_MONT_CTX_init 1136 EXIST::FUNCTION: RAND_get_rand_method 1137 EXIST::FUNCTION: PKCS7_add_attribute 1138 EXIST::FUNCTION: @@ -1221,8 +1221,8 @@ BIO_f_reliable 1244 EXIST::FUNCTION:BIO PKCS7_dataFinal 1245 EXIST::FUNCTION: PKCS7_dataDecode 1246 EXIST::FUNCTION: X509V3_EXT_CRL_add_conf 1247 EXIST::FUNCTION: -BN_set_params 1248 EXIST::FUNCTION: -BN_get_params 1249 EXIST::FUNCTION: +BN_set_params 1248 EXIST::FUNCTION:DEPRECATED +BN_get_params 1249 EXIST::FUNCTION:DEPRECATED BIO_get_ex_num 1250 NOEXIST::FUNCTION: BIO_set_ex_free_func 1251 NOEXIST::FUNCTION: EVP_ripemd160 1252 EXIST::FUNCTION:RIPEMD @@ -1744,7 +1744,7 @@ X509_REQ_add1_attr_by_txt 2217 EXIST::FUNCTION: X509_ATTRIBUTE_create_by_txt 2218 EXIST::FUNCTION: X509at_add1_attr_by_txt 2219 EXIST::FUNCTION: BN_pseudo_rand 2239 EXIST::FUNCTION: -BN_is_prime_fasttest 2240 EXIST::FUNCTION: +BN_is_prime_fasttest 2240 EXIST::FUNCTION:DEPRECATED BN_CTX_end 2241 EXIST::FUNCTION: BN_CTX_start 2242 EXIST::FUNCTION: BN_CTX_get 2243 EXIST::FUNCTION: @@ -2071,7 +2071,7 @@ PKCS7_ATTR_SIGN_it 2632 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTI UI_add_error_string 2633 EXIST::FUNCTION: KRB5_CHECKSUM_free 2634 EXIST::FUNCTION: OCSP_REQUEST_get_ext 2635 EXIST::FUNCTION: -ENGINE_load_ubsec 2636 EXIST::FUNCTION:ENGINE +ENGINE_load_ubsec 2636 EXIST::FUNCTION:ENGINE,STATIC_ENGINE ENGINE_register_all_digests 2637 EXIST::FUNCTION:ENGINE PKEY_USAGE_PERIOD_it 2638 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: PKEY_USAGE_PERIOD_it 2638 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: @@ -2419,7 +2419,7 @@ UI_get_string_type 2916 EXIST::FUNCTION: ENGINE_unregister_DH 2917 EXIST::FUNCTION:ENGINE ENGINE_register_all_DSA 2918 EXIST::FUNCTION:ENGINE OCSP_ONEREQ_get_ext_by_critical 2919 EXIST::FUNCTION: -bn_dup_expand 2920 EXIST::FUNCTION: +bn_dup_expand 2920 EXIST::FUNCTION:DEPRECATED OCSP_cert_id_new 2921 EXIST::FUNCTION: BASIC_CONSTRAINTS_it 2922 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: BASIC_CONSTRAINTS_it 2922 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: @@ -2545,7 +2545,7 @@ OCSP_RESPONSE_new 3023 EXIST::FUNCTION: AES_set_encrypt_key 3024 EXIST::FUNCTION:AES OCSP_resp_count 3025 EXIST::FUNCTION: KRB5_CHECKSUM_new 3026 EXIST::FUNCTION: -ENGINE_load_cswift 3027 EXIST::FUNCTION:ENGINE +ENGINE_load_cswift 3027 EXIST::FUNCTION:ENGINE,STATIC_ENGINE OCSP_onereq_get0_id 3028 EXIST::FUNCTION: ENGINE_set_default_ciphers 3029 EXIST::FUNCTION:ENGINE NOTICEREF_it 3030 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: @@ -2576,7 +2576,7 @@ ASN1_primitive_free 3051 EXIST::FUNCTION: i2d_EXTENDED_KEY_USAGE 3052 EXIST::FUNCTION: i2d_OCSP_SIGNATURE 3053 EXIST::FUNCTION: asn1_enc_save 3054 EXIST::FUNCTION: -ENGINE_load_nuron 3055 EXIST::FUNCTION:ENGINE +ENGINE_load_nuron 3055 EXIST::FUNCTION:ENGINE,STATIC_ENGINE _ossl_old_des_pcbc_encrypt 3056 EXIST::FUNCTION:DES PKCS12_MAC_DATA_it 3057 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: PKCS12_MAC_DATA_it 3057 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: @@ -2600,7 +2600,7 @@ asn1_get_choice_selector 3071 EXIST::FUNCTION: i2d_KRB5_CHECKSUM 3072 EXIST::FUNCTION: ENGINE_set_table_flags 3073 EXIST::FUNCTION:ENGINE AES_options 3074 EXIST::FUNCTION:AES -ENGINE_load_chil 3075 EXIST::FUNCTION:ENGINE +ENGINE_load_chil 3075 EXIST::FUNCTION:ENGINE,STATIC_ENGINE OCSP_id_cmp 3076 EXIST::FUNCTION: OCSP_BASICRESP_new 3077 EXIST::FUNCTION: OCSP_REQUEST_get_ext_by_NID 3078 EXIST::FUNCTION: @@ -2667,7 +2667,7 @@ OCSP_CRLID_it 3127 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIA OCSP_CRLID_it 3127 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: i2d_KRB5_AUTHENTBODY 3128 EXIST::FUNCTION: OCSP_REQUEST_get_ext_count 3129 EXIST::FUNCTION: -ENGINE_load_atalla 3130 EXIST::FUNCTION:ENGINE +ENGINE_load_atalla 3130 EXIST::FUNCTION:ENGINE,STATIC_ENGINE X509_NAME_it 3131 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: X509_NAME_it 3131 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: USERNOTICE_it 3132 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: @@ -2762,8 +2762,8 @@ DES_read_2passwords 3206 EXIST::FUNCTION:DES DES_read_password 3207 EXIST::FUNCTION:DES UI_UTIL_read_pw 3208 EXIST::FUNCTION: UI_UTIL_read_pw_string 3209 EXIST::FUNCTION: -ENGINE_load_aep 3210 EXIST::FUNCTION:ENGINE -ENGINE_load_sureware 3211 EXIST::FUNCTION:ENGINE +ENGINE_load_aep 3210 EXIST::FUNCTION:ENGINE,STATIC_ENGINE +ENGINE_load_sureware 3211 EXIST::FUNCTION:ENGINE,STATIC_ENGINE OPENSSL_add_all_algorithms_noconf 3212 EXIST:!VMS:FUNCTION: OPENSSL_add_all_algo_noconf 3212 EXIST:VMS:FUNCTION: OPENSSL_add_all_algorithms_conf 3213 EXIST:!VMS:FUNCTION: @@ -2772,7 +2772,7 @@ OPENSSL_load_builtin_modules 3214 EXIST::FUNCTION: AES_ofb128_encrypt 3215 EXIST::FUNCTION:AES AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES -ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE +ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE,STATIC_ENGINE _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES @@ -2804,40 +2804,579 @@ OPENSSL_cleanse 3245 EXIST::FUNCTION: ENGINE_setup_bsd_cryptodev 3246 EXIST:__FreeBSD__:FUNCTION:ENGINE ERR_release_err_state_table 3247 EXIST::FUNCTION:LHASH EVP_aes_128_cfb8 3248 EXIST::FUNCTION:AES -FIPS_corrupt_rsa 3249 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_selftest_des 3250 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION: +FIPS_selftest_des 3250 NOEXIST::FUNCTION: EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES -FIPS_mode_set 3253 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_selftest_dsa 3254 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_mode_set 3253 NOEXIST::FUNCTION: +FIPS_selftest_dsa 3254 NOEXIST::FUNCTION: EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES -FIPS_allow_md5 3256 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_allow_md5 3256 NOEXIST::FUNCTION: DES_ede3_cfb_encrypt 3257 EXIST::FUNCTION:DES EVP_des_ede3_cfb8 3258 EXIST::FUNCTION:DES -FIPS_rand_seeded 3259 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_rand_seeded 3259 NOEXIST::FUNCTION: AES_cfbr_encrypt_block 3260 EXIST::FUNCTION:AES AES_cfb8_encrypt 3261 EXIST::FUNCTION:AES -FIPS_rand_seed 3262 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_corrupt_des 3263 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_rand_seed 3262 NOEXIST::FUNCTION: +FIPS_corrupt_des 3263 NOEXIST::FUNCTION: EVP_aes_192_cfb1 3264 EXIST::FUNCTION:AES -FIPS_selftest_aes 3265 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_set_prng_key 3266 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_selftest_aes 3265 NOEXIST::FUNCTION: +FIPS_set_prng_key 3266 NOEXIST::FUNCTION: EVP_des_cfb8 3267 EXIST::FUNCTION:DES -FIPS_corrupt_dsa 3268 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_test_mode 3269 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_rand_method 3270 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_corrupt_dsa 3268 NOEXIST::FUNCTION: +FIPS_test_mode 3269 NOEXIST::FUNCTION: +FIPS_rand_method 3270 NOEXIST::FUNCTION: EVP_aes_256_cfb1 3271 EXIST::FUNCTION:AES -ERR_load_FIPS_strings 3272 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_corrupt_aes 3273 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_selftest_sha1 3274 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_selftest_rsa 3275 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_corrupt_sha1 3276 EXIST:OPENSSL_FIPS:FUNCTION: +ERR_load_FIPS_strings 3272 NOEXIST::FUNCTION: +FIPS_corrupt_aes 3273 NOEXIST::FUNCTION: +FIPS_selftest_sha1 3274 NOEXIST::FUNCTION: +FIPS_selftest_rsa 3275 NOEXIST::FUNCTION: +FIPS_corrupt_sha1 3276 NOEXIST::FUNCTION: EVP_des_cfb1 3277 EXIST::FUNCTION:DES -FIPS_dsa_check 3278 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_dsa_check 3278 NOEXIST::FUNCTION: AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES -FIPS_rand_check 3281 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_md5_allowed 3282 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_mode 3283 EXIST:OPENSSL_FIPS:FUNCTION: -FIPS_selftest_failed 3284 EXIST:OPENSSL_FIPS:FUNCTION: +FIPS_rand_check 3281 NOEXIST::FUNCTION: +FIPS_md5_allowed 3282 NOEXIST::FUNCTION: +FIPS_mode 3283 NOEXIST::FUNCTION: +FIPS_selftest_failed 3284 NOEXIST::FUNCTION: sk_is_sorted 3285 EXIST::FUNCTION: +X509_check_ca 3286 EXIST::FUNCTION: +private_idea_set_encrypt_key 3287 NOEXIST::FUNCTION: +HMAC_CTX_set_flags 3288 NOEXIST::FUNCTION: +private_SHA_Init 3289 NOEXIST::FUNCTION: +private_CAST_set_key 3290 NOEXIST::FUNCTION: +private_RIPEMD160_Init 3291 NOEXIST::FUNCTION: +private_RC5_32_set_key 3292 NOEXIST::FUNCTION: +private_MD5_Init 3293 NOEXIST::FUNCTION: +private_RC4_set_key 3294 NOEXIST::FUNCTION: +private_MDC2_Init 3295 NOEXIST::FUNCTION: +private_RC2_set_key 3296 NOEXIST::FUNCTION: +private_MD4_Init 3297 NOEXIST::FUNCTION: +private_BF_set_key 3298 NOEXIST::FUNCTION: +private_MD2_Init 3299 NOEXIST::FUNCTION: +d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION: +PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +i2d_PROXY_POLICY 3302 EXIST::FUNCTION: +i2d_PROXY_CERT_INFO_EXTENSION 3303 EXIST::FUNCTION: +d2i_PROXY_POLICY 3304 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_new 3305 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_free 3306 EXIST::FUNCTION: +PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +PROXY_CERT_INFO_EXTENSION_it 3307 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +PROXY_POLICY_free 3308 EXIST::FUNCTION: +PROXY_POLICY_new 3309 EXIST::FUNCTION: +BN_MONT_CTX_set_locked 3310 EXIST::FUNCTION: +FIPS_selftest_rng 3311 NOEXIST::FUNCTION: +EVP_sha384 3312 EXIST::FUNCTION:SHA,SHA512 +EVP_sha512 3313 EXIST::FUNCTION:SHA,SHA512 +EVP_sha224 3314 EXIST::FUNCTION:SHA,SHA256 +EVP_sha256 3315 EXIST::FUNCTION:SHA,SHA256 +FIPS_selftest_hmac 3316 NOEXIST::FUNCTION: +FIPS_corrupt_rng 3317 NOEXIST::FUNCTION: +BN_mod_exp_mont_consttime 3318 EXIST::FUNCTION: +RSA_X931_hash_id 3319 EXIST::FUNCTION:RSA +RSA_padding_check_X931 3320 EXIST::FUNCTION:RSA +RSA_verify_PKCS1_PSS 3321 EXIST::FUNCTION:RSA +RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA +RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA +PKCS1_MGF1 3324 EXIST::FUNCTION:RSA +BN_X931_generate_Xpq 3325 NOEXIST::FUNCTION: +RSA_X931_generate_key 3326 NOEXIST::FUNCTION: +BN_X931_derive_prime 3327 NOEXIST::FUNCTION: +BN_X931_generate_prime 3328 NOEXIST::FUNCTION: +RSA_X931_derive 3329 NOEXIST::FUNCTION: +BIO_new_dgram 3330 EXIST::FUNCTION: +BN_get0_nist_prime_384 3331 EXIST::FUNCTION: +ERR_set_mark 3332 EXIST::FUNCTION: +X509_STORE_CTX_set0_crls 3333 EXIST::FUNCTION: +ENGINE_set_STORE 3334 EXIST::FUNCTION:ENGINE +ENGINE_register_ECDSA 3335 EXIST::FUNCTION:ENGINE +STORE_method_set_list_start_function 3336 EXIST:!VMS:FUNCTION: +STORE_meth_set_list_start_fn 3336 EXIST:VMS:FUNCTION: +BN_BLINDING_invert_ex 3337 EXIST::FUNCTION: +NAME_CONSTRAINTS_free 3338 EXIST::FUNCTION: +STORE_ATTR_INFO_set_number 3339 EXIST::FUNCTION: +BN_BLINDING_get_thread_id 3340 EXIST::FUNCTION: +X509_STORE_CTX_set0_param 3341 EXIST::FUNCTION: +POLICY_MAPPING_it 3342 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +POLICY_MAPPING_it 3342 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +STORE_parse_attrs_start 3343 EXIST::FUNCTION: +POLICY_CONSTRAINTS_free 3344 EXIST::FUNCTION: +EVP_PKEY_add1_attr_by_NID 3345 EXIST::FUNCTION: +BN_nist_mod_192 3346 EXIST::FUNCTION: +EC_GROUP_get_trinomial_basis 3347 EXIST::FUNCTION:EC +STORE_set_method 3348 EXIST::FUNCTION: +GENERAL_SUBTREE_free 3349 EXIST::FUNCTION: +NAME_CONSTRAINTS_it 3350 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +NAME_CONSTRAINTS_it 3350 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +ECDH_get_default_method 3351 EXIST::FUNCTION:ECDH +PKCS12_add_safe 3352 EXIST::FUNCTION: +EC_KEY_new_by_curve_name 3353 EXIST::FUNCTION:EC +STORE_method_get_update_store_function 3354 EXIST:!VMS:FUNCTION: +STORE_meth_get_update_store_fn 3354 EXIST:VMS:FUNCTION: +ENGINE_register_ECDH 3355 EXIST::FUNCTION:ENGINE +SHA512_Update 3356 EXIST::FUNCTION:SHA,SHA512 +i2d_ECPrivateKey 3357 EXIST::FUNCTION:EC +BN_get0_nist_prime_192 3358 EXIST::FUNCTION: +STORE_modify_certificate 3359 EXIST::FUNCTION: +EC_POINT_set_affine_coordinates_GF2m 3360 EXIST:!VMS:FUNCTION:EC +EC_POINT_set_affine_coords_GF2m 3360 EXIST:VMS:FUNCTION:EC +BN_GF2m_mod_exp_arr 3361 EXIST::FUNCTION: +STORE_ATTR_INFO_modify_number 3362 EXIST::FUNCTION: +X509_keyid_get0 3363 EXIST::FUNCTION: +ENGINE_load_gmp 3364 EXIST::FUNCTION:ENGINE,GMP,STATIC_ENGINE +pitem_new 3365 EXIST::FUNCTION: +BN_GF2m_mod_mul_arr 3366 EXIST::FUNCTION: +STORE_list_public_key_endp 3367 EXIST::FUNCTION: +o2i_ECPublicKey 3368 EXIST::FUNCTION:EC +EC_KEY_copy 3369 EXIST::FUNCTION:EC +BIO_dump_fp 3370 EXIST::FUNCTION:FP_API +X509_policy_node_get0_parent 3371 EXIST::FUNCTION: +EC_GROUP_check_discriminant 3372 EXIST::FUNCTION:EC +i2o_ECPublicKey 3373 EXIST::FUNCTION:EC +EC_KEY_precompute_mult 3374 EXIST::FUNCTION:EC +a2i_IPADDRESS 3375 EXIST::FUNCTION: +STORE_method_set_initialise_function 3376 EXIST:!VMS:FUNCTION: +STORE_meth_set_initialise_fn 3376 EXIST:VMS:FUNCTION: +X509_STORE_CTX_set_depth 3377 EXIST::FUNCTION: +X509_VERIFY_PARAM_inherit 3378 EXIST::FUNCTION: +EC_POINT_point2bn 3379 EXIST::FUNCTION:EC +STORE_ATTR_INFO_set_dn 3380 EXIST::FUNCTION: +X509_policy_tree_get0_policies 3381 EXIST::FUNCTION: +EC_GROUP_new_curve_GF2m 3382 EXIST::FUNCTION:EC +STORE_destroy_method 3383 EXIST::FUNCTION: +ENGINE_unregister_STORE 3384 EXIST::FUNCTION:ENGINE +EVP_PKEY_get1_EC_KEY 3385 EXIST::FUNCTION:EC +STORE_ATTR_INFO_get0_number 3386 EXIST::FUNCTION: +ENGINE_get_default_ECDH 3387 EXIST::FUNCTION:ENGINE +EC_KEY_get_conv_form 3388 EXIST::FUNCTION:EC +ASN1_OCTET_STRING_NDEF_it 3389 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +ASN1_OCTET_STRING_NDEF_it 3389 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +STORE_delete_public_key 3390 EXIST::FUNCTION: +STORE_get_public_key 3391 EXIST::FUNCTION: +STORE_modify_arbitrary 3392 EXIST::FUNCTION: +ENGINE_get_static_state 3393 EXIST::FUNCTION:ENGINE +pqueue_iterator 3394 EXIST::FUNCTION: +ECDSA_SIG_new 3395 EXIST::FUNCTION:ECDSA +OPENSSL_DIR_end 3396 EXIST::FUNCTION: +BN_GF2m_mod_sqr 3397 EXIST::FUNCTION: +EC_POINT_bn2point 3398 EXIST::FUNCTION:EC +X509_VERIFY_PARAM_set_depth 3399 EXIST::FUNCTION: +EC_KEY_set_asn1_flag 3400 EXIST::FUNCTION:EC +STORE_get_method 3401 EXIST::FUNCTION: +EC_KEY_get_key_method_data 3402 EXIST::FUNCTION:EC +ECDSA_sign_ex 3403 EXIST::FUNCTION:ECDSA +STORE_parse_attrs_end 3404 EXIST::FUNCTION: +EC_GROUP_get_point_conversion_form 3405 EXIST:!VMS:FUNCTION:EC +EC_GROUP_get_point_conv_form 3405 EXIST:VMS:FUNCTION:EC +STORE_method_set_store_function 3406 EXIST::FUNCTION: +STORE_ATTR_INFO_in 3407 EXIST::FUNCTION: +PEM_read_bio_ECPKParameters 3408 EXIST::FUNCTION:EC +EC_GROUP_get_pentanomial_basis 3409 EXIST::FUNCTION:EC +EVP_PKEY_add1_attr_by_txt 3410 EXIST::FUNCTION: +BN_BLINDING_set_flags 3411 EXIST::FUNCTION: +X509_VERIFY_PARAM_set1_policies 3412 EXIST::FUNCTION: +X509_VERIFY_PARAM_set1_name 3413 EXIST::FUNCTION: +X509_VERIFY_PARAM_set_purpose 3414 EXIST::FUNCTION: +STORE_get_number 3415 EXIST::FUNCTION: +ECDSA_sign_setup 3416 EXIST::FUNCTION:ECDSA +BN_GF2m_mod_solve_quad_arr 3417 EXIST::FUNCTION: +EC_KEY_up_ref 3418 EXIST::FUNCTION:EC +POLICY_MAPPING_free 3419 EXIST::FUNCTION: +BN_GF2m_mod_div 3420 EXIST::FUNCTION: +X509_VERIFY_PARAM_set_flags 3421 EXIST::FUNCTION: +EC_KEY_free 3422 EXIST::FUNCTION:EC +STORE_method_set_list_next_function 3423 EXIST:!VMS:FUNCTION: +STORE_meth_set_list_next_fn 3423 EXIST:VMS:FUNCTION: +PEM_write_bio_ECPrivateKey 3424 EXIST::FUNCTION:EC +d2i_EC_PUBKEY 3425 EXIST::FUNCTION:EC +STORE_method_get_generate_function 3426 EXIST:!VMS:FUNCTION: +STORE_meth_get_generate_fn 3426 EXIST:VMS:FUNCTION: +STORE_method_set_list_end_function 3427 EXIST:!VMS:FUNCTION: +STORE_meth_set_list_end_fn 3427 EXIST:VMS:FUNCTION: +pqueue_print 3428 EXIST::FUNCTION: +EC_GROUP_have_precompute_mult 3429 EXIST::FUNCTION:EC +EC_KEY_print_fp 3430 EXIST::FUNCTION:EC,FP_API +BN_GF2m_mod_arr 3431 EXIST::FUNCTION: +PEM_write_bio_X509_CERT_PAIR 3432 EXIST::FUNCTION: +EVP_PKEY_cmp 3433 EXIST::FUNCTION: +X509_policy_level_node_count 3434 EXIST::FUNCTION: +STORE_new_engine 3435 EXIST::FUNCTION: +STORE_list_public_key_start 3436 EXIST::FUNCTION: +X509_VERIFY_PARAM_new 3437 EXIST::FUNCTION: +ECDH_get_ex_data 3438 EXIST::FUNCTION:ECDH +EVP_PKEY_get_attr 3439 EXIST::FUNCTION: +ECDSA_do_sign 3440 EXIST::FUNCTION:ECDSA +ENGINE_unregister_ECDH 3441 EXIST::FUNCTION:ENGINE +ECDH_OpenSSL 3442 EXIST::FUNCTION:ECDH +EC_KEY_set_conv_form 3443 EXIST::FUNCTION:EC +EC_POINT_dup 3444 EXIST::FUNCTION:EC +GENERAL_SUBTREE_new 3445 EXIST::FUNCTION: +STORE_list_crl_endp 3446 EXIST::FUNCTION: +EC_get_builtin_curves 3447 EXIST::FUNCTION:EC +X509_policy_node_get0_qualifiers 3448 EXIST:!VMS:FUNCTION: +X509_pcy_node_get0_qualifiers 3448 EXIST:VMS:FUNCTION: +STORE_list_crl_end 3449 EXIST::FUNCTION: +EVP_PKEY_set1_EC_KEY 3450 EXIST::FUNCTION:EC +BN_GF2m_mod_sqrt_arr 3451 EXIST::FUNCTION: +i2d_ECPrivateKey_bio 3452 EXIST::FUNCTION:BIO,EC +ECPKParameters_print_fp 3453 EXIST::FUNCTION:EC,FP_API +pqueue_find 3454 EXIST::FUNCTION: +ECDSA_SIG_free 3455 EXIST::FUNCTION:ECDSA +PEM_write_bio_ECPKParameters 3456 EXIST::FUNCTION:EC +STORE_method_set_ctrl_function 3457 EXIST::FUNCTION: +STORE_list_public_key_end 3458 EXIST::FUNCTION: +EC_KEY_set_private_key 3459 EXIST::FUNCTION:EC +pqueue_peek 3460 EXIST::FUNCTION: +STORE_get_arbitrary 3461 EXIST::FUNCTION: +STORE_store_crl 3462 EXIST::FUNCTION: +X509_policy_node_get0_policy 3463 EXIST::FUNCTION: +PKCS12_add_safes 3464 EXIST::FUNCTION: +BN_BLINDING_convert_ex 3465 EXIST::FUNCTION: +X509_policy_tree_free 3466 EXIST::FUNCTION: +OPENSSL_ia32cap_loc 3467 EXIST::FUNCTION: +BN_GF2m_poly2arr 3468 EXIST::FUNCTION: +STORE_ctrl 3469 EXIST::FUNCTION: +STORE_ATTR_INFO_compare 3470 EXIST::FUNCTION: +BN_get0_nist_prime_224 3471 EXIST::FUNCTION: +i2d_ECParameters 3472 EXIST::FUNCTION:EC +i2d_ECPKParameters 3473 EXIST::FUNCTION:EC +BN_GENCB_call 3474 EXIST::FUNCTION: +d2i_ECPKParameters 3475 EXIST::FUNCTION:EC +STORE_method_set_generate_function 3476 EXIST:!VMS:FUNCTION: +STORE_meth_set_generate_fn 3476 EXIST:VMS:FUNCTION: +ENGINE_set_ECDH 3477 EXIST::FUNCTION:ENGINE +NAME_CONSTRAINTS_new 3478 EXIST::FUNCTION: +SHA256_Init 3479 EXIST::FUNCTION:SHA,SHA256 +EC_KEY_get0_public_key 3480 EXIST::FUNCTION:EC +PEM_write_bio_EC_PUBKEY 3481 EXIST::FUNCTION:EC +STORE_ATTR_INFO_set_cstr 3482 EXIST::FUNCTION: +STORE_list_crl_next 3483 EXIST::FUNCTION: +STORE_ATTR_INFO_in_range 3484 EXIST::FUNCTION: +ECParameters_print 3485 EXIST::FUNCTION:BIO,EC +STORE_method_set_delete_function 3486 EXIST:!VMS:FUNCTION: +STORE_meth_set_delete_fn 3486 EXIST:VMS:FUNCTION: +STORE_list_certificate_next 3487 EXIST::FUNCTION: +ASN1_generate_nconf 3488 EXIST::FUNCTION: +BUF_memdup 3489 EXIST::FUNCTION: +BN_GF2m_mod_mul 3490 EXIST::FUNCTION: +STORE_method_get_list_next_function 3491 EXIST:!VMS:FUNCTION: +STORE_meth_get_list_next_fn 3491 EXIST:VMS:FUNCTION: +STORE_ATTR_INFO_get0_dn 3492 EXIST::FUNCTION: +STORE_list_private_key_next 3493 EXIST::FUNCTION: +EC_GROUP_set_seed 3494 EXIST::FUNCTION:EC +X509_VERIFY_PARAM_set_trust 3495 EXIST::FUNCTION: +STORE_ATTR_INFO_free 3496 EXIST::FUNCTION: +STORE_get_private_key 3497 EXIST::FUNCTION: +EVP_PKEY_get_attr_count 3498 EXIST::FUNCTION: +STORE_ATTR_INFO_new 3499 EXIST::FUNCTION: +EC_GROUP_get_curve_GF2m 3500 EXIST::FUNCTION:EC +STORE_method_set_revoke_function 3501 EXIST:!VMS:FUNCTION: +STORE_meth_set_revoke_fn 3501 EXIST:VMS:FUNCTION: +STORE_store_number 3502 EXIST::FUNCTION: +BN_is_prime_ex 3503 EXIST::FUNCTION: +STORE_revoke_public_key 3504 EXIST::FUNCTION: +X509_STORE_CTX_get0_param 3505 EXIST::FUNCTION: +STORE_delete_arbitrary 3506 EXIST::FUNCTION: +PEM_read_X509_CERT_PAIR 3507 EXIST:!WIN16:FUNCTION: +X509_STORE_set_depth 3508 EXIST::FUNCTION: +ECDSA_get_ex_data 3509 EXIST::FUNCTION:ECDSA +SHA224 3510 EXIST::FUNCTION:SHA,SHA256 +BIO_dump_indent_fp 3511 EXIST::FUNCTION:FP_API +EC_KEY_set_group 3512 EXIST::FUNCTION:EC +BUF_strndup 3513 EXIST::FUNCTION: +STORE_list_certificate_start 3514 EXIST::FUNCTION: +BN_GF2m_mod 3515 EXIST::FUNCTION: +X509_REQ_check_private_key 3516 EXIST::FUNCTION: +EC_GROUP_get_seed_len 3517 EXIST::FUNCTION:EC +ERR_load_STORE_strings 3518 EXIST::FUNCTION: +PEM_read_bio_EC_PUBKEY 3519 EXIST::FUNCTION:EC +STORE_list_private_key_end 3520 EXIST::FUNCTION: +i2d_EC_PUBKEY 3521 EXIST::FUNCTION:EC +ECDSA_get_default_method 3522 EXIST::FUNCTION:ECDSA +ASN1_put_eoc 3523 EXIST::FUNCTION: +X509_STORE_CTX_get_explicit_policy 3524 EXIST:!VMS:FUNCTION: +X509_STORE_CTX_get_expl_policy 3524 EXIST:VMS:FUNCTION: +X509_VERIFY_PARAM_table_cleanup 3525 EXIST::FUNCTION: +STORE_modify_private_key 3526 EXIST::FUNCTION: +X509_VERIFY_PARAM_free 3527 EXIST::FUNCTION: +EC_METHOD_get_field_type 3528 EXIST::FUNCTION:EC +EC_GFp_nist_method 3529 EXIST::FUNCTION:EC +STORE_method_set_modify_function 3530 EXIST:!VMS:FUNCTION: +STORE_meth_set_modify_fn 3530 EXIST:VMS:FUNCTION: +STORE_parse_attrs_next 3531 EXIST::FUNCTION: +ENGINE_load_padlock 3532 EXIST::FUNCTION:ENGINE +EC_GROUP_set_curve_name 3533 EXIST::FUNCTION:EC +X509_CERT_PAIR_it 3534 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +X509_CERT_PAIR_it 3534 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +STORE_method_get_revoke_function 3535 EXIST:!VMS:FUNCTION: +STORE_meth_get_revoke_fn 3535 EXIST:VMS:FUNCTION: +STORE_method_set_get_function 3536 EXIST::FUNCTION: +STORE_modify_number 3537 EXIST::FUNCTION: +STORE_method_get_store_function 3538 EXIST::FUNCTION: +STORE_store_private_key 3539 EXIST::FUNCTION: +BN_GF2m_mod_sqr_arr 3540 EXIST::FUNCTION: +RSA_setup_blinding 3541 EXIST::FUNCTION:RSA +BIO_s_datagram 3542 EXIST::FUNCTION:DGRAM +STORE_Memory 3543 EXIST::FUNCTION: +sk_find_ex 3544 EXIST::FUNCTION: +EC_GROUP_set_curve_GF2m 3545 EXIST::FUNCTION:EC +ENGINE_set_default_ECDSA 3546 EXIST::FUNCTION:ENGINE +POLICY_CONSTRAINTS_new 3547 EXIST::FUNCTION: +BN_GF2m_mod_sqrt 3548 EXIST::FUNCTION: +ECDH_set_default_method 3549 EXIST::FUNCTION:ECDH +EC_KEY_generate_key 3550 EXIST::FUNCTION:EC +SHA384_Update 3551 EXIST::FUNCTION:SHA,SHA512 +BN_GF2m_arr2poly 3552 EXIST::FUNCTION: +STORE_method_get_get_function 3553 EXIST::FUNCTION: +STORE_method_set_cleanup_function 3554 EXIST:!VMS:FUNCTION: +STORE_meth_set_cleanup_fn 3554 EXIST:VMS:FUNCTION: +EC_GROUP_check 3555 EXIST::FUNCTION:EC +d2i_ECPrivateKey_bio 3556 EXIST::FUNCTION:BIO,EC +EC_KEY_insert_key_method_data 3557 EXIST::FUNCTION:EC +STORE_method_get_lock_store_function 3558 EXIST:!VMS:FUNCTION: +STORE_meth_get_lock_store_fn 3558 EXIST:VMS:FUNCTION: +X509_VERIFY_PARAM_get_depth 3559 EXIST::FUNCTION: +SHA224_Final 3560 EXIST::FUNCTION:SHA,SHA256 +STORE_method_set_update_store_function 3561 EXIST:!VMS:FUNCTION: +STORE_meth_set_update_store_fn 3561 EXIST:VMS:FUNCTION: +SHA224_Update 3562 EXIST::FUNCTION:SHA,SHA256 +d2i_ECPrivateKey 3563 EXIST::FUNCTION:EC +ASN1_item_ndef_i2d 3564 EXIST::FUNCTION: +STORE_delete_private_key 3565 EXIST::FUNCTION: +ERR_pop_to_mark 3566 EXIST::FUNCTION: +ENGINE_register_all_STORE 3567 EXIST::FUNCTION:ENGINE +X509_policy_level_get0_node 3568 EXIST::FUNCTION: +i2d_PKCS7_NDEF 3569 EXIST::FUNCTION: +EC_GROUP_get_degree 3570 EXIST::FUNCTION:EC +ASN1_generate_v3 3571 EXIST::FUNCTION: +STORE_ATTR_INFO_modify_cstr 3572 EXIST::FUNCTION: +X509_policy_tree_level_count 3573 EXIST::FUNCTION: +BN_GF2m_add 3574 EXIST::FUNCTION: +EC_KEY_get0_group 3575 EXIST::FUNCTION:EC +STORE_generate_crl 3576 EXIST::FUNCTION: +STORE_store_public_key 3577 EXIST::FUNCTION: +X509_CERT_PAIR_free 3578 EXIST::FUNCTION: +STORE_revoke_private_key 3579 EXIST::FUNCTION: +BN_nist_mod_224 3580 EXIST::FUNCTION: +SHA512_Final 3581 EXIST::FUNCTION:SHA,SHA512 +STORE_ATTR_INFO_modify_dn 3582 EXIST::FUNCTION: +STORE_method_get_initialise_function 3583 EXIST:!VMS:FUNCTION: +STORE_meth_get_initialise_fn 3583 EXIST:VMS:FUNCTION: +STORE_delete_number 3584 EXIST::FUNCTION: +i2d_EC_PUBKEY_bio 3585 EXIST::FUNCTION:BIO,EC +BIO_dgram_non_fatal_error 3586 EXIST::FUNCTION: +EC_GROUP_get_asn1_flag 3587 EXIST::FUNCTION:EC +STORE_ATTR_INFO_in_ex 3588 EXIST::FUNCTION: +STORE_list_crl_start 3589 EXIST::FUNCTION: +ECDH_get_ex_new_index 3590 EXIST::FUNCTION:ECDH +STORE_method_get_modify_function 3591 EXIST:!VMS:FUNCTION: +STORE_meth_get_modify_fn 3591 EXIST:VMS:FUNCTION: +v2i_ASN1_BIT_STRING 3592 EXIST::FUNCTION: +STORE_store_certificate 3593 EXIST::FUNCTION: +OBJ_bsearch_ex 3594 EXIST::FUNCTION: +X509_STORE_CTX_set_default 3595 EXIST::FUNCTION: +STORE_ATTR_INFO_set_sha1str 3596 EXIST::FUNCTION: +BN_GF2m_mod_inv 3597 EXIST::FUNCTION: +BN_GF2m_mod_exp 3598 EXIST::FUNCTION: +STORE_modify_public_key 3599 EXIST::FUNCTION: +STORE_method_get_list_start_function 3600 EXIST:!VMS:FUNCTION: +STORE_meth_get_list_start_fn 3600 EXIST:VMS:FUNCTION: +EC_GROUP_get0_seed 3601 EXIST::FUNCTION:EC +STORE_store_arbitrary 3602 EXIST::FUNCTION: +STORE_method_set_unlock_store_function 3603 EXIST:!VMS:FUNCTION: +STORE_meth_set_unlock_store_fn 3603 EXIST:VMS:FUNCTION: +BN_GF2m_mod_div_arr 3604 EXIST::FUNCTION: +ENGINE_set_ECDSA 3605 EXIST::FUNCTION:ENGINE +STORE_create_method 3606 EXIST::FUNCTION: +ECPKParameters_print 3607 EXIST::FUNCTION:BIO,EC +EC_KEY_get0_private_key 3608 EXIST::FUNCTION:EC +PEM_write_EC_PUBKEY 3609 EXIST:!WIN16:FUNCTION:EC +X509_VERIFY_PARAM_set1 3610 EXIST::FUNCTION: +ECDH_set_method 3611 EXIST::FUNCTION:ECDH +v2i_GENERAL_NAME_ex 3612 EXIST::FUNCTION: +ECDH_set_ex_data 3613 EXIST::FUNCTION:ECDH +STORE_generate_key 3614 EXIST::FUNCTION: +BN_nist_mod_521 3615 EXIST::FUNCTION: +X509_policy_tree_get0_level 3616 EXIST::FUNCTION: +EC_GROUP_set_point_conversion_form 3617 EXIST:!VMS:FUNCTION:EC +EC_GROUP_set_point_conv_form 3617 EXIST:VMS:FUNCTION:EC +PEM_read_EC_PUBKEY 3618 EXIST:!WIN16:FUNCTION:EC +i2d_ECDSA_SIG 3619 EXIST::FUNCTION:ECDSA +ECDSA_OpenSSL 3620 EXIST::FUNCTION:ECDSA +STORE_delete_crl 3621 EXIST::FUNCTION: +EC_KEY_get_enc_flags 3622 EXIST::FUNCTION:EC +ASN1_const_check_infinite_end 3623 EXIST::FUNCTION: +EVP_PKEY_delete_attr 3624 EXIST::FUNCTION: +ECDSA_set_default_method 3625 EXIST::FUNCTION:ECDSA +EC_POINT_set_compressed_coordinates_GF2m 3626 EXIST:!VMS:FUNCTION:EC +EC_POINT_set_compr_coords_GF2m 3626 EXIST:VMS:FUNCTION:EC +EC_GROUP_cmp 3627 EXIST::FUNCTION:EC +STORE_revoke_certificate 3628 EXIST::FUNCTION: +BN_get0_nist_prime_256 3629 EXIST::FUNCTION: +STORE_method_get_delete_function 3630 EXIST:!VMS:FUNCTION: +STORE_meth_get_delete_fn 3630 EXIST:VMS:FUNCTION: +SHA224_Init 3631 EXIST::FUNCTION:SHA,SHA256 +PEM_read_ECPrivateKey 3632 EXIST:!WIN16:FUNCTION:EC +SHA512_Init 3633 EXIST::FUNCTION:SHA,SHA512 +STORE_parse_attrs_endp 3634 EXIST::FUNCTION: +BN_set_negative 3635 EXIST::FUNCTION: +ERR_load_ECDSA_strings 3636 EXIST::FUNCTION:ECDSA +EC_GROUP_get_basis_type 3637 EXIST::FUNCTION:EC +STORE_list_public_key_next 3638 EXIST::FUNCTION: +i2v_ASN1_BIT_STRING 3639 EXIST::FUNCTION: +STORE_OBJECT_free 3640 EXIST::FUNCTION: +BN_nist_mod_384 3641 EXIST::FUNCTION: +i2d_X509_CERT_PAIR 3642 EXIST::FUNCTION: +PEM_write_ECPKParameters 3643 EXIST:!WIN16:FUNCTION:EC +ECDH_compute_key 3644 EXIST::FUNCTION:ECDH +STORE_ATTR_INFO_get0_sha1str 3645 EXIST::FUNCTION: +ENGINE_register_all_ECDH 3646 EXIST::FUNCTION:ENGINE +pqueue_pop 3647 EXIST::FUNCTION: +STORE_ATTR_INFO_get0_cstr 3648 EXIST::FUNCTION: +POLICY_CONSTRAINTS_it 3649 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +POLICY_CONSTRAINTS_it 3649 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +STORE_get_ex_new_index 3650 EXIST::FUNCTION: +EVP_PKEY_get_attr_by_OBJ 3651 EXIST::FUNCTION: +X509_VERIFY_PARAM_add0_policy 3652 EXIST::FUNCTION: +BN_GF2m_mod_solve_quad 3653 EXIST::FUNCTION: +SHA256 3654 EXIST::FUNCTION:SHA,SHA256 +i2d_ECPrivateKey_fp 3655 EXIST::FUNCTION:EC,FP_API +X509_policy_tree_get0_user_policies 3656 EXIST:!VMS:FUNCTION: +X509_pcy_tree_get0_usr_policies 3656 EXIST:VMS:FUNCTION: +OPENSSL_DIR_read 3657 EXIST::FUNCTION: +ENGINE_register_all_ECDSA 3658 EXIST::FUNCTION:ENGINE +X509_VERIFY_PARAM_lookup 3659 EXIST::FUNCTION: +EC_POINT_get_affine_coordinates_GF2m 3660 EXIST:!VMS:FUNCTION:EC +EC_POINT_get_affine_coords_GF2m 3660 EXIST:VMS:FUNCTION:EC +EC_GROUP_dup 3661 EXIST::FUNCTION:EC +ENGINE_get_default_ECDSA 3662 EXIST::FUNCTION:ENGINE +EC_KEY_new 3663 EXIST::FUNCTION:EC +SHA256_Transform 3664 EXIST::FUNCTION:SHA,SHA256 +EC_KEY_set_enc_flags 3665 EXIST::FUNCTION:EC +ECDSA_verify 3666 EXIST::FUNCTION:ECDSA +EC_POINT_point2hex 3667 EXIST::FUNCTION:EC +ENGINE_get_STORE 3668 EXIST::FUNCTION:ENGINE +SHA512 3669 EXIST::FUNCTION:SHA,SHA512 +STORE_get_certificate 3670 EXIST::FUNCTION: +ECDSA_do_sign_ex 3671 EXIST::FUNCTION:ECDSA +ECDSA_do_verify 3672 EXIST::FUNCTION:ECDSA +d2i_ECPrivateKey_fp 3673 EXIST::FUNCTION:EC,FP_API +STORE_delete_certificate 3674 EXIST::FUNCTION: +SHA512_Transform 3675 EXIST::FUNCTION:SHA,SHA512 +X509_STORE_set1_param 3676 EXIST::FUNCTION: +STORE_method_get_ctrl_function 3677 EXIST::FUNCTION: +STORE_free 3678 EXIST::FUNCTION: +PEM_write_ECPrivateKey 3679 EXIST:!WIN16:FUNCTION:EC +STORE_method_get_unlock_store_function 3680 EXIST:!VMS:FUNCTION: +STORE_meth_get_unlock_store_fn 3680 EXIST:VMS:FUNCTION: +STORE_get_ex_data 3681 EXIST::FUNCTION: +EC_KEY_set_public_key 3682 EXIST::FUNCTION:EC +PEM_read_ECPKParameters 3683 EXIST:!WIN16:FUNCTION:EC +X509_CERT_PAIR_new 3684 EXIST::FUNCTION: +ENGINE_register_STORE 3685 EXIST::FUNCTION:ENGINE +RSA_generate_key_ex 3686 EXIST::FUNCTION:RSA +DSA_generate_parameters_ex 3687 EXIST::FUNCTION:DSA +ECParameters_print_fp 3688 EXIST::FUNCTION:EC,FP_API +X509V3_NAME_from_section 3689 EXIST::FUNCTION: +EVP_PKEY_add1_attr 3690 EXIST::FUNCTION: +STORE_modify_crl 3691 EXIST::FUNCTION: +STORE_list_private_key_start 3692 EXIST::FUNCTION: +POLICY_MAPPINGS_it 3693 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +POLICY_MAPPINGS_it 3693 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +GENERAL_SUBTREE_it 3694 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: +GENERAL_SUBTREE_it 3694 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: +EC_GROUP_get_curve_name 3695 EXIST::FUNCTION:EC +PEM_write_X509_CERT_PAIR 3696 EXIST:!WIN16:FUNCTION: +BIO_dump_indent_cb 3697 EXIST::FUNCTION: +d2i_X509_CERT_PAIR 3698 EXIST::FUNCTION: +STORE_list_private_key_endp 3699 EXIST::FUNCTION: +asn1_const_Finish 3700 EXIST::FUNCTION: +i2d_EC_PUBKEY_fp 3701 EXIST::FUNCTION:EC,FP_API +BN_nist_mod_256 3702 EXIST::FUNCTION: +X509_VERIFY_PARAM_add0_table 3703 EXIST::FUNCTION: +pqueue_free 3704 EXIST::FUNCTION: +BN_BLINDING_create_param 3705 EXIST::FUNCTION: +ECDSA_size 3706 EXIST::FUNCTION:ECDSA +d2i_EC_PUBKEY_bio 3707 EXIST::FUNCTION:BIO,EC +BN_get0_nist_prime_521 3708 EXIST::FUNCTION: +STORE_ATTR_INFO_modify_sha1str 3709 EXIST::FUNCTION: +BN_generate_prime_ex 3710 EXIST::FUNCTION: +EC_GROUP_new_by_curve_name 3711 EXIST::FUNCTION:EC +SHA256_Final 3712 EXIST::FUNCTION:SHA,SHA256 +DH_generate_parameters_ex 3713 EXIST::FUNCTION:DH +PEM_read_bio_ECPrivateKey 3714 EXIST::FUNCTION:EC +STORE_method_get_cleanup_function 3715 EXIST:!VMS:FUNCTION: +STORE_meth_get_cleanup_fn 3715 EXIST:VMS:FUNCTION: +ENGINE_get_ECDH 3716 EXIST::FUNCTION:ENGINE +d2i_ECDSA_SIG 3717 EXIST::FUNCTION:ECDSA +BN_is_prime_fasttest_ex 3718 EXIST::FUNCTION: +ECDSA_sign 3719 EXIST::FUNCTION:ECDSA +X509_policy_check 3720 EXIST::FUNCTION: +EVP_PKEY_get_attr_by_NID 3721 EXIST::FUNCTION: +STORE_set_ex_data 3722 EXIST::FUNCTION: +ENGINE_get_ECDSA 3723 EXIST::FUNCTION:ENGINE +EVP_ecdsa 3724 EXIST::FUNCTION:SHA +BN_BLINDING_get_flags 3725 EXIST::FUNCTION: +PKCS12_add_cert 3726 EXIST::FUNCTION: +STORE_OBJECT_new 3727 EXIST::FUNCTION: +ERR_load_ECDH_strings 3728 EXIST::FUNCTION:ECDH +EC_KEY_dup 3729 EXIST::FUNCTION:EC +EVP_CIPHER_CTX_rand_key 3730 EXIST::FUNCTION: +ECDSA_set_method 3731 EXIST::FUNCTION:ECDSA +a2i_IPADDRESS_NC 3732 EXIST::FUNCTION: +d2i_ECParameters 3733 EXIST::FUNCTION:EC +STORE_list_certificate_end 3734 EXIST::FUNCTION: +STORE_get_crl 3735 EXIST::FUNCTION: +X509_POLICY_NODE_print 3736 EXIST::FUNCTION: +SHA384_Init 3737 EXIST::FUNCTION:SHA,SHA512 +EC_GF2m_simple_method 3738 EXIST::FUNCTION:EC +ECDSA_set_ex_data 3739 EXIST::FUNCTION:ECDSA +SHA384_Final 3740 EXIST::FUNCTION:SHA,SHA512 +PKCS7_set_digest 3741 EXIST::FUNCTION: +EC_KEY_print 3742 EXIST::FUNCTION:BIO,EC +STORE_method_set_lock_store_function 3743 EXIST:!VMS:FUNCTION: +STORE_meth_set_lock_store_fn 3743 EXIST:VMS:FUNCTION: +ECDSA_get_ex_new_index 3744 EXIST::FUNCTION:ECDSA +SHA384 3745 EXIST::FUNCTION:SHA,SHA512 +POLICY_MAPPING_new 3746 EXIST::FUNCTION: +STORE_list_certificate_endp 3747 EXIST::FUNCTION: +X509_STORE_CTX_get0_policy_tree 3748 EXIST::FUNCTION: +EC_GROUP_set_asn1_flag 3749 EXIST::FUNCTION:EC +EC_KEY_check_key 3750 EXIST::FUNCTION:EC +d2i_EC_PUBKEY_fp 3751 EXIST::FUNCTION:EC,FP_API +PKCS7_set0_type_other 3752 EXIST::FUNCTION: +PEM_read_bio_X509_CERT_PAIR 3753 EXIST::FUNCTION: +pqueue_next 3754 EXIST::FUNCTION: +STORE_method_get_list_end_function 3755 EXIST:!VMS:FUNCTION: +STORE_meth_get_list_end_fn 3755 EXIST:VMS:FUNCTION: +EVP_PKEY_add1_attr_by_OBJ 3756 EXIST::FUNCTION: +X509_VERIFY_PARAM_set_time 3757 EXIST::FUNCTION: +pqueue_new 3758 EXIST::FUNCTION: +ENGINE_set_default_ECDH 3759 EXIST::FUNCTION:ENGINE +STORE_new_method 3760 EXIST::FUNCTION: +PKCS12_add_key 3761 EXIST::FUNCTION: +DSO_merge 3762 EXIST::FUNCTION: +EC_POINT_hex2point 3763 EXIST::FUNCTION:EC +BIO_dump_cb 3764 EXIST::FUNCTION: +SHA256_Update 3765 EXIST::FUNCTION:SHA,SHA256 +pqueue_insert 3766 EXIST::FUNCTION: +pitem_free 3767 EXIST::FUNCTION: +BN_GF2m_mod_inv_arr 3768 EXIST::FUNCTION: +ENGINE_unregister_ECDSA 3769 EXIST::FUNCTION:ENGINE +BN_BLINDING_set_thread_id 3770 EXIST::FUNCTION: +get_rfc3526_prime_8192 3771 EXIST::FUNCTION: +X509_VERIFY_PARAM_clear_flags 3772 EXIST::FUNCTION: +get_rfc2409_prime_1024 3773 EXIST::FUNCTION: +DH_check_pub_key 3774 EXIST::FUNCTION:DH +get_rfc3526_prime_2048 3775 EXIST::FUNCTION: +get_rfc3526_prime_6144 3776 EXIST::FUNCTION: +get_rfc3526_prime_1536 3777 EXIST::FUNCTION: +get_rfc3526_prime_3072 3778 EXIST::FUNCTION: +get_rfc3526_prime_4096 3779 EXIST::FUNCTION: +get_rfc2409_prime_768 3780 EXIST::FUNCTION: +X509_VERIFY_PARAM_get_flags 3781 EXIST::FUNCTION: +EVP_CIPHER_CTX_new 3782 EXIST::FUNCTION: +EVP_CIPHER_CTX_free 3783 EXIST::FUNCTION: diff --git a/crypto/openssl/util/mk1mf.pl b/crypto/openssl/util/mk1mf.pl index 957264c..10eb19c 100755 --- a/crypto/openssl/util/mk1mf.pl +++ b/crypto/openssl/util/mk1mf.pl @@ -10,6 +10,12 @@ $OPTIONS=""; $ssl_version=""; $banner="\t\@echo Building OpenSSL"; +my $no_static_engine = 0; +my $engines = ""; +local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic +local $zlib_lib = ""; + + open(IN,"<Makefile") || die "unable to open Makefile!\n"; while(<IN>) { $ssl_version=$1 if (/^VERSION=(.*)$/); @@ -24,25 +30,25 @@ $infile="MINFO"; %ops=( "VC-WIN32", "Microsoft Visual C++ [4-6] - Windows NT or 9X", + "VC-WIN64I", "Microsoft C/C++ - Win64/IA-64", + "VC-WIN64A", "Microsoft C/C++ - Win64/x64", "VC-CE", "Microsoft eMbedded Visual C++ 3.0 - Windows CE ONLY", "VC-NT", "Microsoft Visual C++ [4-6] - Windows NT ONLY", - "VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286", - "VC-WIN16", "Alias for VC-W31-32", - "VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+", - "VC-MSDOS","Microsoft Visual C++ 1.52 - MSDOS", "Mingw32", "GNU C++ - Windows NT or 9x", "Mingw32-files", "Create files with DOS copy ...", "BC-NT", "Borland C++ 4.5 - Windows NT", - "BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING", - "BC-MSDOS","Borland C++ 4.5 - MSDOS", "linux-elf","Linux elf", "ultrix-mips","DEC mips ultrix", "FreeBSD","FreeBSD distribution", "OS2-EMX", "EMX GCC OS/2", + "netware-clib", "CodeWarrior for NetWare - CLib - with WinSock Sockets", + "netware-libc", "CodeWarrior for NetWare - LibC - with WinSock Sockets", + "netware-libc-bsdsock", "CodeWarrior for NetWare - LibC - with BSD Sockets", "default","cc under unix", ); $platform=""; +my $xcflags=""; foreach (@ARGV) { if (!&read_options && !defined($ops{$_})) @@ -64,9 +70,13 @@ and [options] can be one of no-asm - No x86 asm no-krb5 - No KRB5 no-ec - No EC + no-ecdsa - No ECDSA + no-ecdh - No ECDH no-engine - No engine no-hw - No hw nasm - Use NASM for x86 asm + nw-nasm - Use NASM x86 asm for NetWare + nw-mwasm - Use Metrowerks x86 asm for NetWare gaswin - Use GNU as with Mingw32 no-socks - No socket code no-err - No error strings @@ -91,6 +101,8 @@ foreach (grep(!/^$/, split(/ /, $OPTIONS))) print STDERR "unknown option - $_\n" if !&read_options; } +$no_static_engine = 0 if (!$shlib); + $no_mdc2=1 if ($no_des); $no_ssl3=1 if ($no_md5 || $no_sha); @@ -103,7 +115,8 @@ $out_def="out"; $inc_def="outinc"; $tmp_def="tmp"; -$mkdir="-mkdir"; +$perl="perl" unless defined $perl; +$mkdir="-mkdir" unless defined $mkdir; ($ssl,$crypto)=("ssl","crypto"); $ranlib="echo ranlib"; @@ -114,36 +127,16 @@ $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:''; # $bin_dir.=$o causes a core dump on my sparc :-( + $NT=0; push(@INC,"util/pl","pl"); -if ($platform eq "VC-MSDOS") - { - $asmbits=16; - $msdos=1; - require 'VC-16.pl'; - } -elsif ($platform eq "VC-W31-16") +if (($platform =~ /VC-(.+)/)) { - $asmbits=16; - $msdos=1; $win16=1; - require 'VC-16.pl'; - } -elsif (($platform eq "VC-W31-32") || ($platform eq "VC-WIN16")) - { - $asmbits=32; - $msdos=1; $win16=1; - require 'VC-16.pl'; - } -elsif (($platform eq "VC-WIN32") || ($platform eq "VC-NT")) - { - $NT = 1 if $platform eq "VC-NT"; + $FLAVOR=$1; + $NT = 1 if $1 eq "NT"; require 'VC-32.pl'; } -elsif ($platform eq "VC-CE") - { - require 'VC-CE.pl'; - } elsif ($platform eq "Mingw32") { require 'Mingw32.pl'; @@ -157,23 +150,6 @@ elsif ($platform eq "BC-NT") $bc=1; require 'BC-32.pl'; } -elsif ($platform eq "BC-W31") - { - $bc=1; - $msdos=1; $w16=1; - require 'BC-16.pl'; - } -elsif ($platform eq "BC-Q16") - { - $msdos=1; $w16=1; $shlib=0; $qw=1; - require 'BC-16.pl'; - } -elsif ($platform eq "BC-MSDOS") - { - $asmbits=16; - $msdos=1; - require 'BC-16.pl'; - } elsif ($platform eq "FreeBSD") { require 'unix.pl'; @@ -196,6 +172,13 @@ elsif ($platform eq "OS2-EMX") $wc=1; require 'OS2-EMX.pl'; } +elsif (($platform eq "netware-clib") || ($platform eq "netware-libc") || + ($platform eq "netware-libc-bsdsock")) + { + $LIBC=1 if $platform eq "netware-libc" || $platform eq "netware-libc-bsdsock"; + $BSDSOCK=1 if $platform eq "netware-libc-bsdsock"; + require 'netware.pl'; + } else { require "unix.pl"; @@ -210,6 +193,8 @@ $inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def; $bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq '')); +$cflags= "$xcflags$cflags" if $xcflags ne ""; + $cflags.=" -DOPENSSL_NO_IDEA" if $no_idea; $cflags.=" -DOPENSSL_NO_AES" if $no_aes; $cflags.=" -DOPENSSL_NO_RC2" if $no_rc2; @@ -222,7 +207,7 @@ $cflags.=" -DOPENSSL_NO_SHA" if $no_sha; $cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1; $cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd; $cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2; -$cflags.=" -DOPENSSL_NO_BF" if $no_bf; +$cflags.=" -DOPENSSL_NO_BF" if $no_bf; $cflags.=" -DOPENSSL_NO_CAST" if $no_cast; $cflags.=" -DOPENSSL_NO_DES" if $no_des; $cflags.=" -DOPENSSL_NO_RSA" if $no_rsa; @@ -234,9 +219,23 @@ $cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3; $cflags.=" -DOPENSSL_NO_ERR" if $no_err; $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; $cflags.=" -DOPENSSL_NO_EC" if $no_ec; +$cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa; +$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh; $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; $cflags.=" -DOPENSSL_NO_HW" if $no_hw; -$cflags.=" -DOPENSSL_FIPS" if $fips; + +$cflags.= " -DZLIB" if $zlib_opt; +$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2; + +if ($no_static_engine) + { + $cflags .= " -DOPENSSL_NO_STATIC_ENGINE"; + } +else + { + $cflags .= " -DOPENSSL_NO_DYNAMIC_ENGINE"; + } + #$cflags.=" -DRSAref" if $rsaref ne ""; ## if ($unix) @@ -246,6 +245,7 @@ $cflags.=" -DOPENSSL_FIPS" if $fips; $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); + %shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL", "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO"); @@ -262,6 +262,96 @@ $link="$bin_dir$link" if ($link !~ /^\$/); $INSTALLTOP =~ s|/|$o|g; +############################################# +# We parse in input file and 'store' info for later printing. +open(IN,"<$infile") || die "unable to open $infile:$!\n"; +$_=<IN>; +for (;;) + { + chop; + + ($key,$val)=/^([^=]+)=(.*)/; + if ($key eq "RELATIVE_DIRECTORY") + { + if ($lib ne "") + { + $uc=$lib; + $uc =~ s/^lib(.*)\.a/$1/; + $uc =~ tr/a-z/A-Z/; + $lib_nam{$uc}=$uc; + $lib_obj{$uc}.=$libobj." "; + } + last if ($val eq "FINISHED"); + $lib=""; + $libobj=""; + $dir=$val; + } + + if ($key eq "KRB5_INCLUDES") + { $cflags .= " $val";} + + if ($key eq "ZLIB_INCLUDE") + { $cflags .= " $val" if $val ne "";} + + if ($key eq "LIBZLIB") + { $zlib_lib = "$val" if $val ne "";} + + if ($key eq "LIBKRB5") + { $ex_libs .= " $val" if $val ne "";} + + if ($key eq "TEST") + { $test.=&var_add($dir,$val, 0); } + + if (($key eq "PROGS") || ($key eq "E_OBJ")) + { $e_exe.=&var_add($dir,$val, 0); } + + if ($key eq "LIB") + { + $lib=$val; + $lib =~ s/^.*\/([^\/]+)$/$1/; + } + + if ($key eq "EXHEADER") + { $exheader.=&var_add($dir,$val, 1); } + + if ($key eq "HEADER") + { $header.=&var_add($dir,$val, 1); } + + if ($key eq "LIBOBJ" && ($dir ne "engines" || !$no_static_engine)) + { $libobj=&var_add($dir,$val, 0); } + if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine) + { $engines.=$val } + + if (!($_=<IN>)) + { $_="RELATIVE_DIRECTORY=FINISHED\n"; } + } +close(IN); + +if ($shlib) + { + $extra_install= <<"EOF"; + \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}bin + \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}bin + \$(CP) \$(L_SSL) \$(INSTALLTOP)${o}lib + \$(CP) \$(L_CRYPTO) \$(INSTALLTOP)${o}lib +EOF + if ($no_static_engine) + { + $extra_install .= <<"EOF" + \$(MKDIR) \$(INSTALLTOP)${o}lib${o}engines + \$(CP) \$(E_SHLIB) \$(INSTALLTOP)${o}lib${o}engines +EOF + } + } +else + { + $extra_install= <<"EOF"; + \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib + \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib +EOF + $ex_libs .= " $zlib_lib" if $zlib_opt == 1; + } + $defs= <<"EOF"; # This makefile has been automatically generated from the OpenSSL distribution. # This single makefile will build the complete OpenSSL distribution and @@ -280,14 +370,6 @@ EOF $defs .= $preamble if defined $preamble; -if ($platform eq "VC-CE") - { - $defs.= <<"EOF"; -!INCLUDE <\$(WCECOMPAT)/wcedefs.mak> - -EOF - } - $defs.= <<"EOF"; INSTALLTOP=$INSTALLTOP @@ -309,6 +391,7 @@ SRC_D=$src_dir LINK=$link LFLAGS=$lflags +RSC=$rsc BN_ASM_OBJ=$bn_asm_obj BN_ASM_SRC=$bn_asm_src @@ -339,6 +422,7 @@ TMP_D=$tmp_dir INC_D=$inc_dir INCO_D=$inc_dir${o}openssl +PERL=$perl CP=$cp RM=$rm RANLIB=$ranlib @@ -358,12 +442,14 @@ CRYPTO=$crypto # BIN_D - Binary output directory # TEST_D - Binary test file output directory # LIB_D - library output directory +# ENG_D - dynamic engine output directory # Note: if you change these point to different directories then uncomment out # the lines around the 'NB' comment below. # BIN_D=\$(OUT_D) TEST_D=\$(OUT_D) LIB_D=\$(OUT_D) +ENG_D=\$(OUT_D) # INCL_D - local library directory # OBJ_D - temp object file directory @@ -419,11 +505,11 @@ $banner headers: \$(HEADER) \$(EXHEADER) @ -lib: \$(LIBS_DEP) +lib: \$(LIBS_DEP) \$(E_SHLIB) exe: \$(T_EXE) \$(BIN_D)$o\$(E_EXE)$exep -install: +install: all \$(MKDIR) \$(INSTALLTOP) \$(MKDIR) \$(INSTALLTOP)${o}bin \$(MKDIR) \$(INSTALLTOP)${o}include @@ -431,8 +517,13 @@ install: \$(MKDIR) \$(INSTALLTOP)${o}lib \$(CP) \$(INCO_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include${o}openssl \$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin - \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib - \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib + \$(CP) apps${o}openssl.cnf \$(INSTALLTOP) +$extra_install + + +test: \$(T_EXE) + cd \$(BIN_D) + ..${o}ms${o}test clean: \$(RM) \$(TMP_D)$o*.* @@ -479,57 +570,6 @@ printf OUT " #define DATE \"%s\"\n", scalar gmtime(); printf OUT "#endif\n"; close(OUT); -############################################# -# We parse in input file and 'store' info for later printing. -open(IN,"<$infile") || die "unable to open $infile:$!\n"; -$_=<IN>; -for (;;) - { - chop; - - ($key,$val)=/^([^=]+)=(.*)/; - if ($key eq "RELATIVE_DIRECTORY") - { - if ($lib ne "") - { - $uc=$lib; - $uc =~ s/^lib(.*)\.a/$1/; - $uc =~ tr/a-z/A-Z/; - $lib_nam{$uc}=$uc; - $lib_obj{$uc}.=$libobj." "; - } - last if ($val eq "FINISHED"); - $lib=""; - $libobj=""; - $dir=$val; - } - - if ($key eq "TEST") - { $test.=&var_add($dir,$val); } - - if (($key eq "PROGS") || ($key eq "E_OBJ")) - { $e_exe.=&var_add($dir,$val); } - - if ($key eq "LIB") - { - $lib=$val; - $lib =~ s/^.*\/([^\/]+)$/$1/; - } - - if ($key eq "EXHEADER") - { $exheader.=&var_add($dir,$val); } - - if ($key eq "HEADER") - { $header.=&var_add($dir,$val); } - - if ($key eq "LIBOBJ") - { $libobj=&var_add($dir,$val); } - - if (!($_=<IN>)) - { $_="RELATIVE_DIRECTORY=FINISHED\n"; } - } -close(IN); - # Strip of trailing ' ' foreach (keys %lib_obj) { $lib_obj{$_}=&clean_up_ws($lib_obj{$_}); } $test=&clean_up_ws($test); @@ -542,11 +582,11 @@ foreach (split(/\s+/,$exheader)){ $h{$_}=1; } foreach (split(/\s+/,$header)) { $h.=$_." " unless $h{$_}; } chop($h); $header=$h; -$defs.=&do_defs("HEADER",$header,"\$(INCL_D)",".h"); -$rules.=&do_copy_rule("\$(INCL_D)",$header,".h"); +$defs.=&do_defs("HEADER",$header,"\$(INCL_D)",""); +$rules.=&do_copy_rule("\$(INCL_D)",$header,""); -$defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)",".h"); -$rules.=&do_copy_rule("\$(INCO_D)",$exheader,".h"); +$defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)",""); +$rules.=&do_copy_rule("\$(INCO_D)",$exheader,""); $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj); $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)"); @@ -621,6 +661,18 @@ foreach (values %lib_nam) $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib); } +# hack to add version info on MSVC +if (($platform eq "VC-WIN32") || ($platform eq "VC-NT")) { + $rules.= <<"EOF"; +\$(OBJ_D)\\\$(CRYPTO).res: ms\\version32.rc + \$(RSC) /fo"\$(OBJ_D)\\\$(CRYPTO).res" /d CRYPTO ms\\version32.rc + +\$(OBJ_D)\\\$(SSL).res: ms\\version32.rc + \$(RSC) /fo"\$(OBJ_D)\\\$(SSL).res" /d SSL ms\\version32.rc + +EOF +} + $defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep); foreach (split(/\s+/,$test)) { @@ -629,17 +681,21 @@ foreach (split(/\s+/,$test)) $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); } -$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); -$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); +$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp); -if ($fips) +foreach (split(/\s+/,$engines)) { - $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)","\$(BIN_D)$o.sha1","\$(BIN_D)$o\$(E_EXE)$exep"); - } -else - { - $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); + $rules.=&do_compile_rule("\$(OBJ_D)","engines${o}e_$_",$lib); + $rules.= &do_lib_rule("\$(OBJ_D)${o}e_${_}.obj","\$(ENG_D)$o$_$shlibp","",$shlib,""); } + + + +$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); +$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); + +$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); + print $defs; if ($platform eq "linux-elf") { @@ -658,7 +714,7 @@ print $rules; # directories sub var_add { - local($dir,$val)=@_; + local($dir,$val,$keepext)=@_; local(@a,$_,$ret); return("") if $no_engine && $dir =~ /\/engine/; @@ -687,7 +743,7 @@ sub var_add $val =~ s/^\s*(.*)\s*$/$1/; @a=split(/\s+/,$val); - grep(s/\.[och]$//,@a); + grep(s/\.[och]$//,@a) unless $keepext; @a=grep(!/^e_.*_3d$/,@a) if $no_des; @a=grep(!/^e_.*_d$/,@a) if $no_des; @@ -787,7 +843,15 @@ sub do_defs $Vars{$var}.="$t "; $ret.=$t; } - chop($ret); + # hack to add version info on MSVC + if ($shlib && (($platform eq "VC-WIN32") || ($platform eq "VC-NT"))) + { + if ($var eq "CRYPTOOBJ") + { $ret.="\$(OBJ_D)\\\$(CRYPTO).res "; } + elsif ($var eq "SSLOBJ") + { $ret.="\$(OBJ_D)\\\$(SSL).res "; } + } + chomp($ret); $ret.="\n\n"; return($ret); } @@ -889,52 +953,122 @@ sub do_copy_rule sub read_options { - if (/^no-rc2$/) { $no_rc2=1; } - elsif (/^no-rc4$/) { $no_rc4=1; } - elsif (/^no-rc5$/) { $no_rc5=1; } - elsif (/^no-idea$/) { $no_idea=1; } - elsif (/^no-aes$/) { $no_aes=1; } - elsif (/^no-des$/) { $no_des=1; } - elsif (/^no-bf$/) { $no_bf=1; } - elsif (/^no-cast$/) { $no_cast=1; } - elsif (/^no-md2$/) { $no_md2=1; } - elsif (/^no-md4$/) { $no_md4=1; } - elsif (/^no-md5$/) { $no_md5=1; } - elsif (/^no-sha$/) { $no_sha=1; } - elsif (/^no-sha1$/) { $no_sha1=1; } - elsif (/^no-ripemd$/) { $no_ripemd=1; } - elsif (/^no-mdc2$/) { $no_mdc2=1; } - elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_rc5=$no_idea=$no_rsa=1; } - elsif (/^no-rsa$/) { $no_rsa=1; } - elsif (/^no-dsa$/) { $no_dsa=1; } - elsif (/^no-dh$/) { $no_dh=1; } - elsif (/^no-hmac$/) { $no_hmac=1; } - elsif (/^no-aes$/) { $no_aes=1; } - elsif (/^no-asm$/) { $no_asm=1; } - elsif (/^nasm$/) { $nasm=1; } - elsif (/^gaswin$/) { $gaswin=1; } - elsif (/^no-ssl2$/) { $no_ssl2=1; } - elsif (/^no-ssl3$/) { $no_ssl3=1; } - elsif (/^no-err$/) { $no_err=1; } - elsif (/^no-sock$/) { $no_sock=1; } - elsif (/^no-krb5$/) { $no_krb5=1; } - elsif (/^no-ec$/) { $no_ec=1; } - elsif (/^no-engine$/) { $no_engine=1; } - elsif (/^no-hw$/) { $no_hw=1; } - - elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1; - $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1; - $no_ssl2=$no_err=$no_ripemd=$no_rc5=1; - $no_aes=1; } - - elsif (/^rsaref$/) { } - elsif (/^fips$/) { $fips=1; } - elsif (/^gcc$/) { $gcc=1; } - elsif (/^debug$/) { $debug=1; } - elsif (/^profile$/) { $profile=1; } - elsif (/^shlib$/) { $shlib=1; } - elsif (/^dll$/) { $shlib=1; } - elsif (/^shared$/) { } # We just need to ignore it for now... + # Many options are handled in a similar way. In particular + # no-xxx sets zero or more scalars to 1. + # Process these using a hash containing the option name and + # reference to the scalars to set. + + my %valid_options = ( + "no-rc2" => \$no_rc2, + "no-rc4" => \$no_rc4, + "no-rc5" => \$no_rc5, + "no-idea" => \$no_idea, + "no-aes" => \$no_aes, + "no-des" => \$no_des, + "no-bf" => \$no_bf, + "no-cast" => \$no_cast, + "no-md2" => \$no_md2, + "no-md4" => \$no_md4, + "no-md5" => \$no_md5, + "no-sha" => \$no_sha, + "no-sha1" => \$no_sha1, + "no-ripemd" => \$no_ripemd, + "no-mdc2" => \$no_mdc2, + "no-patents" => + [\$no_rc2, \$no_rc4, \$no_rc5, \$no_idea, \$no_rsa], + "no-rsa" => \$no_rsa, + "no-dsa" => \$no_dsa, + "no-dh" => \$no_dh, + "no-hmac" => \$no_hmac, + "no-aes" => \$no_aes, + "no-asm" => \$no_asm, + "nasm" => \$nasm, + "nw-nasm" => \$nw_nasm, + "nw-mwasm" => \$nw_mwasm, + "gaswin" => \$gaswin, + "no-ssl2" => \$no_ssl2, + "no-ssl3" => \$no_ssl3, + "no-err" => \$no_err, + "no-sock" => \$no_sock, + "no-krb5" => \$no_krb5, + "no-ec" => \$no_ec, + "no-ecdsa" => \$no_ecdsa, + "no-ecdh" => \$no_ecdh, + "no-engine" => \$no_engine, + "no-hw" => \$no_hw, + "just-ssl" => + [\$no_rc2, \$no_idea, \$no_des, \$no_bf, \$no_cast, + \$no_md2, \$no_sha, \$no_mdc2, \$no_dsa, \$no_dh, + \$no_ssl2, \$no_err, \$no_ripemd, \$no_rc5, + \$no_aes], + "rsaref" => 0, + "gcc" => \$gcc, + "debug" => \$debug, + "profile" => \$profile, + "shlib" => \$shlib, + "dll" => \$shlib, + "shared" => 0, + "no-gmp" => 0, + "no-shared" => 0, + "no-zlib" => 0, + "no-zlib-dynamic" => 0, + ); + + if (exists $valid_options{$_}) + { + my $r = $valid_options{$_}; + if ( ref $r eq "SCALAR") + { $$r = 1;} + elsif ( ref $r eq "ARRAY") + { + my $r2; + foreach $r2 (@$r) + { + $$r2 = 1; + } + } + } + elsif (/^no-comp$/) { $xcflags = "-DOPENSSL_NO_COMP $xcflags"; } + elsif (/^enable-zlib$/) { $zlib_opt = 1 if $zlib_opt == 0 } + elsif (/^enable-zlib-dynamic$/) + { + $zlib_opt = 2; + } + elsif (/^no-static-engine/) + { + $no_static_engine = 1; + } + elsif (/^enable-static-engine/) + { + $no_static_engine = 0; + } + # There are also enable-xxx options which correspond to + # the no-xxx. Since the scalars are enabled by default + # these can be ignored. + elsif (/^enable-/) + { + my $t = $_; + $t =~ s/^enable/no/; + if (exists $valid_options{$t}) + {return 1;} + return 0; + } + elsif (/^--with-krb5-flavor=(.*)$/) + { + my $krb5_flavor = $1; + if ($krb5_flavor =~ /^force-[Hh]eimdal$/) + { + $xcflags="-DKRB5_HEIMDAL $xcflags"; + } + elsif ($krb5_flavor =~ /^MIT/i) + { + $xcflags="-DKRB5_MIT $xcflags"; + if ($krb5_flavor =~ /^MIT[._-]*1[._-]*[01]/i) + { + $xcflags="-DKRB5_MIT_OLD11 $xcflags" + } + } + } elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } elsif (/^-[lL].*$/) { $l_flags.="$_ "; } elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) diff --git a/crypto/openssl/util/mkdef.pl b/crypto/openssl/util/mkdef.pl index 443d74d..2438600 100755 --- a/crypto/openssl/util/mkdef.pl +++ b/crypto/openssl/util/mkdef.pl @@ -79,19 +79,23 @@ my $OS2=0; my $safe_stack_def = 0; my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", - "EXPORT_VAR_AS_FUNCTION", "OPENSSL_FIPS" ); + "EXPORT_VAR_AS_FUNCTION" ); my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", - "RIPEMD", - "MDC2", "RSA", "DSA", "DH", "EC", "HMAC", "AES", + "SHA256", "SHA512", "RIPEMD", + "MDC2", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "HMAC", "AES", # Envelope "algorithms" "EVP", "X509", "ASN1_TYPEDEFS", # Helper "algorithms" "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", "LOCKING", # External "algorithms" - "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" ); + "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM", + # Engines + "STATIC_ENGINE", "ENGINE", "HW", "GMP", + # Deprecated functions + "DEPRECATED" ); my $options=""; open(IN,"<Makefile") || die "unable to open Makefile!\n"; @@ -107,9 +111,9 @@ my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; my $no_cast; my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; -my $no_ec; my $no_engine; my $no_hw; -my $no_fp_api; -my $fips; +my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; +my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated; + foreach (@ARGV, split(/ /, $options)) { @@ -130,7 +134,6 @@ foreach (@ARGV, split(/ /, $options)) } $VMS=1 if $_ eq "VMS"; $OS2=1 if $_ eq "OS2"; - $fips=1 if $_ eq "fips"; $do_ssl=1 if $_ eq "ssleay"; if ($_ eq "ssl") { @@ -142,6 +145,8 @@ foreach (@ARGV, split(/ /, $options)) $do_crypto=1; $libname=$_; } + $no_static_engine=1 if $_ eq "no-static-engine"; + $no_static_engine=0 if $_ eq "enable-static-engine"; $do_update=1 if $_ eq "update"; $do_rewrite=1 if $_ eq "rewrite"; $do_ctest=1 if $_ eq "ctest"; @@ -166,6 +171,8 @@ foreach (@ARGV, split(/ /, $options)) elsif (/^no-dsa$/) { $no_dsa=1; } elsif (/^no-dh$/) { $no_dh=1; } elsif (/^no-ec$/) { $no_ec=1; } + elsif (/^no-ecdsa$/) { $no_ecdsa=1; } + elsif (/^no-ecdh$/) { $no_ecdh=1; } elsif (/^no-hmac$/) { $no_hmac=1; } elsif (/^no-aes$/) { $no_aes=1; } elsif (/^no-evp$/) { $no_evp=1; } @@ -180,6 +187,7 @@ foreach (@ARGV, split(/ /, $options)) elsif (/^no-krb5$/) { $no_krb5=1; } elsif (/^no-engine$/) { $no_engine=1; } elsif (/^no-hw$/) { $no_hw=1; } + elsif (/^no-gmp$/) { $no_gmp=1; } } @@ -217,6 +225,7 @@ my $ssl="ssl/ssl.h"; $ssl.=" ssl/kssl.h"; my $crypto ="crypto/crypto.h"; +$crypto.=" crypto/o_dir.h"; $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; @@ -237,6 +246,8 @@ $crypto.=" crypto/rsa/rsa.h" ; # unless $no_rsa; $crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; $crypto.=" crypto/dh/dh.h" ; # unless $no_dh; $crypto.=" crypto/ec/ec.h" ; # unless $no_ec; +$crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa; +$crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh; $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; $crypto.=" crypto/engine/engine.h"; # unless $no_engine; @@ -267,7 +278,8 @@ $crypto.=" crypto/ocsp/ocsp.h"; $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; $crypto.=" crypto/krb5/krb5_asn.h"; $crypto.=" crypto/tmdiff.h"; -$crypto.=" fips/fips.h fips/rand/fips_rand.h"; +$crypto.=" crypto/store/store.h"; +$crypto.=" crypto/pqueue/pqueue.h"; my $symhacks="crypto/symhacks.h"; @@ -423,7 +435,11 @@ sub do_defs print STDERR "DEBUG: parsing ----------\n" if $debug; while(<IN>) { - last if (/\/\* Error codes for the \w+ functions\. \*\//); + if (/\/\* Error codes for the \w+ functions\. \*\//) + { + undef @tag; + last; + } if ($line ne '') { $_ = $line . $_; $line = ''; @@ -436,17 +452,22 @@ sub do_defs next; } - $cpp = 1 if /^\#.*ifdef.*cplusplus/; + if(/\/\*/) { + if (not /\*\//) { # multiline comment... + $line = $_; # ... just accumulate + next; + } else { + s/\/\*.*?\*\///gs;# wipe it + } + } + if ($cpp) { - $cpp = 0 if /^\#.*endif/; + $cpp++ if /^#\s*if/; + $cpp-- if /^#\s*endif/; next; } + $cpp = 1 if /^#.*ifdef.*cplusplus/; - s/\/\*.*?\*\///gs; # ignore comments - if (/\/\*/) { # if we have part - $line = $_; # of a comment, - next; # continue reading - } s/{[^{}]*}//gs; # ignore {} blocks print STDERR "DEBUG: \$def=\"$def\"\n" if $debug && $def ne ""; print STDERR "DEBUG: \$_=\"$_\"\n" if $debug; @@ -472,7 +493,7 @@ sub do_defs push(@tag,$1); $tag{$1}=-1; } - } elsif (/^\#\s*ifdef\s+(.*)/) { + } elsif (/^\#\s*ifdef\s+(\S*)/) { push(@tag,"-"); push(@tag,$1); $tag{$1}=1; @@ -505,7 +526,7 @@ sub do_defs } } elsif (/^\#\s*endif/) { my $tag_i = $#tag; - while($tag[$tag_i] ne "-") { + while($tag_i > 0 && $tag[$tag_i] ne "-") { my $t=$tag[$tag_i]; print STDERR "DEBUG: \$t=\"$t\"\n" if $debug; if ($tag{$t}==2) { @@ -672,6 +693,10 @@ sub do_defs "EXPORT_VAR_AS_FUNCTION", "FUNCTION"); next; + } elsif (/^\s*DECLARE_ASN1_ALLOC_FUNCTIONS\s*\(\s*(\w*)\s*\)/) { + $def .= "int $1_free(void);"; + $def .= "int $1_new(void);"; + next; } elsif (/^\s*DECLARE_ASN1_FUNCTIONS_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { $def .= "int d2i_$2(void);"; $def .= "int i2d_$2(void);"; @@ -716,12 +741,21 @@ sub do_defs "EXPORT_VAR_AS_FUNCTION", "FUNCTION"); next; + } elsif (/^\s*DECLARE_ASN1_NDEF_FUNCTION\s*\(\s*(\w*)\s*\)/) { + $def .= "int i2d_$1_NDEF(void);"; } elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { next; + } elsif (/^\s*DECLARE_ASN1_PRINT_FUNCTION\s*\(\s*(\w*)\s*\)/) { + $def .= "int $1_print_ctx(void);"; + next; + } elsif (/^\s*DECLARE_ASN1_PRINT_FUNCTION_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { + $def .= "int $2_print_ctx(void);"; + next; } elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) { next; } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || - /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) { + /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ || + /^DECLARE_PEM_rw_const\s*\(\s*(\w*)\s*,/ ) { # Things not in Win16 $def .= "#INFO:" @@ -797,7 +831,7 @@ sub do_defs } close(IN); - my $algs = ''; + my $algs; my $plays; print STDERR "DEBUG: postprocessing ----------\n" if $debug; @@ -809,6 +843,17 @@ sub do_defs next if(/typedef\W/); next if(/\#define/); + # Reduce argument lists to empty () + # fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {} + while(/\(.*\)/s) { + s/\([^\(\)]+\)/\{\}/gs; + s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{}) -> f + } + # pretend as we didn't use curly braces: {} -> () + s/\{\}/\(\)/gs; + + s/STACK_OF\(\)/void/gs; + print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; if (/^\#INFO:([^:]*):(.*)$/) { $plats = $1; @@ -819,21 +864,10 @@ sub do_defs $s = $1; $k = "VARIABLE"; print STDERR "DEBUG: found external variable $s\n" if $debug; - } elsif (/\(\*(\w*(\{[0-9]+\})?)\([^\)]+/) { - $s = $1; - print STDERR "DEBUG: found ANSI C function $s\n" if $debug; - } elsif (/\w+\W+(\w+)\W*\(\s*\)(\s*__attribute__\(.*\)\s*)?$/s) { - # K&R C - print STDERR "DEBUG: found K&R C function $s\n" if $debug; + } elsif (/TYPEDEF_\w+_OF/s) { next; - } elsif (/\w+\W+\w+(\{[0-9]+\})?\W*\(.*\)(\s*__attribute__\(.*\)\s*)?$/s) { - while (not /\(\)(\s*__attribute__\(.*\)\s*)?$/s) { - s/[^\(\)]*\)(\s*__attribute__\(.*\)\s*)?$/\)/s; - s/\([^\(\)]*\)\)(\s*__attribute__\(.*\)\s*)?$/\)/s; - } - s/\(void\)//; - /(\w+(\{[0-9]+\})?)\W*\(\)/s; - $s = $1; + } elsif (/(\w+)\s*\(\).*/s) { # first token prior [first] () is + $s = $1; # a function name! print STDERR "DEBUG: found function $s\n" if $debug; } elsif (/\(/ and not (/=/)) { print STDERR "File $file: cannot parse: $_;\n"; @@ -867,7 +901,6 @@ sub do_defs $platform{$s} = &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p); - $algorithm{$s} = '' if !defined $algorithm{$s}; $algorithm{$s} .= ','.$a; if (defined($variant{$s})) { @@ -1011,7 +1044,7 @@ sub is_valid { my ($keywords_txt,$platforms) = @_; my (@keywords) = split /,/,$keywords_txt; - my ($falsesum, $truesum) = (0, !grep(/^[^!]/,@keywords)); + my ($falsesum, $truesum) = (0, 1); # Param: one keyword sub recognise @@ -1032,9 +1065,6 @@ sub is_valid if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { return 1; } - if ($keyword eq "OPENSSL_FIPS" && $fips) { - return 1; - } return 0; } else { # algorithms @@ -1055,6 +1085,8 @@ sub is_valid if ($keyword eq "DSA" && $no_dsa) { return 0; } if ($keyword eq "DH" && $no_dh) { return 0; } if ($keyword eq "EC" && $no_ec) { return 0; } + if ($keyword eq "ECDSA" && $no_ecdsa) { return 0; } + if ($keyword eq "ECDH" && $no_ecdh) { return 0; } if ($keyword eq "HMAC" && $no_hmac) { return 0; } if ($keyword eq "AES" && $no_aes) { return 0; } if ($keyword eq "EVP" && $no_evp) { return 0; } @@ -1069,6 +1101,9 @@ sub is_valid if ($keyword eq "ENGINE" && $no_engine) { return 0; } if ($keyword eq "HW" && $no_hw) { return 0; } if ($keyword eq "FP_API" && $no_fp_api) { return 0; } + if ($keyword eq "STATIC_ENGINE" && $no_static_engine) { return 0; } + if ($keyword eq "GMP" && $no_gmp) { return 0; } + if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } # Nothing recognise as true return 1; @@ -1079,7 +1114,7 @@ sub is_valid if ($k =~ /^!(.*)$/) { $falsesum += &recognise($1,$platforms); } else { - $truesum += &recognise($k,$platforms); + $truesum *= &recognise($k,$platforms); } } print STDERR "DEBUG: [",$#keywords,",",$#keywords < 0,"] is_valid($keywords_txt) => (\!$falsesum) && $truesum = ",(!$falsesum) && $truesum,"\n" if $debug; diff --git a/crypto/openssl/util/mkdir-p.pl b/crypto/openssl/util/mkdir-p.pl index 6c69c2d..e73d02b 100755 --- a/crypto/openssl/util/mkdir-p.pl +++ b/crypto/openssl/util/mkdir-p.pl @@ -8,6 +8,7 @@ my $arg; foreach $arg (@ARGV) { + $arg =~ tr|\\|/|; &do_mkdir_p($arg); } diff --git a/crypto/openssl/util/mkerr.pl b/crypto/openssl/util/mkerr.pl index e3215e2..399b10e 100644 --- a/crypto/openssl/util/mkerr.pl +++ b/crypto/openssl/util/mkerr.pl @@ -9,6 +9,9 @@ my $reindex = 0; my $dowrite = 0; my $staticloader = ""; +my $pack_errcode; +my $load_errcode; + while (@ARGV) { my $arg = $ARGV[0]; if($arg eq "-conf") { @@ -41,8 +44,7 @@ while (@ARGV) { } if($recurse) { - @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>, <fips/*.c>, - <fips/*/*.c>); + @source = (<crypto/*.c>, <crypto/*/*.c>, <ssl/*.c>); } else { @source = @ARGV; } @@ -63,6 +65,8 @@ while(<IN>) $csrc{$1} = $3; $fmax{$1} = 99; $rmax{$1} = 99; + $fassigned{$1} = ":"; + $rassigned{$1} = ":"; $fnew{$1} = 0; $rnew{$1} = 0; } @@ -101,15 +105,24 @@ while (($hdr, $lib) = each %libinc) next; } - $cpp = 1 if /^#.*ifdef.*cplusplus/; # skip "C" declaration + if(/\/\*/) { + if (not /\*\//) { # multiline comment... + $line = $_; # ... just accumulate + next; + } else { + s/\/\*.*?\*\///gs; # wipe it + } + } + if ($cpp) { - $cpp = 0 if /^#.*endif/; + $cpp++ if /^#\s*if/; + $cpp-- if /^#\s*endif/; next; } + $cpp = 1 if /^#.*ifdef.*cplusplus/; # skip "C" declaration next if (/^\#/); # skip preprocessor directives - s/\/\*.*?\*\///gs; # ignore comments s/{[^{}]*}//gs; # ignore {} blocks if (/\{|\/\*/) { # Add a } so editor works... @@ -126,27 +139,28 @@ while (($hdr, $lib) = each %libinc) $defnr++; print STDERR "def: $defnr\r" if $debug; + # The goal is to collect function names from function declarations. + s/^[\n\s]*//g; s/[\n\s]*$//g; - next if(/typedef\W/); - if (/\(\*(\w*)\([^\)]+/) { - my $name = $1; - $name =~ tr/[a-z]/[A-Z]/; - $ftrans{$name} = $1; - } elsif (/\w+\W+(\w+)\W*\(\s*\)(\s*__attribute__\(.*\)\s*)?$/s){ - # K&R C - next ; - } elsif (/\w+\W+\w+\W*\(.*\)(\s*__attribute__\(.*\)\s*)?$/s) { - while (not /\(\)(\s*__attribute__\(.*\)\s*)?$/s) { - s/[^\(\)]*\)(\s*__attribute__\(.*\)\s*)?$/\)/s; - s/\([^\(\)]*\)\)(\s*__attribute__\(.*\)\s*)?$/\)/s; - } - s/\(void\)//; - /(\w+(\{[0-9]+\})?)\W*\(\)/s; - my $name = $1; + + # Skip over recognized non-function declarations + next if(/typedef\W/ or /DECLARE_STACK_OF/ or /TYPEDEF_.*_OF/); + + # Reduce argument lists to empty () + # fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {} + while(/\(.*\)/s) { + s/\([^\(\)]+\)/\{\}/gs; + s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{}) -> f + } + # pretend as we didn't use curly braces: {} -> () + s/\{\}/\(\)/gs; + + if (/(\w+)\s*\(\).*/s) { # first token prior [first] () is + my $name = $1; # a function name! $name =~ tr/[a-z]/[A-Z]/; $ftrans{$name} = $1; - } elsif (/\(/ and not (/=/ or /DECLARE_STACK/)) { + } elsif (/[\(\)]/ and not (/=/)) { print STDERR "Header $hdr: cannot parse: $_;\n"; } } @@ -159,7 +173,7 @@ while (($hdr, $lib) = each %libinc) # maximum code used. if ($gotfile) { - while(<IN>) { + while(<IN>) { if(/^\#define\s+(\S+)\s+(\S+)/) { $name = $1; $code = $2; @@ -170,18 +184,49 @@ while (($hdr, $lib) = each %libinc) } if($1 eq "R") { $rcodes{$name} = $code; + if ($rassigned{$lib} =~ /:$code:/) { + print STDERR "!! ERROR: $lib reason code $code assigned twice\n"; + } + $rassigned{$lib} .= "$code:"; if(!(exists $rextra{$name}) && ($code > $rmax{$lib}) ) { $rmax{$lib} = $code; } } else { + if ($fassigned{$lib} =~ /:$code:/) { + print STDERR "!! ERROR: $lib function code $code assigned twice\n"; + } + $fassigned{$lib} .= "$code:"; if($code > $fmax{$lib}) { $fmax{$lib} = $code; } $fcodes{$name} = $code; } } - } + } + } + + if ($debug) { + if (defined($fmax{$lib})) { + print STDERR "Max function code fmax" . "{" . "$lib" . "} = $fmax{$lib}\n"; + $fassigned{$lib} =~ m/^:(.*):$/; + @fassigned = sort {$a <=> $b} split(":", $1); + print STDERR " @fassigned\n"; + } + if (defined($rmax{$lib})) { + print STDERR "Max reason code rmax" . "{" . "$lib" . "} = $rmax{$lib}\n"; + $rassigned{$lib} =~ m/^:(.*):$/; + @rassigned = sort {$a <=> $b} split(":", $1); + print STDERR " @rassigned\n"; + } + } + + if ($lib eq "SSL") { + if ($rmax{$lib} >= 1000) { + print STDERR "!! ERROR: SSL error codes 1000+ are reserved for alerts.\n"; + print STDERR "!! Any new alerts must be added to $config.\n"; + print STDERR "\n"; + } } close IN; } @@ -198,11 +243,10 @@ while (($hdr, $lib) = each %libinc) # so all those unreferenced can be printed out. -print STDERR "Files loaded: " if $debug; foreach $file (@source) { # Don't parse the error source file. next if exists $cskip{$file}; - print STDERR $file if $debug; + print STDERR "File loaded: ".$file."\r" if $debug; open(IN, "<$file") || die "Can't open source file $file\n"; while(<IN>) { if(/(([A-Z0-9]+)_F_([A-Z0-9_]+))/) { @@ -226,7 +270,7 @@ foreach $file (@source) { } close IN; } -print STDERR "\n" if $debug; +print STDERR " \n" if $debug; # Now process each library in turn. @@ -263,7 +307,7 @@ foreach $lib (keys %csrc) } else { push @out, "/* ====================================================================\n", -" * Copyright (c) 2001-2003 The OpenSSL Project. All rights reserved.\n", +" * Copyright (c) 2001-2005 The OpenSSL Project. All rights reserved.\n", " *\n", " * Redistribution and use in source and binary forms, with or without\n", " * modification, are permitted provided that the following conditions\n", @@ -353,7 +397,16 @@ EOF foreach $i (@function) { $z=6-int(length($i)/8); if($fcodes{$i} eq "X") { - $fcodes{$i} = ++$fmax{$lib}; + $fassigned{$lib} =~ m/^:([^:]*):/; + $findcode = $1; + if (!defined($findcode)) { + $findcode = $fmax{$lib}; + } + while ($fassigned{$lib} =~ m/:$findcode:/) { + $findcode++; + } + $fcodes{$i} = $findcode; + $fassigned{$lib} .= "$findcode:"; print STDERR "New Function code $i\n" if $debug; } printf OUT "#define $i%s $fcodes{$i}\n","\t" x $z; @@ -364,7 +417,16 @@ EOF foreach $i (@reasons) { $z=6-int(length($i)/8); if($rcodes{$i} eq "X") { - $rcodes{$i} = ++$rmax{$lib}; + $rassigned{$lib} =~ m/^:([^:]*):/; + $findcode = $1; + if (!defined($findcode)) { + $findcode = $rmax{$lib}; + } + while ($rassigned{$lib} =~ m/:$findcode:/) { + $findcode++; + } + $rcodes{$i} = $findcode; + $rassigned{$lib} .= "$findcode:"; print STDERR "New Reason code $i\n" if $debug; } printf OUT "#define $i%s $rcodes{$i}\n","\t" x $z; @@ -399,13 +461,27 @@ EOF $hincf = "\"$hfile\""; } + # If static we know the error code at compile time so use it + # in error definitions. + + if ($static) + { + $pack_errcode = "ERR_LIB_${lib}"; + $load_errcode = "0"; + } + else + { + $pack_errcode = "0"; + $load_errcode = "ERR_LIB_${lib}"; + } + open (OUT,">$cfile") || die "Can't open $cfile for writing"; print OUT <<"EOF"; /* $cfile */ /* ==================================================================== - * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -469,6 +545,10 @@ EOF /* BEGIN ERROR CODES */ #ifndef OPENSSL_NO_ERR + +#define ERR_FUNC(func) ERR_PACK($pack_errcode,func,0) +#define ERR_REASON(reason) ERR_PACK($pack_errcode,0,reason) + static ERR_STRING_DATA ${lib}_str_functs[]= { EOF @@ -480,7 +560,8 @@ EOF if(exists $ftrans{$fn}) { $fn = $ftrans{$fn}; } - print OUT "{ERR_PACK(0,$i,0),\t\"$fn\"},\n"; +# print OUT "{ERR_PACK($pack_errcode,$i,0),\t\"$fn\"},\n"; + print OUT "{ERR_FUNC($i),\t\"$fn\"},\n"; } print OUT <<"EOF"; {0,NULL} @@ -492,6 +573,7 @@ EOF # Add each reason code. foreach $i (@reasons) { my $rn; + my $rstr = "ERR_REASON($i)"; my $nspc = 0; if (exists $err_reason_strings{$i}) { $rn = $err_reason_strings{$i}; @@ -500,9 +582,9 @@ EOF $rn = $1; $rn =~ tr/_[A-Z]/ [a-z]/; } - $nspc = 40 - length($i) unless length($i) > 40; + $nspc = 40 - length($rstr) unless length($rstr) > 40; $nspc = " " x $nspc; - print OUT "{${i}${nspc},\"$rn\"},\n"; + print OUT "{${rstr}${nspc},\"$rn\"},\n"; } if($static) { print OUT <<"EOF"; @@ -519,8 +601,8 @@ ${staticloader}void ERR_load_${lib}_strings(void) { init=0; #ifndef OPENSSL_NO_ERR - ERR_load_strings(ERR_LIB_${lib},${lib}_str_functs); - ERR_load_strings(ERR_LIB_${lib},${lib}_str_reasons); + ERR_load_strings($load_errcode,${lib}_str_functs); + ERR_load_strings($load_errcode,${lib}_str_reasons); #endif } diff --git a/crypto/openssl/util/mkfiles.pl b/crypto/openssl/util/mkfiles.pl index 7c9d9d5..cb0e282 100755 --- a/crypto/openssl/util/mkfiles.pl +++ b/crypto/openssl/util/mkfiles.pl @@ -30,6 +30,8 @@ my @dirs = ( "crypto/dso", "crypto/dh", "crypto/ec", +"crypto/ecdh", +"crypto/ecdsa", "crypto/buffer", "crypto/bio", "crypto/stack", @@ -51,15 +53,11 @@ my @dirs = ( "crypto/ocsp", "crypto/ui", "crypto/krb5", -"fips", -"fips/aes", -"fips/des", -"fips/dsa", -"fips/rand", -"fips/rsa", -"fips/sha1", +"crypto/store", +"crypto/pqueue", "ssl", "apps", +"engines", "test", "tools" ); diff --git a/crypto/openssl/util/mklink.pl b/crypto/openssl/util/mklink.pl index 9386da7..d9bc98a 100755 --- a/crypto/openssl/util/mklink.pl +++ b/crypto/openssl/util/mklink.pl @@ -15,12 +15,14 @@ # Apart from this, this script should be able to handle even the most # pathological cases. +use Cwd; + my $from = shift; my @files = @ARGV; my @from_path = split(/[\\\/]/, $from); -my $pwd = `pwd`; -chop($pwd); +my $pwd = getcwd(); +chomp($pwd); my @pwd_path = split(/[\\\/]/, $pwd); my @to_path = (); @@ -52,6 +54,7 @@ $symlink_exists=eval {symlink("",""); 1}; foreach $file (@files) { my $err = ""; if ($symlink_exists) { + unlink "$from/$file"; symlink("$to/$file", "$from/$file") or $err = " [$!]"; } else { unlink "$from/$file"; diff --git a/crypto/openssl/util/mkstack.pl b/crypto/openssl/util/mkstack.pl index 0ca9eb6..2a968f3 100755 --- a/crypto/openssl/util/mkstack.pl +++ b/crypto/openssl/util/mkstack.pl @@ -75,6 +75,7 @@ while(<IN>) { #define sk_${type_thing}_push(st, val) SKM_sk_push($type_thing, (st), (val)) #define sk_${type_thing}_unshift(st, val) SKM_sk_unshift($type_thing, (st), (val)) #define sk_${type_thing}_find(st, val) SKM_sk_find($type_thing, (st), (val)) +#define sk_${type_thing}_find_ex(st, val) SKM_sk_find_ex($type_thing, (st), (val)) #define sk_${type_thing}_delete(st, i) SKM_sk_delete($type_thing, (st), (i)) #define sk_${type_thing}_delete_ptr(st, ptr) SKM_sk_delete_ptr($type_thing, (st), (ptr)) #define sk_${type_thing}_insert(st, val, i) SKM_sk_insert($type_thing, (st), (val), (i)) diff --git a/crypto/openssl/util/opensslwrap.sh b/crypto/openssl/util/opensslwrap.sh new file mode 100755 index 0000000..91d29e2 --- /dev/null +++ b/crypto/openssl/util/opensslwrap.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +HERE="`echo $0 | sed -e 's|[^/]*$||'`" +OPENSSL="${HERE}../apps/openssl" + +if [ -x "${OPENSSL}.exe" ]; then + # The original reason for this script existence is to work around + # certain caveats in run-time linker behaviour. On Windows platforms + # adjusting $PATH used to be sufficient, but with introduction of + # SafeDllSearchMode in XP/2003 the only way to get it right in + # *all* possible situations is to copy newly built .DLLs to apps/ + # and test/, which is now done elsewhere... The $PATH is adjusted + # for backward compatibility (and nostagical reasons:-). + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${HERE}..:$PATH"; export PATH + fi + exec "${OPENSSL}.exe" "$@" +elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then + exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" +else + exec "${OPENSSL}" "$@" # hope for the best... +fi diff --git a/crypto/openssl/util/pl/BC-32.pl b/crypto/openssl/util/pl/BC-32.pl index 897ae9d..99b8c058 100644 --- a/crypto/openssl/util/pl/BC-32.pl +++ b/crypto/openssl/util/pl/BC-32.pl @@ -18,7 +18,7 @@ $out_def="out32"; $tmp_def="tmp32"; $inc_def="inc32"; #enable max error messages, disable most common warnings -$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp "; +$cflags="-DWIN32_LEAN_AND_MEAN -q -w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -D_strnicmp=strnicmp "; if ($debug) { $cflags.="-Od -y -v -vi- -D_DEBUG"; @@ -51,7 +51,7 @@ $lfile=''; $shlib_ex_obj=""; $app_ex_obj="c0x32.obj"; -$asm='nasmw -f obj'; +$asm='nasmw -f obj -d__omf__'; $asm.=" /Zi" if $debug; $afile='-o'; @@ -62,7 +62,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm && !$fips) +if (!$no_asm) { $bn_mulw_obj='crypto\bn\asm\bn_win32.obj'; $bn_mulw_src='crypto\bn\asm\bn_win32.asm'; @@ -106,9 +106,13 @@ sub do_lib_rule $ret.="$target: $objs\n"; if (!$shlib) { - # $ret.="\t\$(RM) \$(O_$Name)\n"; - $ret.="\techo LIB $<\n"; - $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n"; + $ret.=<<___; + -\$(RM) $lfile$target + \$(MKLIB) $lfile$target \@&&! ++\$(**: = &^ ++) +! +___ } else { @@ -122,18 +126,13 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); - + $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n"; - if (defined $sha1file) - { - $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; return($ret); } diff --git a/crypto/openssl/util/pl/Mingw32.pl b/crypto/openssl/util/pl/Mingw32.pl index b9bb24d..b76b7af 100644 --- a/crypto/openssl/util/pl/Mingw32.pl +++ b/crypto/openssl/util/pl/Mingw32.pl @@ -21,7 +21,7 @@ if ($debug) else { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; } -if ($gaswin and !$no_asm and !$fips) +if ($gaswin and !$no_asm) { $bn_asm_obj='$(OBJ_D)\bn-win32.o'; $bn_asm_src='crypto/bn/asm/bn-win32.s'; @@ -43,7 +43,7 @@ if ($gaswin and !$no_asm and !$fips) $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s'; $sha1_asm_obj='$(OBJ_D)\s1-win32.o'; $sha1_asm_src='crypto/sha/asm/s1-win32.s'; - $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; + $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; } @@ -92,18 +92,13 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; - if (defined $sha1file) - { - $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; return($ret); } 1; diff --git a/crypto/openssl/util/pl/OS2-EMX.pl b/crypto/openssl/util/pl/OS2-EMX.pl index 75d72eb..28cd116 100644 --- a/crypto/openssl/util/pl/OS2-EMX.pl +++ b/crypto/openssl/util/pl/OS2-EMX.pl @@ -48,7 +48,7 @@ $des_enc_src=""; $bf_enc_obj=""; $bf_enc_src=""; -if (!$no_asm && !$fips) +if (!$no_asm) { $bn_asm_obj="crypto/bn/asm/bn-os2$obj crypto/bn/asm/co-os2$obj"; $bn_asm_src="crypto/bn/asm/bn-os2.asm crypto/bn/asm/co-os2.asm"; @@ -68,6 +68,7 @@ if (!$no_asm && !$fips) $sha1_asm_src="crypto/sha/asm/s1-os2.asm"; $rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj"; $rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm"; + $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; } if ($shlib) @@ -106,18 +107,13 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n"; - if (defined $sha1file) - { - $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\t\$(LINK) ${efile}$target \$(CFLAG) \$(LFLAGS) $files $libs\n\n"; return($ret); } diff --git a/crypto/openssl/util/pl/VC-32.pl b/crypto/openssl/util/pl/VC-32.pl index 516b9a7..81e92f0 100644 --- a/crypto/openssl/util/pl/VC-32.pl +++ b/crypto/openssl/util/pl/VC-32.pl @@ -1,43 +1,150 @@ #!/usr/local/bin/perl -# VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries +# VC-32.pl - unified script for Microsoft Visual C++, covering Win32, +# Win64 and WinCE [follow $FLAVOR variable to trace the differences]. # $ssl= "ssleay32"; $crypto="libeay32"; $o='\\'; -$cp='copy nul+'; # Timestamps get stuffed otherwise +$cp='$(PERL) util/copy.pl'; +$mkdir='$(PERL) util/mkdir-p.pl'; $rm='del'; +$zlib_lib="zlib1.lib"; + # C compiler stuff $cc='cl'; -$cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32'; -$lflags="/nologo /subsystem:console /machine:I386 /opt:ref"; +if ($FLAVOR =~ /WIN64/) + { + # Note that we currently don't have /WX on Win64! There is a lot of + # warnings, but only of two types: + # + # C4344: conversion from '__int64' to 'int/long', possible loss of data + # C4267: conversion from 'size_t' to 'int/long', possible loss of data + # + # Amount of latter type is minimized by aliasing strlen to function of + # own desing and limiting its return value to 2GB-1 (see e_os.h). As + # per 0.9.8 release remaining warnings were explicitly examined and + # considered safe to ignore. + # + $base_cflags=' /W3 /Gs0 /GF /Gy /nologo -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DOPENSSL_SYSNAME_WIN32 -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE'; + $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8 + $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8 + $opt_cflags=' /MD /Ox'; + $dbg_cflags=' /MDd /Od -DDEBUG -D_DEBUG'; + $lflags="/nologo /subsystem:console /opt:ref"; + } +elsif ($FLAVOR =~ /CE/) + { + # sanity check + die '%OSVERSION% is not defined' if (!defined($ENV{'OSVERSION'})); + die '%PLATFORM% is not defined' if (!defined($ENV{'PLATFORM'})); + die '%TARGETCPU% is not defined' if (!defined($ENV{'TARGETCPU'})); + + # + # Idea behind this is to mimic flags set by eVC++ IDE... + # + $wcevers = $ENV{'OSVERSION'}; # WCENNN + die '%OSVERSION% value is insane' if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/); + $wcecdefs = "-D_WIN32_WCE=$1$2 -DUNDER_CE=$1$2"; # -D_WIN32_WCE=NNN + $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN + + $wceplatf = $ENV{'PLATFORM'}; + $wceplatf =~ tr/a-z0-9 /A-Z0-9_/d; + $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; + + $wcetgt = $ENV{'TARGETCPU'}; # just shorter name... + SWITCH: for($wcetgt) { + /^X86/ && do { $wcecdefs.=" -Dx86 -D_X86_ -D_i386_ -Di_386_"; + $wcelflag.=" /machine:IX86"; last; }; + /^ARMV4[IT]/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; + $wcecdefs.=" -DTHUMB -D_THUMB_" if($wcetgt=~/T$/); + $wcecdefs.=" -QRarch4T -QRinterwork-return"; + $wcelflag.=" /machine:THUMB"; last; }; + /^ARM/ && do { $wcecdefs.=" -DARM -D_ARM_ -D$wcetgt"; + $wcelflag.=" /machine:ARM"; last; }; + /^MIPSIV/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; + $wcecdefs.=" -D_MIPS64 -QMmips4 -QMn32"; + $wcelflag.=" /machine:MIPSFPU"; last; }; + /^MIPS16/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; + $wcecdefs.=" -DMIPSII -QMmips16"; + $wcelflag.=" /machine:MIPS16"; last; }; + /^MIPSII/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000 -D$wcetgt"; + $wcecdefs.=" -QMmips2"; + $wcelflag.=" /machine:MIPS"; last; }; + /^R4[0-9]{3}/ && do { $wcecdefs.=" -DMIPS -D_MIPS_ -DR4000"; + $wcelflag.=" /machine:MIPS"; last; }; + /^SH[0-9]/ && do { $wcecdefs.=" -D$wcetgt -D_$wcetgt_ -DSHx"; + $wcecdefs.=" -Qsh4" if ($wcetgt =~ /^SH4/); + $wcelflag.=" /machine:$wcetgt"; last; }; + { $wcecdefs.=" -D$wcetgt -D_$wcetgt_"; + $wcelflag.=" /machine:$wcetgt"; last; }; + } + + $cc='$(CC)'; + $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -I$(WCECOMPAT)/include -DOPENSSL_SMALL_FOOTPRINT'; + $base_cflags.=" $wcecdefs"; + $opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics... + $dbg_clfags=' /MC /Od -DDEBUG -D_DEBUG'; + $lflags="/nologo /opt:ref $wcelflag"; + } +else # Win32 + { + $base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32'; + $base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8 + $base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8 + $opt_cflags=' /MD /Ox /O2 /Ob2'; + $dbg_cflags=' /MDd /Od -DDEBUG -D_DEBUG'; + $lflags="/nologo /subsystem:console /opt:ref"; + } $mlflags=''; -$out_def="out32"; -$tmp_def="tmp32"; +$out_def="out32"; $out_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); +$tmp_def="tmp32"; $tmp_def.='_$(TARGETCPU)' if ($FLAVOR =~ /CE/); $inc_def="inc32"; if ($debug) { - $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DOPENSSL_SYSNAME_WIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32"; + $cflags=$dbg_cflags.$base_cflags; $lflags.=" /debug"; $mlflags.=' /debug'; } -$cflags .= " -DOPENSSL_SYSNAME_WINNT" if $NT == 1; +else + { + $cflags=$opt_cflags.$base_cflags; + } $obj='.obj'; $ofile="/Fo"; # EXE linking stuff $link="link"; +$rsc="rc"; $efile="/out:"; $exep='.exe'; -if ($no_sock) - { $ex_libs=""; } -else { $ex_libs="wsock32.lib user32.lib gdi32.lib"; } +if ($no_sock) { $ex_libs=''; } +elsif ($FLAVOR =~ /CE/) { $ex_libs='winsock.lib'; } +else { $ex_libs='wsock32.lib'; } +if ($FLAVOR =~ /CE/) + { + $ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib'; + $ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86"); + } +else + { + $ex_libs.=' gdi32.lib advapi32.lib user32.lib'; + $ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); + } + +# As native NT API is pure UNICODE, our WIN-NT build defaults to UNICODE, +# but gets linked with unicows.lib to ensure backward compatibility. +if ($FLAVOR =~ /NT/) + { + $cflags.=" -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE"; + $ex_libs="unicows.lib $ex_libs"; + } # static library stuff $mklib='lib'; $ranlib=''; @@ -47,7 +154,7 @@ $shlibp=($shlib)?".dll":".lib"; $lfile='/out:'; $shlib_ex_obj=""; -$app_ex_obj=""; +$app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/); if ($nasm) { $asm='nasmw -f win32'; $afile='-o '; @@ -64,7 +171,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm && !$fips) +if (!$no_asm) { $bn_asm_obj='crypto\bn\asm\bn_win32.obj'; $bn_asm_src='crypto\bn\asm\bn_win32.asm'; @@ -87,13 +194,44 @@ if (!$no_asm && !$fips) $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; } -if ($shlib) +if ($shlib && $FLAVOR !~ /CE/) { $mlflags.=" $lflags /dll"; # $cflags =~ s| /MD| /MT|; $lib_cflag=" -D_WINDLL"; $out_def="out32dll"; $tmp_def="tmp32dll"; + # + # Engage Applink... + # + $app_ex_obj.=" \$(OBJ_D)\\applink.obj /implib:\$(TMP_D)\\junk.lib"; + $cflags.=" -DOPENSSL_USE_APPLINK -I."; + # I'm open for better suggestions than overriding $banner... + $banner=<<'___'; + @echo Building OpenSSL + +$(OBJ_D)\applink.obj: ms\applink.c + $(CC) /Fo$(OBJ_D)\applink.obj $(APP_CFLAGS) -c ms\applink.c +$(OBJ_D)\uplink.obj: ms\uplink.c ms\applink.c + $(CC) /Fo$(OBJ_D)\uplink.obj $(SHLIB_CFLAGS) -c ms\uplink.c +$(INCO_D)\applink.c: ms\applink.c + $(CP) ms\applink.c $(INCO_D)\applink.c + +EXHEADER= $(EXHEADER) $(INCO_D)\applink.c + +LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj +CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ) +___ + $banner.=<<'___' if ($FLAVOR =~ /WIN64/); +CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) +___ + } +elsif ($shlib && $FLAVOR =~ /CE/) + { + $mlflags.=" $lflags /dll"; + $lib_cflag=" -D_WINDLL -D_DLL"; + $out_def='out32dll_$(TARGETCPU)'; + $tmp_def='tmp32dll_$(TARGETCPU)'; } $cflags.=" /Fd$out_def"; @@ -101,24 +239,43 @@ $cflags.=" /Fd$out_def"; sub do_lib_rule { local($objs,$target,$name,$shlib)=@_; - local($ret,$Name); + local($ret); $taget =~ s/\//$o/g if $o ne '/'; - ($Name=$name) =~ tr/a-z/A-Z/; + if ($name ne "") + { + $name =~ tr/a-z/A-Z/; + $name = "/def:ms/${name}.def"; + } # $target="\$(LIB_D)$o$target"; $ret.="$target: $objs\n"; if (!$shlib) { # $ret.="\t\$(RM) \$(O_$Name)\n"; - $ex =' advapi32.lib'; + $ex =' '; $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n"; } else { - local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; - $ex.=' wsock32.lib gdi32.lib advapi32.lib'; - $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; + local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; + if ($name eq "") + { + $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); + } + elsif ($FLAVOR =~ /CE/) + { + $ex.=' winsock.lib $(WCECOMPAT)/lib/wcecompatex.lib'; + } + else + { + $ex.=' unicows.lib' if ($FLAVOR =~ /NT/); + $ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib'; + $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/); + } + $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/; + $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; + $ret.="\tIF EXIST \$@.manifest mt -manifest \$@.manifest -outputresource:\$@;2\n\n"; } $ret.="\n"; return($ret); @@ -126,19 +283,15 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($targer); $ret.="$target: $files $dep_libs\n"; - $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n"; + $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n"; $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; - if (defined $sha1file) - { - $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\tIF EXIST \$@.manifest mt -manifest \$@.manifest -outputresource:\$@;1\n\n"; return($ret); } diff --git a/crypto/openssl/util/pl/linux.pl b/crypto/openssl/util/pl/linux.pl index df05c40..d24f7b7 100644 --- a/crypto/openssl/util/pl/linux.pl +++ b/crypto/openssl/util/pl/linux.pl @@ -39,7 +39,7 @@ if (!$no_asm) $rmd160_asm_src='crypto/ripemd/asm/rm86unix.cpp'; $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; - $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; + $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS"; } $cflags.=" -DTERMIO -DL_ENDIAN -m486 -Wall"; @@ -72,18 +72,13 @@ sub do_shlib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; - if (defined $sha1file) - { - $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; return($ret); } diff --git a/crypto/openssl/util/pl/netware.pl b/crypto/openssl/util/pl/netware.pl new file mode 100644 index 0000000..c05789b --- /dev/null +++ b/crypto/openssl/util/pl/netware.pl @@ -0,0 +1,341 @@ +# Metrowerks Codewarrior for NetWare +# + +# The import files and other misc imports needed to link +@misc_imports = ("GetProcessSwitchCount", "RunningProcess", + "GetSuperHighResolutionTimer"); +if ($LIBC) +{ + @import_files = ("libc.imp"); + @module_files = ("libc"); +} +else +{ + # clib build + @import_files = ("clib.imp"); + @module_files = ("clib"); + push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16"); +} +if (!$BSDSOCK) +{ + push(@import_files, "ws2nlm.imp"); +} + + +# The "IMPORTS" environment variable must be set and point to the location +# where import files (*.imp) can be found. +# Example: set IMPORTS=c:\ndk\nwsdk\imports +$import_path = $ENV{"IMPORTS"} || die ("IMPORTS environment variable not set\n"); + + +# The "PRELUDE" environment variable must be set and point to the location +# and name of the prelude source to link with ( nwpre.obj is recommended ). +# Example: set PRELUDE=c:\codewar\novell support\metrowerks support\libraries\runtime\nwpre.obj +$prelude = $ENV{"PRELUDE"} || die ("PRELUDE environment variable not set\n"); + +#$ssl= "ssleay32"; +#$crypto="libeay32"; + +$o='\\\\'; +$cp='copy >nul:'; +$rm='del'; + +# C compiler +$cc="mwccnlm"; + +# Linker +$link="mwldnlm"; + +# librarian +$mklib="mwldnlm"; + +# assembler +if ($nw_nasm) +{ + $asm="nasmw -s -f coff"; + $afile="-o "; + $asm.=" -g" if $debug; +} +elsif ($nw_mwasm) +{ + $asm="mwasmnlm -maxerrors 20"; + $afile="-o "; + $asm.=" -g" if $debug; +} +elsif ($nw_masm) +{ +# masm assembly settings - it should be possible to use masm but haven't +# got it working. +# $asm='ml /Cp /coff /c /Cx'; +# $asm.=" /Zi" if $debug; +# $afile='/Fo'; + die("Support for masm assembler not yet functional\n"); +} +else +{ + $asm=""; + $afile=""; +} + + + +# compile flags +# +# NOTES: Several c files in the crypto subdirectory include headers from +# their local directories. Metrowerks wouldn't find these h files +# without adding individual include directives as compile flags +# or modifying the c files. Instead of adding individual include +# paths for each subdirectory a recursive include directive +# is used ( -ir crypto ). +# +# A similar issue exists for the engines and apps subdirectories. +# +# Turned off the "possible" warnings ( -w nopossible ). Metrowerks +# complained a lot about various stuff. May want to turn back +# on for further development. +$cflags="-ir crypto -ir engines -ir apps -msgstyle gcc -align 4 -processor pentium \\ + -char unsigned -w on -w nolargeargs -w nopossible -w nounusedarg \\ + -w noimplicitconv -relax_pointers -nosyspath -DL_ENDIAN \\ + -DOPENSSL_SYSNAME_NETWARE -U_WIN32 -maxerrors 20 "; + +# link flags +$lflags="-msgstyle gcc -zerobss -stacksize 32768 -nostdlib -sym internal "; + + +# additional flags based upon debug | non-debug +if ($debug) +{ + $cflags.=" -opt off -g -sym internal -DDEBUG"; +} +else +{ +# CodeWarrior compiler has a problem with optimizations for floating +# points - no optimizations until further investigation +# $cflags.=" -opt all"; +} + +# If LibC build add in NKS_LIBC define and set the entry/exit +# routines - The default entry/exit routines are for CLib and don't exist +# in LibC +if ($LIBC) +{ + $cflags.=" -DNETWARE_LIBC"; + $lflags.=" -entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption"; +} +else +{ + $cflags.=" -DNETWARE_CLIB"; + $lflags.=" -entry _Prelude -exit _Stop"; +} + +# If BSD Socket support is requested, set a define for the compiler +if ($BSDSOCK) +{ + $cflags.=" -DNETWARE_BSDSOCK"; +} + + +# linking stuff +# for the output directories use the mk1mf.pl values with "_nw" appended +if ($shlib) +{ + if ($LIBC) + { + $out_def.="_nw_libc_nlm"; + $tmp_def.="_nw_libc_nlm"; + $inc_def.="_nw_libc_nlm"; + } + else # NETWARE_CLIB + { + $out_def.="_nw_clib_nlm"; + $tmp_def.="_nw_clib_nlm"; + $inc_def.="_nw_clib_nlm"; + } +} +else +{ + $libp=".lib"; + $shlibp=".lib"; + $lib_flags="-nodefaults -type library"; + if ($LIBC) + { + $out_def.="_nw_libc"; + $tmp_def.="_nw_libc"; + $inc_def.="_nw_libc"; + } + else # NETWARE_CLIB + { + $out_def.="_nw_clib"; + $tmp_def.="_nw_clib"; + $inc_def.="_nw_clib"; + } +} + +# used by mk1mf.pl +$obj='.obj'; +$ofile='-o '; +$efile=''; +$exep='.nlm'; +$ex_libs=''; + +if (!$no_asm) +{ + $bn_asm_obj="crypto${o}bn${o}asm${o}bn-nw.obj"; + $bn_asm_src="crypto${o}bn${o}asm${o}bn-nw.asm"; + $des_enc_obj="crypto${o}des${o}asm${o}d-nw.obj crypto${o}des${o}asm${o}y-nw.obj"; + $des_enc_src="crypto${o}des${o}asm${o}d-nw.asm crypto${o}des${o}asm${o}y-nw.asm"; + $bf_enc_obj="crypto${o}bf${o}asm${o}b-nw.obj"; + $bf_enc_src="crypto${o}bf${o}asm${o}b-nw.asm"; + $cast_enc_obj="crypto${o}cast${o}asm${o}c-nw.obj"; + $cast_enc_src="crypto${o}cast${o}asm${o}c-nw.asm"; + $rc4_enc_obj="crypto${o}rc4${o}asm${o}r4-nw.obj"; + $rc4_enc_src="crypto${o}rc4${o}asm${o}r4-nw.asm"; + $rc5_enc_obj="crypto${o}rc5${o}asm${o}r5-nw.obj"; + $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm"; + $md5_asm_obj="crypto${o}md5${o}asm${o}m5-nw.obj"; + $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm"; + $sha1_asm_obj="crypto${o}sha${o}asm${o}s1-nw.obj"; + $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm"; + $rmd160_asm_obj="crypto${o}ripemd${o}asm${o}rm-nw.obj"; + $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm"; + $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; +} +else +{ + $bn_asm_obj=''; + $bn_asm_src=''; + $des_enc_obj=''; + $des_enc_src=''; + $bf_enc_obj=''; + $bf_enc_src=''; + $cast_enc_obj=''; + $cast_enc_src=''; + $rc4_enc_obj=''; + $rc4_enc_src=''; + $rc5_enc_obj=''; + $rc5_enc_src=''; + $md5_asm_obj=''; + $md5_asm_src=''; + $sha1_asm_obj=''; + $sha1_asm_src=''; + $rmd160_asm_obj=''; + $rmd160_asm_src=''; +} + +# create the *.def linker command files in \openssl\netware\ directory +sub do_def_file +{ + # strip off the leading path + my($target) = bname(@_); + my($def_file); + my($mod_file); + my($i); + + if ($target =~ /(.*).nlm/) + { + $target = $1; + } + + # special case for openssl - the mk1mf.pl defines E_EXE = openssl + if ($target =~ /E_EXE/) + { + $target = "openssl"; + } + + # Note: originally tried to use full path ( \openssl\netware\$target.def ) + # Metrowerks linker choked on this with an assertion failure. bug??? + # + $def_file = "netware\\$target.def"; + + open(DEF_OUT, ">$def_file") || die("unable to open file $def_file\n"); + + print( DEF_OUT "# command file generated by netware.pl for Metrowerks build\n" ); + print( DEF_OUT "#\n"); + print( DEF_OUT "DESCRIPTION \"$target\"\n"); + + foreach $i (@misc_imports) + { + print( DEF_OUT "IMPORT $i\n"); + } + + foreach $i (@import_files) + { + print( DEF_OUT "IMPORT \@$import_path\\$i\n"); + } + + foreach $i (@module_files) + { + print( DEF_OUT "MODULE $i\n"); + } + + close(DEF_OUT); + return($def_file); +} + +sub do_lib_rule +{ + my($objs,$target,$name,$shlib)=@_; + my($ret); + + $ret.="$target: $objs\n"; + if (!$shlib) + { + $ret.="\t\@echo Building Lib: $name\n"; + $ret.="\t\$(MKLIB) $lib_flags -o $target $objs\n"; + $ret.="\t\@echo .\n" + } + else + { + die( "Building as NLM not currently supported!" ); + } + + $ret.="\n"; + return($ret); +} + +sub do_link_rule +{ + my($target,$files,$dep_libs,$libs)=@_; + my($ret); + my($def_file); + + $def_file = do_def_file($target); + + # special case for openssl - the mk1mf.pl defines E_EXE = openssl + + # NOTE: When building the test nlms no screen name is given + # which causes the console screen to be used. By using the console + # screen there is no "<press any key to continue>" message which + # requires user interaction. The test script ( tests.pl ) needs to be + # able to run the tests without requiring user interaction. + # + # However, the sample program "openssl.nlm" is used by the tests and is + # a interactive sample so a screen is desired when not be run by the + # tests. To solve the problem, two versions of the program are built: + # openssl2 - no screen used by tests + # openssl - default screen - use for normal interactive modes + # + if ($target =~ /E_EXE/) + { + my($target2) = $target; + + $target2 =~ s/\(E_EXE\)/\(E_EXE\)2/; + + $ret.="$target: $files $dep_libs\n"; + + # openssl + $ret.="\t\$(LINK) \$(LFLAGS) -screenname openssl -commandfile $def_file $files \"$prelude\" $libs -o $target\n"; + # openssl2 + $ret.="\t\$(LINK) \$(LFLAGS) -commandfile $def_file $files \"$prelude\" $libs -o $target2\n"; + } + else + { + $ret.="$target: $files $dep_libs\n"; + $ret.="\t\$(LINK) \$(LFLAGS) -commandfile $def_file $files \"$prelude\" $libs -o $target\n"; + } + + $ret.="\n"; + return($ret); +} + +1; diff --git a/crypto/openssl/util/pl/ultrix.pl b/crypto/openssl/util/pl/ultrix.pl index 447b854..ea370c7 100644 --- a/crypto/openssl/util/pl/ultrix.pl +++ b/crypto/openssl/util/pl/ultrix.pl @@ -17,7 +17,7 @@ else $cflags.=" -std1 -DL_ENDIAN"; -if (!$no_asm && !$fips) +if (!$no_asm) { $bn_asm_obj='$(OBJ_D)/mips1.o'; $bn_asm_src='crypto/bn/asm/mips1.s'; @@ -25,18 +25,13 @@ if (!$no_asm && !$fips) sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; - if (defined $sha1file) - { - $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; return($ret); } diff --git a/crypto/openssl/util/pl/unix.pl b/crypto/openssl/util/pl/unix.pl index bbd1798..146611a 100644 --- a/crypto/openssl/util/pl/unix.pl +++ b/crypto/openssl/util/pl/unix.pl @@ -70,18 +70,13 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; + local($target,$files,$dep_libs,$libs)=@_; local($ret,$_); $file =~ s/\//$o/g if $o ne '/'; $n=&bname($target); $ret.="$target: $files $dep_libs\n"; - $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; - if (defined $sha1file) - { - $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; - } - $ret.="\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n"; return($ret); } diff --git a/crypto/openssl/util/pod2man.pl b/crypto/openssl/util/pod2man.pl index 657e4e2..546d1ec 100755 --- a/crypto/openssl/util/pod2man.pl +++ b/crypto/openssl/util/pod2man.pl @@ -425,6 +425,7 @@ if ($name ne 'something') { } next if /^=cut\b/; # DB_File and Net::Ping have =cut before NAME next if /^=pod\b/; # It is OK to have =pod before NAME + next if /^=for\s+comment\b/; # It is OK to have =for comment before NAME die "$0: Invalid man page - 1st pod line is not NAME in $ARGV[0]\n" unless $lax; } die "$0: Invalid man page - no documentation in $ARGV[0]\n" unless $lax; diff --git a/crypto/openssl/util/selftest.pl b/crypto/openssl/util/selftest.pl index e9d5aa8..4778c5a 100644 --- a/crypto/openssl/util/selftest.pl +++ b/crypto/openssl/util/selftest.pl @@ -49,7 +49,7 @@ if (open(IN,"<Makefile")) { } $cversion=`$cc -v 2>&1`; -$cversion=`$cc -V 2>&1` if $cversion =~ "usage"; +$cversion=`$cc -V 2>&1` if $cversion =~ "[Uu]sage"; $cversion=`$cc -V |head -1` if $cversion =~ "Error"; $cversion=`$cc --version` if $cversion eq ""; $cversion =~ s/Reading specs.*\n//; @@ -130,15 +130,21 @@ if (system("make 2>&1 | tee make.log") > 255) { goto err; } -$_=$options; -s/no-asm//; -s/no-shared//; -s/no-krb5//; -if (/no-/) -{ - print OUT "Test skipped.\n"; - goto err; -} +# Not sure why this is here. The tests themselves can detect if their +# particular feature isn't included, and should therefore skip themselves. +# To skip *all* tests just because one algorithm isn't included is like +# shooting mosquito with an elephant gun... +# -- Richard Levitte, inspired by problem report 1089 +# +#$_=$options; +#s/no-asm//; +#s/no-shared//; +#s/no-krb5//; +#if (/no-/) +#{ +# print OUT "Test skipped.\n"; +# goto err; +#} print "Running make test...\n"; if (system("make test 2>&1 | tee maketest.log") > 255) diff --git a/crypto/openssl/util/shlib_wrap.sh b/crypto/openssl/util/shlib_wrap.sh new file mode 100755 index 0000000..dc5f5b1c --- /dev/null +++ b/crypto/openssl/util/shlib_wrap.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +[ $# -ne 0 ] || set -x # debug mode without arguments:-) + +THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." +[ -d "${THERE}" ] || exec "$@" # should never happen... + +# Alternative to this is to parse ${THERE}/Makefile... +LIBCRYPTOSO="${THERE}/libcrypto.so" +if [ -f "$LIBCRYPTOSO" ]; then + while [ -h "$LIBCRYPTOSO" ]; do + LIBCRYPTOSO="${THERE}/`ls -l "$LIBCRYPTOSO" | sed -e 's|.*\-> ||'`" + done + SOSUFFIX=`echo ${LIBCRYPTOSO} | sed -e 's|.*\.so||' 2>/dev/null` + LIBSSLSO="${THERE}/libssl.so${SOSUFFIX}" +fi + +SYSNAME=`(uname -s) 2>/dev/null`; +case "$SYSNAME" in +SunOS|IRIX*) + # SunOS and IRIX run-time linkers evaluate alternative + # variables depending on target ABI... + rld_var=LD_LIBRARY_PATH + case "`(/usr/bin/file "$LIBCRYPTOSO") 2>/dev/null`" in + *ELF\ 64*SPARC*) + [ -n "$LD_LIBRARY_PATH_64" ] && rld_var=LD_LIBRARY_PATH_64 + ;; + *ELF\ N32*MIPS*) + [ -n "$LD_LIBRARYN32_PATH" ] && rld_var=LD_LIBRARYN32_PATH + _RLDN32_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLDN32_LIST + ;; + *ELF\ 64*MIPS*) + [ -n "$LD_LIBRARY64_PATH" ] && rld_var=LD_LIBRARY64_PATH + _RLD64_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT"; export _RLD64_LIST + ;; + esac + eval $rld_var=\"${THERE}:'$'$rld_var\"; export $rld_var + unset rld_var + ;; +*) LD_LIBRARY_PATH="${THERE}:$LD_LIBRARY_PATH" # Linux, ELF HP-UX + DYLD_LIBRARY_PATH="${THERE}:$DYLD_LIBRARY_PATH" # MacOS X + SHLIB_PATH="${THERE}:$SHLIB_PATH" # legacy HP-UX + LIBPATH="${THERE}:$LIBPATH" # AIX, OS/2 + export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH + # Even though $PATH is adjusted [for Windows sake], it doesn't + # necessarily does the trick. Trouble is that with introduction + # of SafeDllSearchMode in XP/2003 it's more appropriate to copy + # .DLLs in vicinity of executable, which is done elsewhere... + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${THERE}:$PATH"; export PATH + fi + ;; +esac + +if [ -f "$LIBCRYPTOSO" ]; then + # Following three lines are major excuse for isolating them into + # this wrapper script. Original reason for setting LD_PRELOAD + # was to make it possible to pass 'make test' when user linked + # with -rpath pointing to previous version installation. Wrapping + # it into a script makes it possible to do so on multi-ABI + # platforms. + case "$SYSNAME" in + *BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD + *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX + esac + _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX + export LD_PRELOAD _RLD_LIST +fi + +exec "$@" diff --git a/crypto/openssl/util/ssleay.num b/crypto/openssl/util/ssleay.num index 46e38a1..e285a0f 100755 --- a/crypto/openssl/util/ssleay.num +++ b/crypto/openssl/util/ssleay.num @@ -170,7 +170,7 @@ SSL_add_file_cert_subjs_to_stk 185 EXIST:VMS:FUNCTION:STDIO SSL_set_tmp_rsa_callback 186 EXIST::FUNCTION:RSA SSL_set_tmp_dh_callback 187 EXIST::FUNCTION:DH SSL_add_dir_cert_subjects_to_stack 188 EXIST:!VMS:FUNCTION:STDIO -SSL_add_dir_cert_subjs_to_stk 188 NOEXIST::FUNCTION: +SSL_add_dir_cert_subjs_to_stk 188 EXIST:VMS:FUNCTION:STDIO SSL_set_session_id_context 189 EXIST::FUNCTION: SSL_CTX_use_certificate_chain_file 222 EXIST:!VMS:FUNCTION:STDIO SSL_CTX_use_cert_chain_file 222 EXIST:VMS:FUNCTION:STDIO @@ -215,3 +215,14 @@ SSL_CTX_set_generate_session_id 264 EXIST::FUNCTION: SSL_renegotiate_pending 265 EXIST::FUNCTION: SSL_CTX_set_msg_callback 266 EXIST::FUNCTION: SSL_set_msg_callback 267 EXIST::FUNCTION: +DTLSv1_client_method 268 EXIST::FUNCTION: +SSL_CTX_set_tmp_ecdh_callback 269 EXIST::FUNCTION:ECDH +SSL_set_tmp_ecdh_callback 270 EXIST::FUNCTION:ECDH +SSL_COMP_get_name 271 EXIST::FUNCTION:COMP +SSL_get_current_compression 272 EXIST::FUNCTION:COMP +DTLSv1_method 273 EXIST::FUNCTION: +SSL_get_current_expansion 274 EXIST::FUNCTION:COMP +DTLSv1_server_method 275 EXIST::FUNCTION: +SSL_COMP_get_compression_methods 276 EXIST:!VMS:FUNCTION:COMP +SSL_COMP_get_compress_methods 276 EXIST:VMS:FUNCTION:COMP +SSL_SESSION_get_id 277 EXIST::FUNCTION: |