I am trying to compile tips_hmac.c to verify the FIPS build. But I see errors. Can you please let me know what needs to be done to fix this?
Errors: gcc -c fips_hmac.c -I/usr/local/ssl/include FIPSLD_CC=gcc /usr/local/ssl/fips-2.0/bin/fipsld -o fips_hmac fips_hmac.o /usr/local/ssl/fips-2.0/lib/fipscanister.o /usr/local/ssl/lib/libcrypto.a /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup': dso_dlfcn.c:(.text+0x2d): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x43): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x4d): undefined reference to `dlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr': dso_dlfcn.c:(.text+0x8f): undefined reference to `dladdr' dso_dlfcn.c:(.text+0xe9): undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func': dso_dlfcn.c:(.text+0x451): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x528): undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var': dso_dlfcn.c:(.text+0x5b1): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x688): undefined reference to `dlerror' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload': dso_dlfcn.c:(.text+0x6f3): undefined reference to `dlclose' /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load': dso_dlfcn.c:(.text+0x7d7): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x848): undefined reference to `dlclose' dso_dlfcn.c:(.text+0x88d): undefined reference to `dlerror' collect2: ld returned 1 exit status make: *** [fips_hmac] Error 1 Steps I followed to build FIPS Object Module, Openssl and my application (fips_hma.c) FIPS Object Module: ./config make make install OpenSSL ./config fips Make depend Make Make install Openssl Version Output: /usr/local/ssl/bin/openssl version -a OpenSSL 1.0.1c-fips 10 May 2012 built on: Mon Oct 22 16:20:18 PDT 2012 platform: linux-elf options: bn(64,32) rc4(8x,mmx) des(ptr,risc1,16,long) idea(int) blowfish(idx) compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -I/usr/local/ssl/fips-2.0/include -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM OPENSSLDIR: "/usr/local/ssl" My Application I used Makefile give in the FIPS User Guide 2.0 Makefile: CC = gcc OPENSSLDIR = /usr/local/ssl LIBCRYPTO = $(OPENSSLDIR)/lib/libcrypto.a INCLUDES = -I$(OPENSSLDIR)/include CMD = fips_hmac OBJS = $(CMD).o /usr/local/ssl/fips-2.0/lib/fipscanister.o $(CMD): $(OBJS) FIPSLD_CC=$(CC) /usr/local/ssl/fips-2.0/bin/fipsld -o $(CMD) $(OBJS) $(LIBCRYPTO) $(OBJS): $(CMD).c $(CC) -c $(CMD).c $(INCLUDES) clean: rm $(OBJS)