Skip to content

Instantly share code, notes, and snippets.

@konklone
Created October 10, 2014 14:19
Show Gist options
  • Save konklone/3e3a7072088a3352f3f6 to your computer and use it in GitHub Desktop.
Save konklone/3e3a7072088a3352f3f6 to your computer and use it in GitHub Desktop.
building openssl with FIPS
#
all: test
openssl-fips-2.0.8.tar.gz:
wget http://www.openssl.org/source/openssl-fips-2.0.8.tar.gz
openssl-1.0.1i.tar.gz:
wget http://www.openssl.org/source/openssl-1.0.1i.tar.gz
ssl:
mkdir ssl
openssl-fips-2.0.8/.built: openssl-fips-2.0.8.tar.gz ssl
gunzip -c openssl-fips-2.0.8.tar.gz | tar xf -
cd openssl-fips-2.0.8; \
export FIPSDIR=$$PWD/../ssl/fips2.0; \
./config; \
make; \
make install; \
touch .built
openssl-1.0.1i/.built: openssl-fips-2.0.8/.built openssl-1.0.1i.tar.gz
gunzip -c openssl-1.0.1i.tar.gz | tar xf -
cd openssl-1.0.1i; \
./config fips shared --openssldir=$$PWD/../ssl --with-fipsdir=$$PWD/../ssl/fips2.0; \
make depend; \
make; \
make install; \
touch .built
test: openssl-1.0.1i/.built
OPENSSL_FIPS=1 LD_LIBRARY_PATH=ssl/lib ssl/bin/openssl version
# this should work:
LD_LIBRARY_PATH=ssl/lib ssl/bin/openssl md5 Makefile
# should get errors for this:
OPENSSL_FIPS=1 LD_LIBRARY_PATH=ssl/lib ssl/bin/openssl md5 Makefile
clean:
rm -rf openssl-fips-2.0.8 openssl-1.0.1i ssl
@geeksmith
Copy link

For this target:
openssl-1.0.1i/.built: openssl-fips-2.0.8/.built openssl-1.0.1i.tar.gz

The path to the .built file looks incorrect.

Copy link

ghost commented Feb 26, 2018

Can you please do it for fips enabled WolfSsl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment