From 22f083815c2bb32fd5ffd8d55d894a38474aeeb2 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 10 Sep 2003 00:10:34 +0000 Subject: [PATCH] Include e_os.h in a few cases (to pick up str(n)icmp defs). Disable a few tests if not FIPS. --- fips/aes/fips_aesavs.c | 1 + fips/des/fips_desmovs.c | 1 + fips/dsa/fips_dsatest.c | 4 ++-- fips/rand/fips_randtest.c | 11 +++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/fips/aes/fips_aesavs.c b/fips/aes/fips_aesavs.c index c4c534d0c..532586a49 100644 --- a/fips/aes/fips_aesavs.c +++ b/fips/aes/fips_aesavs.c @@ -19,6 +19,7 @@ #include #include #include +#include "../e_os.h" #define AES_BLOCK_SIZE 16 diff --git a/fips/des/fips_desmovs.c b/fips/des/fips_desmovs.c index 8bb5dc6fd..db44b8a6e 100644 --- a/fips/des/fips_desmovs.c +++ b/fips/des/fips_desmovs.c @@ -20,6 +20,7 @@ #include #include #include +#include "../e_os.h" /*#define AES_BLOCK_SIZE 16*/ diff --git a/fips/dsa/fips_dsatest.c b/fips/dsa/fips_dsatest.c index 53dc8d881..224535ed4 100644 --- a/fips/dsa/fips_dsatest.c +++ b/fips/dsa/fips_dsatest.c @@ -74,10 +74,10 @@ #include #include -#ifdef OPENSSL_NO_DSA +#if defined(OPENSSL_NO_DSA) && !defined(OPENSSL_FIPS) int main(int argc, char *argv[]) { - printf("No DSA support\n"); + printf("No FIPS DSA support\n"); return(0); } #else diff --git a/fips/rand/fips_randtest.c b/fips/rand/fips_randtest.c index c84653eb1..ca47ca4ad 100644 --- a/fips/rand/fips_randtest.c +++ b/fips/rand/fips_randtest.c @@ -110,6 +110,15 @@ #include "../e_os.h" +#ifndef OPENSSL_FIPS +int main(int argc, char *argv[]) +{ + printf("No FIPS RAND support\n"); + return(0); +} + +#else + /* some FIPS 140-1 random number test */ /* some simple tests */ @@ -346,3 +355,5 @@ int main() EXIT(err); return(err); } + +#endif