From 899ffab2c9549e2fddfae2267e11b108f057af73 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Thu, 25 Sep 2003 20:04:40 +0000 Subject: [PATCH] Make FIPS work again. --- Makefile.org | 2 +- fips/aes/fingerprint.sha1 | 4 ++-- fips/des/fingerprint.sha1 | 4 ++-- fips/des/fips_des_selftest.c | 3 ++- fips/dsa/Makefile.ssl | 2 +- fips/dsa/fingerprint.sha1 | 4 ++-- fips/fingerprint.sha1 | 6 +++--- fips/fips_check_sha1 | 2 +- fips/fips_err_wrapper.c | 2 ++ fips/sha1/fingerprint.sha1 | 4 ++-- fips/sha1/fips_sha1dgst.c | 1 + fips/sha1/fips_standalone_sha1.c | 1 + fips/sha1/standalone.sha1 | 6 +++--- 13 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Makefile.org b/Makefile.org index ca0b363e02..9eafb68a96 100644 --- a/Makefile.org +++ b/Makefile.org @@ -184,7 +184,7 @@ SDIRS= objects \ buffer bio stack lhash rand err \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 -FDIRS= sha1 rand des aes dsa +FDIRS= sha1 rand des aes dsa rsa # tests to perform. "alltests" is a special word indicating that all tests # should be performed. diff --git a/fips/aes/fingerprint.sha1 b/fips/aes/fingerprint.sha1 index 8ffba23ecf..ead8f8a5ad 100644 --- a/fips/aes/fingerprint.sha1 +++ b/fips/aes/fingerprint.sha1 @@ -1,3 +1,3 @@ -SHA1(fips_aes_core.c)= 5298df7807877eed470a1ee5f8331fc0876689da -SHA1(fips_aes_selftest.c)= 49cd793c702170721385f4efc1dc15cf7b18eff0 +SHA1(fips_aes_core.c)= 638c2707398fea4181243b0d7a2d6acd33084659 +SHA1(fips_aes_selftest.c)= b41f520aa90f813de815ee77ade4e7c73ef147b0 SHA1(fips_aes_locl.h)= a3c01d9a4f9d5211e9e785852f6f1a2febfd73b6 diff --git a/fips/des/fingerprint.sha1 b/fips/des/fingerprint.sha1 index ea283abc46..742465a5f0 100644 --- a/fips/des/fingerprint.sha1 +++ b/fips/des/fingerprint.sha1 @@ -1,3 +1,3 @@ -SHA1(fips_des_enc.c)= a4b88bb16782604a298d74de04a8b3bc3a204c5a -SHA1(fips_des_selftest.c)= f516832dcb9c49c20adc35c14e2b00ed0ebd36b2 +SHA1(fips_des_enc.c)= 75389f527cc456178e6a2e35f82bf49f98fe3e90 +SHA1(fips_des_selftest.c)= 4165967e54097aab14e6737525c7f34e052d7b16 SHA1(fips_des_locl.h)= a4cf60ca32476a2483b3e4460ec9a19c0444fd20 diff --git a/fips/des/fips_des_selftest.c b/fips/des/fips_des_selftest.c index 30d5e6fa2c..811581f032 100644 --- a/fips/des/fips_des_selftest.c +++ b/fips/des/fips_des_selftest.c @@ -51,8 +51,9 @@ #include #include #include +#include -#ifdef FIPS +#ifdef OPENSSL_FIPS static struct { DES_cblock key; diff --git a/fips/dsa/Makefile.ssl b/fips/dsa/Makefile.ssl index 4b981fd5f4..edd6b4444c 100644 --- a/fips/dsa/Makefile.ssl +++ b/fips/dsa/Makefile.ssl @@ -1,5 +1,5 @@ # -# SSLeay/fips/sha1/Makefile +# SSLeay/fips/dsa/Makefile # DIR= dsa diff --git a/fips/dsa/fingerprint.sha1 b/fips/dsa/fingerprint.sha1 index c484664730..ed1eae4a0e 100644 --- a/fips/dsa/fingerprint.sha1 +++ b/fips/dsa/fingerprint.sha1 @@ -1,2 +1,2 @@ -SHA1(fips_dsa_ossl.c)= eb769361b524507754bcbfbda92b973e37433478 -SHA1(fips_dsa_gen.c)= 6cd992b01f8b612dcdda7273cdc2302b05e39175 +SHA1(fips_dsa_ossl.c)= 7902d159932771d749ecba2ebf78995240356990 +SHA1(fips_dsa_gen.c)= 37549c7769084e9989a3a26f7732557d3b691812 diff --git a/fips/fingerprint.sha1 b/fips/fingerprint.sha1 index 31db32e753..44277a95c3 100644 --- a/fips/fingerprint.sha1 +++ b/fips/fingerprint.sha1 @@ -1,4 +1,4 @@ -SHA1(fips.c)= e7af483a2ca3c0a845b4528b936e143bfdae945e -SHA1(fips_err_wrapper.c)= 527047304bfaa75f6ace20b4f7ac3afb6d89d480 -SHA1(fips.h)= 58386539af75f8f622b041a43bf1880fee8642f7 +SHA1(fips.c)= 3224544013a0115b0e1516f2b4c248b0b7f5e820 +SHA1(fips_err_wrapper.c)= ad4a2ffa18743c83827de398c811eb6124ba0b27 +SHA1(fips.h)= 638e5f4d564fd503a6060bc49567c52fc21d8d10 SHA1(fips_err.h)= 8d9fd3ab3e6ca5297c5714e7f6cd9834e22b4cba diff --git a/fips/fips_check_sha1 b/fips/fips_check_sha1 index 3c94c35771..d24f4e2145 100755 --- a/fips/fips_check_sha1 +++ b/fips/fips_check_sha1 @@ -3,6 +3,6 @@ FP=$1 shift -egrep '^CFLAG=.*-DFIPS( |$)' $TOP/Makefile || exit 0 +egrep 'define OPENSSL_FIPS' $TOP/include/openssl/opensslconf.h > /dev/null || exit 0 $TOP/fips/sha1/fips_standalone_sha1 $@ | diff -u $FP - || { echo; echo "*** Your source code does not match the FIPS certified source ***"; echo; exit 1; } diff --git a/fips/fips_err_wrapper.c b/fips/fips_err_wrapper.c index 0897551671..09f11748f6 100644 --- a/fips/fips_err_wrapper.c +++ b/fips/fips_err_wrapper.c @@ -1,3 +1,5 @@ +#include + #ifdef OPENSSL_FIPS # include "fips_err.h" #else diff --git a/fips/sha1/fingerprint.sha1 b/fips/sha1/fingerprint.sha1 index 4037968ac8..75aced78fa 100644 --- a/fips/sha1/fingerprint.sha1 +++ b/fips/sha1/fingerprint.sha1 @@ -1,4 +1,4 @@ -SHA1(fips_sha1dgst.c)= 609e2cbf5d3cdcf318ec10238a0e82b93b78e6b5 -SHA1(fips_sha1_selftest.c)= 2be7c82cba769de0bcce0539ecc854b74a1d16fd +SHA1(fips_sha1dgst.c)= c197020b866c1ab32f1e30f5599592e14fcaa925 +SHA1(fips_sha1_selftest.c)= 55fef82fa5f4aec6b1359847fe50555ff77cec49 SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0 diff --git a/fips/sha1/fips_sha1dgst.c b/fips/sha1/fips_sha1dgst.c index 89462fcc64..2ca2f75fa8 100644 --- a/fips/sha1/fips_sha1dgst.c +++ b/fips/sha1/fips_sha1dgst.c @@ -62,6 +62,7 @@ #define SHA_1 #include +#include #ifdef OPENSSL_FIPS const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT; diff --git a/fips/sha1/fips_standalone_sha1.c b/fips/sha1/fips_standalone_sha1.c index 9631470ccd..5e1984ab8e 100644 --- a/fips/sha1/fips_standalone_sha1.c +++ b/fips/sha1/fips_standalone_sha1.c @@ -48,6 +48,7 @@ */ #include +#include #include #include diff --git a/fips/sha1/standalone.sha1 b/fips/sha1/standalone.sha1 index 23992498c5..48e7256440 100644 --- a/fips/sha1/standalone.sha1 +++ b/fips/sha1/standalone.sha1 @@ -1,5 +1,5 @@ -SHA1(fips_sha1dgst.c)= 609e2cbf5d3cdcf318ec10238a0e82b93b78e6b5 -SHA1(fips_sha1_selftest.c)= 2be7c82cba769de0bcce0539ecc854b74a1d16fd -SHA1(fips_standalone_sha1.c)= 3af5efe6edb65bd4ab2f5de5db425a8295a897b1 +SHA1(fips_sha1dgst.c)= c197020b866c1ab32f1e30f5599592e14fcaa925 +SHA1(fips_sha1_selftest.c)= 55fef82fa5f4aec6b1359847fe50555ff77cec49 +SHA1(fips_standalone_sha1.c)= cee2161ed76a5d5146ae2f2c28012d5764830d7f SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0 -- 2.25.1