Hello,
I'm programming an application that only gets and sets FIPS mode.
Here is my Makefile:
-------------------------------------------------------------------------------------------------------------------------------------------TOOLCHAIN:=/home/marcos/work/nitere/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin:$PATHCROSS_COMPILE:=arm-linux-gnueabihf-
OPENSSLDIR = /usr/local/ssl#INCLUDES = -I$(OPENSSLDIR)/include
-I$(OPENSSLDIR)/fips-2.0/include -I$(OPENSSLDIR)/libINCLUDES =
-I$(OPENSSLDIR)/include -I$(OPENSSLDIR)/fips-2.0/includeLIBS= -Lcrypto
PATH:=${TOOLCHAIN}:${PATH}
all: ${CROSS_COMPILE}gcc fipsctl.c -o fipsctl $(INCLUDES) $(LIBS)
clean: rm -Rf *.o
fipsctl-------------------------------------------------------------------------------------------------------------------------------------------
And here is my code:
-------------------------------------------------------------------------------------------------------------------------------------------#include
<openssl/crypto.h>#include <stdio.h>
int main ( int argc, char *argv[] ){ if(argv[0] == "get") { int
mode = FIPS_mode(); if(mode == 0) { printf("*** FIPS
module is disabled. ***"); } if(mode == 1) {
printf("*** FIPS module is enabled. ***"); } } else if(argv[0] ==
"set") { printf("*** Enabling FIPS module. ***"); }
else { printf("*** Error: unsupported option. ***"); }}
-------------------------------------------------------------------------------------------------------------------------------------------
When I try to cross-compile, I get this error:
marcos@marcos-X450LD:~/work/nitere/app/nitere$ makearm-linux-gnueabihf-gcc
fipsctl.c -o fipsctl -I/usr/local/ssl/include -I/usr/local/ssl/fips-2.0/include
-Lcrypto/tmp/ccSQhRme.o: In function `main':fipsctl.c:(.text+0x1a): undefined
reference to `FIPS_mode'collect2: error: ld returned 1 exit statusmake: ***
[all] Error 1
Does anybody know why I'm getting this error?
Any tip will be very helpful,Thanks.
_______________________________________________
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users