aboutsummaryrefslogtreecommitdiffstats
path: root/fips/sha
diff options
context:
space:
mode:
Diffstat (limited to 'fips/sha')
-rw-r--r--fips/sha/Makefile6
-rw-r--r--fips/sha/fips_sha1_selftest.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/fips/sha/Makefile b/fips/sha/Makefile
index a661640bc6a7..0f8cca975aec 100644
--- a/fips/sha/Makefile
+++ b/fips/sha/Makefile
@@ -46,8 +46,12 @@ lib: $(LIBOBJ)
@echo $(LIBOBJ) > lib
../fips_standalone_sha1$(EXE_EXT): fips_standalone_sha1.o
+ if [ -z "$(HOSTCC)" ] ; then \
FIPS_SHA_ASM=""; for i in $(SHA1_ASM_OBJ) sha1dgst.o ; do FIPS_SHA_ASM="$$FIPS_SHA_ASM ../../crypto/sha/$$i" ; done; \
- $(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM
+ $(CC) -o $@ $(CFLAGS) fips_standalone_sha1.o $$FIPS_SHA_ASM ; \
+ else \
+ $(HOSTCC) $(HOSTCFLAGS) -o $ $@ -I../../include -I../../crypto fips_standalone_sha1.c ../../crypto/sha/sha1dgst.c ; \
+ fi
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
diff --git a/fips/sha/fips_sha1_selftest.c b/fips/sha/fips_sha1_selftest.c
index ba6a29ed94ec..4c0d463e6fbb 100644
--- a/fips/sha/fips_sha1_selftest.c
+++ b/fips/sha/fips_sha1_selftest.c
@@ -78,7 +78,7 @@ void FIPS_corrupt_sha1()
int FIPS_selftest_sha1()
{
- int n;
+ size_t n;
for(n=0 ; n<sizeof(test)/sizeof(test[0]) ; ++n)
{