]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Build when not FIPS.
authorBen Laurie <ben@openssl.org>
Sun, 27 Jul 2003 21:13:35 +0000 (21:13 +0000)
committerBen Laurie <ben@openssl.org>
Sun, 27 Jul 2003 21:13:35 +0000 (21:13 +0000)
Makefile.org
fips/aes/fips_aesavs.c
fips/dsa/fips_dsa_ossl.c
fips/dsa/fips_dsatest.c
fips/fips_check_sha1
fips/sha1/fingerprint.sha1
fips/sha1/fips_sha1dgst.c
fips/sha1/fips_standalone_sha1.c
fips/sha1/standalone.sha1

index 61f11f4147356d4bfc42d465c03476e631eb98dc..486db65952a84dfa1466225bcc3e249fd4e985fe 100644 (file)
@@ -173,7 +173,7 @@ LIBKRB5=
 # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
 SHLIB_MARK=
 
-DIRS=   fips crypto ssl $(SHLIB_MARK) apps test tools
+DIRS=   crypto fips ssl $(SHLIB_MARK) apps test tools
 SHLIBDIRS= fips crypto ssl
 
 # dirs in crypto to build
index 5ea87312472546daed2c03c8dae9e5a32f1ee165..4d1d7edcace0b74debda9d5d67c80507b25690fc 100644 (file)
@@ -836,7 +836,9 @@ int main(int argc, char **argv)
   exit(0);
   */
 
+#ifdef FIPS
   FIPS_mode_set(1);
+#endif
   ERR_load_crypto_strings();
   if (argc > 1)
     {
index f5253ac39c37886d5433b5c0fa8dcf51dca5a016..7fc0648c10e8303a5fe23f53c84e17dde9b9bec9 100644 (file)
@@ -68,6 +68,8 @@
 #endif
 #include <openssl/fips.h>
 
+#ifdef FIPS
+
 static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
 static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
 static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
@@ -364,3 +366,9 @@ static int dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
 {
        return BN_mod_exp_mont(r, a, p, m, ctx, m_ctx);
 }
+
+#else /* ndef FIPS */
+
+static void *dummy=&dummy;
+
+#endif /* ndef FIPS */
index 9c8bd8420c97413a58a205ff1f35345efa644f28..1107a00b6915cd60bee73fa482125c32450774ff 100644 (file)
@@ -143,8 +143,9 @@ int main(int argc, char **argv)
        unsigned char sig[256];
        unsigned int siglen;
 
+#ifdef FIPS
        FIPS_mode_set(1);
-
+#endif
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
 
index 481bb8410ddc35a29d81243a0755610596689aea..ccc70d5f0a06a3d9f924f61616201c52e43503a2 100755 (executable)
@@ -3,5 +3,6 @@
 FP=$1
 shift
 
-$TOP/fips/sha1/fips_standalone_sha1 $@ | diff -u $FP -
+egrep '^CFLAG=.*-DFIPS ' $TOP/Makefile || exit 0
 
+$TOP/fips/sha1/fips_standalone_sha1 $@ | diff -u $FP -
index b78f2d756bb963f5794234d0312fa76e1e45be23..658fab3f61ca16f386564176e0c4d9cfd839c187 100644 (file)
@@ -1,3 +1,3 @@
-SHA1(fips_sha1dgst.c)= 5b541eae6c5dc9caad9ad4fb90cb840ff48b5904
+SHA1(fips_sha1dgst.c)= 609e2cbf5d3cdcf318ec10238a0e82b93b78e6b5
 SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c
 SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0
index 86543bdc32248b42a0a74bc4c010d63ce82ead5d..e76609529176d97e98b0f84876f3b7c38cca512e 100644 (file)
@@ -70,7 +70,11 @@ const char *SHA1_version="SHA1" OPENSSL_VERSION_PTEXT;
 
 #include "fips_sha_locl.h"
 
-#endif /* def FIPS */
+#else /* ndef FIPS */
+
+static void *dummy=&dummy;
+
+#endif /* ndef FIPS */
 
 #endif
 
index 81a5d02431775b1b24c24e02dfdf558aff1e84dd..b74cdc44f89c66b1c62bd44f57af5ddd7593261c 100644 (file)
@@ -52,6 +52,7 @@
 
 int main(int argc,char **argv)
     {
+#ifdef FIPS
     int n;
 
     if(argc < 2)
@@ -97,5 +98,6 @@ int main(int argc,char **argv)
            printf("%02x",md[i]);
        printf("\n");
        }
+#endif
     return 0;
     }
index 47e6eea9d0419d86de8706b5c4143454bb15299b..a36e466470c85639a2a4ae1993c5af4a755cd68d 100644 (file)
@@ -1,4 +1,4 @@
 SHA1(fips_standalone_sha1.c)= b6c1f9f1ea9a231c0520460ee1e009f721fbc121
-SHA1(fips_sha1dgst.c)= 5b541eae6c5dc9caad9ad4fb90cb840ff48b5904
+SHA1(fips_sha1dgst.c)= 609e2cbf5d3cdcf318ec10238a0e82b93b78e6b5
 SHA1(fips_sha_locl.h)= 677427c495b571991f013939ea7e5dea87828f8c
 SHA1(fips_md32_common.h)= 4f41bcde24750b3b8c99a06bcba2fe06ff8db4d0