From 68edd00d9258df93b1366c71ac124e0cadf7bc08 Mon Sep 17 00:00:00 2001 From: djm <> Date: Fri, 29 Apr 2005 05:39:33 +0000 Subject: resolve conflicts --- src/lib/libcrypto/util/cygwin.sh | 14 +++--- src/lib/libcrypto/util/domd | 10 ++--- src/lib/libcrypto/util/libeay.num | 86 +++++++++++++++++++++++++++++++----- src/lib/libcrypto/util/mk1mf.pl | 20 ++++++--- src/lib/libcrypto/util/mkdef.pl | 17 ++++--- src/lib/libcrypto/util/mkerr.pl | 7 +-- src/lib/libcrypto/util/mkfiles.pl | 10 ++++- src/lib/libcrypto/util/mklink.pl | 1 + src/lib/libcrypto/util/mkstack.pl | 1 + src/lib/libcrypto/util/pl/BC-16.pl | 15 ++++--- src/lib/libcrypto/util/pl/BC-32.pl | 13 ++++-- src/lib/libcrypto/util/pl/Mingw32.pl | 11 +++-- src/lib/libcrypto/util/pl/OS2-EMX.pl | 11 +++-- src/lib/libcrypto/util/pl/VC-16.pl | 13 ++++-- src/lib/libcrypto/util/pl/VC-32.pl | 11 +++-- src/lib/libcrypto/util/pl/linux.pl | 9 +++- src/lib/libcrypto/util/pl/ultrix.pl | 11 +++-- src/lib/libcrypto/util/pl/unix.pl | 9 +++- src/lib/libcrypto/util/selftest.pl | 4 +- 19 files changed, 204 insertions(+), 69 deletions(-) (limited to 'src/lib/libcrypto/util') diff --git a/src/lib/libcrypto/util/cygwin.sh b/src/lib/libcrypto/util/cygwin.sh index 930f766b4f..7f791d47f4 100644 --- a/src/lib/libcrypto/util/cygwin.sh +++ b/src/lib/libcrypto/util/cygwin.sh @@ -21,11 +21,11 @@ function cleanup() function get_openssl_version() { - eval `grep '^VERSION=' Makefile.ssl` + eval `grep '^VERSION=' Makefile` if [ -z "${VERSION}" ] then - echo "Error: Couldn't retrieve OpenSSL version from Makefile.ssl." - echo " Check value of variable VERSION in Makefile.ssl." + echo "Error: Couldn't retrieve OpenSSL version from Makefile." + echo " Check value of variable VERSION in Makefile." exit 1 fi } @@ -39,7 +39,7 @@ function base_install() function doc_install() { - DOC_DIR=${INSTALL_PREFIX}/usr/doc/openssl + DOC_DIR=${INSTALL_PREFIX}/usr/share/doc/openssl mkdir -p ${DOC_DIR} cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR} @@ -49,7 +49,7 @@ function doc_install() function create_cygwin_readme() { - README_DIR=${INSTALL_PREFIX}/usr/doc/Cygwin + README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin README_FILE=${README_DIR}/openssl-${VERSION}.README mkdir -p ${README_DIR} @@ -112,8 +112,8 @@ cd ${INSTALL_PREFIX} strip usr/bin/*.exe usr/bin/*.dll # Runtime package -find etc usr/bin usr/doc usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc \ - usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | +find etc usr/bin usr/share/doc usr/ssl/certs usr/ssl/man/man[157] \ + usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d | tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 - # Development package find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d | diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd index 49310bbdd1..5610521f0b 100644 --- a/src/lib/libcrypto/util/domd +++ b/src/lib/libcrypto/util/domd @@ -11,7 +11,7 @@ if [ "$1" = "-MD" ]; then fi if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi -cp Makefile.ssl Makefile.save +cp Makefile Makefile.save # fake the presence of Kerberos touch $TOP/krb5.h if [ "$MAKEDEPEND" = "gcc" ]; then @@ -20,15 +20,15 @@ if [ "$MAKEDEPEND" = "gcc" ]; then if [ "$1" != "--" ]; then args="$args $1"; fi shift done - sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp + sed -e '/^# DO NOT DELETE.*/,$d' < Makefile > Makefile.tmp echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp gcc -D OPENSSL_DOING_MAKEDEPEND -M $args >> Makefile.tmp ${PERL} $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new rm -f Makefile.tmp else - ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile.ssl $@ - ${PERL} $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new + ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile $@ + ${PERL} $TOP/util/clean-depend.pl < Makefile > Makefile.new fi -mv Makefile.new Makefile.ssl +mv Makefile.new Makefile # unfake the presence of Kerberos rm $TOP/krb5.h diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index 203c7713e7..56fb7446e0 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num @@ -284,20 +284,20 @@ EVP_add_alias 291 NOEXIST::FUNCTION: EVP_add_cipher 292 EXIST::FUNCTION: EVP_add_digest 293 EXIST::FUNCTION: EVP_bf_cbc 294 EXIST::FUNCTION:BF -EVP_bf_cfb 295 EXIST::FUNCTION:BF +EVP_bf_cfb64 295 EXIST::FUNCTION:BF EVP_bf_ecb 296 EXIST::FUNCTION:BF EVP_bf_ofb 297 EXIST::FUNCTION:BF EVP_cleanup 298 EXIST::FUNCTION: EVP_des_cbc 299 EXIST::FUNCTION:DES -EVP_des_cfb 300 EXIST::FUNCTION:DES +EVP_des_cfb64 300 EXIST::FUNCTION:DES EVP_des_ecb 301 EXIST::FUNCTION:DES EVP_des_ede 302 EXIST::FUNCTION:DES EVP_des_ede3 303 EXIST::FUNCTION:DES EVP_des_ede3_cbc 304 EXIST::FUNCTION:DES -EVP_des_ede3_cfb 305 EXIST::FUNCTION:DES +EVP_des_ede3_cfb64 305 EXIST::FUNCTION:DES EVP_des_ede3_ofb 306 EXIST::FUNCTION:DES EVP_des_ede_cbc 307 EXIST::FUNCTION:DES -EVP_des_ede_cfb 308 EXIST::FUNCTION:DES +EVP_des_ede_cfb64 308 EXIST::FUNCTION:DES EVP_des_ede_ofb 309 EXIST::FUNCTION:DES EVP_des_ofb 310 EXIST::FUNCTION:DES EVP_desx_cbc 311 EXIST::FUNCTION:DES @@ -308,14 +308,14 @@ EVP_get_cipherbyname 315 EXIST::FUNCTION: EVP_get_digestbyname 316 EXIST::FUNCTION: EVP_get_pw_prompt 317 EXIST::FUNCTION: EVP_idea_cbc 318 EXIST::FUNCTION:IDEA -EVP_idea_cfb 319 EXIST::FUNCTION:IDEA +EVP_idea_cfb64 319 EXIST::FUNCTION:IDEA EVP_idea_ecb 320 EXIST::FUNCTION:IDEA EVP_idea_ofb 321 EXIST::FUNCTION:IDEA EVP_md2 322 EXIST::FUNCTION:MD2 EVP_md5 323 EXIST::FUNCTION:MD5 EVP_md_null 324 EXIST::FUNCTION: EVP_rc2_cbc 325 EXIST::FUNCTION:RC2 -EVP_rc2_cfb 326 EXIST::FUNCTION:RC2 +EVP_rc2_cfb64 326 EXIST::FUNCTION:RC2 EVP_rc2_ecb 327 EXIST::FUNCTION:RC2 EVP_rc2_ofb 328 EXIST::FUNCTION:RC2 EVP_rc4 329 EXIST::FUNCTION:RC4 @@ -962,7 +962,7 @@ i2t_ASN1_OBJECT 979 EXIST::FUNCTION: BN_BLINDING_new 980 EXIST::FUNCTION: BN_BLINDING_free 981 EXIST::FUNCTION: EVP_cast5_cbc 983 EXIST::FUNCTION:CAST -EVP_cast5_cfb 984 EXIST::FUNCTION:CAST +EVP_cast5_cfb64 984 EXIST::FUNCTION:CAST EVP_cast5_ecb 985 EXIST::FUNCTION:CAST EVP_cast5_ofb 986 EXIST::FUNCTION:CAST BF_decrypt 987 EXIST::FUNCTION:BF @@ -1057,7 +1057,7 @@ EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION: EVP_CIPHER_get_asn1_iv 1085 EXIST::FUNCTION: EVP_CIPHER_set_asn1_iv 1086 EXIST::FUNCTION: EVP_rc5_32_12_16_cbc 1087 EXIST::FUNCTION:RC5 -EVP_rc5_32_12_16_cfb 1088 EXIST::FUNCTION:RC5 +EVP_rc5_32_12_16_cfb64 1088 EXIST::FUNCTION:RC5 EVP_rc5_32_12_16_ecb 1089 EXIST::FUNCTION:RC5 EVP_rc5_32_12_16_ofb 1090 EXIST::FUNCTION:RC5 asn1_add_error 1091 EXIST::FUNCTION: @@ -2776,10 +2776,10 @@ ENGINE_load_4758cca 3218 EXIST::FUNCTION: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 -EVP_aes_128_cfb 3222 EXIST::FUNCTION:AES -EVP_aes_256_cfb 3223 EXIST::FUNCTION:AES +EVP_aes_128_cfb128 3222 EXIST::FUNCTION:AES +EVP_aes_256_cfb128 3223 EXIST::FUNCTION:AES EVP_aes_128_ofb 3224 EXIST::FUNCTION:AES -EVP_aes_192_cfb 3225 EXIST::FUNCTION:AES +EVP_aes_192_cfb128 3225 EXIST::FUNCTION:AES CONF_modules_free 3226 EXIST::FUNCTION: NCONF_default 3227 EXIST::FUNCTION: OPENSSL_no_config 3228 EXIST::FUNCTION: @@ -2803,3 +2803,67 @@ OpenSSLDie 3244 EXIST::FUNCTION: 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: +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: +EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES +FIPS_allow_md5 3256 EXIST:OPENSSL_FIPS: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: +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: +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: +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: +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: +EVP_des_cfb1 3277 EXIST::FUNCTION:DES +FIPS_dsa_check 3278 EXIST:OPENSSL_FIPS: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: +sk_is_sorted 3285 EXIST::FUNCTION: +X509_check_ca 3286 EXIST::FUNCTION: +private_idea_set_encrypt_key 3287 EXIST:OPENSSL_FIPS:FUNCTION:IDEA +HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC +private_SHA_Init 3289 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA0 +private_CAST_set_key 3290 EXIST:OPENSSL_FIPS:FUNCTION:CAST +private_RIPEMD160_Init 3291 EXIST:OPENSSL_FIPS:FUNCTION:RIPEMD +private_RC5_32_set_key 3292 EXIST:OPENSSL_FIPS:FUNCTION:RC5 +private_MD5_Init 3293 EXIST:OPENSSL_FIPS:FUNCTION:MD5 +private_RC4_set_key 3294 EXIST:OPENSSL_FIPS:FUNCTION:RC4 +private_MDC2_Init 3295 EXIST:OPENSSL_FIPS:FUNCTION:MDC2 +private_RC2_set_key 3296 EXIST:OPENSSL_FIPS:FUNCTION:RC2 +private_MD4_Init 3297 EXIST:OPENSSL_FIPS:FUNCTION:MD4 +private_BF_set_key 3298 EXIST:OPENSSL_FIPS:FUNCTION:BF +private_MD2_Init 3299 EXIST:OPENSSL_FIPS:FUNCTION:MD2 +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: diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl index b4bc0457e5..957264c6b5 100644 --- a/src/lib/libcrypto/util/mk1mf.pl +++ b/src/lib/libcrypto/util/mk1mf.pl @@ -10,7 +10,7 @@ $OPTIONS=""; $ssl_version=""; $banner="\t\@echo Building OpenSSL"; -open(IN,") { $ssl_version=$1 if (/^VERSION=(.*)$/); $OPTIONS=$1 if (/^OPTIONS=(.*)$/); @@ -18,7 +18,7 @@ while() { } close(IN); -die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; +die "Makefile is not the toplevel Makefile!\n" if $ssl_version eq ""; $infile="MINFO"; @@ -222,7 +222,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; @@ -236,6 +236,7 @@ $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; $cflags.=" -DOPENSSL_NO_EC" if $no_ec; $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; $cflags.=" -DOPENSSL_NO_HW" if $no_hw; +$cflags.=" -DOPENSSL_FIPS" if $fips; #$cflags.=" -DRSAref" if $rsaref ne ""; ## if ($unix) @@ -631,15 +632,21 @@ foreach (split(/\s+/,$test)) $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)"); - +if ($fips) + { + $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)"); + } print $defs; if ($platform eq "linux-elf") { print <<"EOF"; # Generate perlasm output files %.cpp: - (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) + (cd \$(\@D)/..; PERL=perl make -f Makefile asm/\$(\@F)) EOF } print "###################################################################\n"; @@ -921,6 +928,7 @@ sub read_options $no_aes=1; } elsif (/^rsaref$/) { } + elsif (/^fips$/) { $fips=1; } elsif (/^gcc$/) { $gcc=1; } elsif (/^debug$/) { $debug=1; } elsif (/^profile$/) { $profile=1; } diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index 01a1bfda19..9918c3d549 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl @@ -79,7 +79,7 @@ my $OS2=0; my $safe_stack_def = 0; my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", - "EXPORT_VAR_AS_FUNCTION" ); + "EXPORT_VAR_AS_FUNCTION", "OPENSSL_FIPS" ); 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", @@ -94,7 +94,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" ); my $options=""; -open(IN,") { $options=$1 if (/^OPTIONS=(.*)$/); } @@ -109,6 +109,7 @@ 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; foreach (@ARGV, split(/ /, $options)) { @@ -129,6 +130,7 @@ 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") { @@ -265,6 +267,7 @@ $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"; my $symhacks="crypto/symhacks.h"; @@ -469,7 +472,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; @@ -794,7 +797,7 @@ sub do_defs } close(IN); - my $algs; + my $algs = ''; my $plays; print STDERR "DEBUG: postprocessing ----------\n" if $debug; @@ -864,6 +867,7 @@ 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})) { @@ -1028,6 +1032,9 @@ 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 @@ -1119,7 +1126,7 @@ sub print_test_file sub get_version { local *MF; my $v = '?'; - open MF, 'Makefile.ssl' or return $v; + open MF, 'Makefile' or return $v; while () { $v = $1, last if /^VERSION=(.*?)\s*$/; } diff --git a/src/lib/libcrypto/util/mkerr.pl b/src/lib/libcrypto/util/mkerr.pl index 1b2915c767..60e534807e 100644 --- a/src/lib/libcrypto/util/mkerr.pl +++ b/src/lib/libcrypto/util/mkerr.pl @@ -41,7 +41,8 @@ while (@ARGV) { } if($recurse) { - @source = (, , ); + @source = (, , , , + ); } else { @source = @ARGV; } @@ -262,7 +263,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", @@ -404,7 +405,7 @@ EOF 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 diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl index 29e1404c69..928a274303 100644 --- a/src/lib/libcrypto/util/mkfiles.pl +++ b/src/lib/libcrypto/util/mkfiles.pl @@ -51,6 +51,14 @@ my @dirs = ( "crypto/ocsp", "crypto/ui", "crypto/krb5", +"fips", +"fips/aes", +"fips/des", +"fips/dsa", +"fips/dh", +"fips/rand", +"fips/rsa", +"fips/sha1", "ssl", "apps", "test", @@ -58,7 +66,7 @@ my @dirs = ( ); foreach (@dirs) { - &files_dir ($_, "Makefile.ssl"); + &files_dir ($_, "Makefile"); } exit(0); diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl index 9386da7aa4..c8653cecc3 100644 --- a/src/lib/libcrypto/util/mklink.pl +++ b/src/lib/libcrypto/util/mklink.pl @@ -52,6 +52,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/src/lib/libcrypto/util/mkstack.pl b/src/lib/libcrypto/util/mkstack.pl index 085c50f790..0ca9eb6a76 100644 --- a/src/lib/libcrypto/util/mkstack.pl +++ b/src/lib/libcrypto/util/mkstack.pl @@ -84,6 +84,7 @@ while() { #define sk_${type_thing}_shift(st) SKM_sk_shift($type_thing, (st)) #define sk_${type_thing}_pop(st) SKM_sk_pop($type_thing, (st)) #define sk_${type_thing}_sort(st) SKM_sk_sort($type_thing, (st)) +#define sk_${type_thing}_is_sorted(st) SKM_sk_is_sorted($type_thing, (st)) EOF } foreach $type_thing (sort @asn1setlst) { diff --git a/src/lib/libcrypto/util/pl/BC-16.pl b/src/lib/libcrypto/util/pl/BC-16.pl index 2033f524ca..8030653daa 100644 --- a/src/lib/libcrypto/util/pl/BC-16.pl +++ b/src/lib/libcrypto/util/pl/BC-16.pl @@ -64,7 +64,7 @@ $lfile=''; $asm='bcc -c -B -Tml'; $afile='/o'; -if ($no_asm) +if ($no_asm || $fips) { $bn_asm_obj=''; $bn_asm_src=''; @@ -119,11 +119,11 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$f,$_,@f); - + $file =~ s/\//$o/g if $o ne '/'; - $n=&bname($targer); + $n=&bname($target); $ret.="$target: $files $dep_libs\n"; $ret.=" \$(LINK) @&&|"; @@ -139,7 +139,12 @@ sub do_link_rule } else { $ret.="\n $r \$(APP_EX_OBJ) $files\n"; } - $ret.=" $target\n\n $libs\n\n|\n\n"; + $ret.=" $target\n\n $libs\n\n|\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl index e83b336190..897ae9d824 100644 --- a/src/lib/libcrypto/util/pl/BC-32.pl +++ b/src/lib/libcrypto/util/pl/BC-32.pl @@ -62,7 +62,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_mulw_obj='crypto\bn\asm\bn_win32.obj'; $bn_mulw_src='crypto\bn\asm\bn_win32.asm'; @@ -122,13 +122,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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\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"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl index 4bee638c4a..b9bb24d21d 100644 --- a/src/lib/libcrypto/util/pl/Mingw32.pl +++ b/src/lib/libcrypto/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) +if ($gaswin and !$no_asm and !$fips) { $bn_asm_obj='$(OBJ_D)\bn-win32.o'; $bn_asm_src='crypto/bn/asm/bn-win32.s'; @@ -92,13 +92,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } 1; diff --git a/src/lib/libcrypto/util/pl/OS2-EMX.pl b/src/lib/libcrypto/util/pl/OS2-EMX.pl index ddb3524210..75d72ebbcb 100644 --- a/src/lib/libcrypto/util/pl/OS2-EMX.pl +++ b/src/lib/libcrypto/util/pl/OS2-EMX.pl @@ -48,7 +48,7 @@ $des_enc_src=""; $bf_enc_obj=""; $bf_enc_src=""; -if (!$no_asm) +if (!$no_asm && !$fips) { $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"; @@ -106,13 +106,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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\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"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/VC-16.pl b/src/lib/libcrypto/util/pl/VC-16.pl index 7cda5e67a9..564ba3fd08 100644 --- a/src/lib/libcrypto/util/pl/VC-16.pl +++ b/src/lib/libcrypto/util/pl/VC-16.pl @@ -61,7 +61,7 @@ if ($shlib) else { $mlflags=''; } -$app_ex_obj="setargv.obj"; +$app_ex_obj=""; $obj='.obj'; $ofile="/Fo"; @@ -90,7 +90,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { if ($asmbits == 32) { @@ -147,7 +147,7 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; local($ret,$f,$_,@f); $file =~ s/\//$o/g if $o ne '/'; @@ -165,7 +165,12 @@ sub do_link_rule } else { $ret.=" \$(APP_EX_OBJ) $files"; } - $ret.="\n $target\n\n $libs\n\n<<\n\n"; + $ret.="\n $target\n\n $libs\n\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl index 285990c589..cf689b9feb 100644 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ b/src/lib/libcrypto/util/pl/VC-32.pl @@ -64,7 +64,7 @@ $des_enc_src=''; $bf_enc_obj=''; $bf_enc_src=''; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='crypto\bn\asm\bn_win32.obj'; $bn_asm_src='crypto\bn\asm\bn_win32.asm'; @@ -126,14 +126,19 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n"; + $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; + if (defined $sha1file) + { + $ret.=" $openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/linux.pl b/src/lib/libcrypto/util/pl/linux.pl index 8924ed5480..df05c40526 100644 --- a/src/lib/libcrypto/util/pl/linux.pl +++ b/src/lib/libcrypto/util/pl/linux.pl @@ -72,13 +72,18 @@ sub do_shlib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/ultrix.pl b/src/lib/libcrypto/util/pl/ultrix.pl index ea370c71f9..447b854708 100644 --- a/src/lib/libcrypto/util/pl/ultrix.pl +++ b/src/lib/libcrypto/util/pl/ultrix.pl @@ -17,7 +17,7 @@ else $cflags.=" -std1 -DL_ENDIAN"; -if (!$no_asm) +if (!$no_asm && !$fips) { $bn_asm_obj='$(OBJ_D)/mips1.o'; $bn_asm_src='crypto/bn/asm/mips1.s'; @@ -25,13 +25,18 @@ if (!$no_asm) sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/pl/unix.pl b/src/lib/libcrypto/util/pl/unix.pl index 146611ad99..bbd1798a2e 100644 --- a/src/lib/libcrypto/util/pl/unix.pl +++ b/src/lib/libcrypto/util/pl/unix.pl @@ -70,13 +70,18 @@ sub do_lib_rule sub do_link_rule { - local($target,$files,$dep_libs,$libs)=@_; + local($target,$files,$dep_libs,$libs,$sha1file,$openssl)=@_; 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\n"; + $ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n"; + if (defined $sha1file) + { + $ret.="\t$openssl sha1 -hmac etaonrishdlcupfm -binary $target > $sha1file"; + } + $ret.="\n"; return($ret); } diff --git a/src/lib/libcrypto/util/selftest.pl b/src/lib/libcrypto/util/selftest.pl index 276b81183d..e9d5aa8938 100644 --- a/src/lib/libcrypto/util/selftest.pl +++ b/src/lib/libcrypto/util/selftest.pl @@ -34,9 +34,9 @@ foreach $_ (split("\n",$c)) { $platform0=$1 if (/Configuring for (.*)$/); } -system "sh config" if (! -f "Makefile.ssl"); +system "sh config" if (! -f "Makefile"); -if (open(IN,") { $version=$1 if (/^VERSION=(.*)$/); $platform=$1 if (/^PLATFORM=(.*)$/); -- cgit v1.2.3-55-g6feb