Merge pull request #1300 from kaleb-himes/SGX-FIPS-LINUX

Add build scripts for default SGX build and improve cleanup
This commit is contained in:
JacobBarthelmeh
2018-01-31 09:34:06 -07:00
committed by GitHub
5 changed files with 22 additions and 1 deletions

View File

@ -10,6 +10,10 @@ To create the static library, simply call make:
`make -f sgx_t_static.mk all`
To clean the static library and compiled objects use the provided clean script:
`clean.sh`
This will create a local static library, libwolfssl.sgx.static.lib.a, that can be linked with SGX enclaves to access wolfSSL APIs using SGX hardware.
### Customization:
@ -20,6 +24,9 @@ This will create a local static library, libwolfssl.sgx.static.lib.a, that can b
For example, to enable all three:
`make -f sgx_t_static.mk CFLAGS=-DDEBUG_WOLFSSL HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1`
NOTE: This more customized step has been provided for easier execution in the
script `build.sh`
### Limitations:
Single Threaded (multiple threaded applications have not been tested)
AES-NI use with SGX has not been added in yet

9
IDE/LINUX-SGX/build.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
CFLAGS_NEW="-DDEBUG_WOLFSSL"
export CFLAGS="${CFLAGS} ${CFLAGS_NEW}"
echo ${CFLAGS}
make -f sgx_t_static.mk HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1

3
IDE/LINUX-SGX/clean.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
make -f sgx_t_static.mk clean

View File

@ -4,3 +4,5 @@
EXTRA_DIST+= IDE/LINUX-SGX/README.md
EXTRA_DIST+= IDE/LINUX-SGX/sgx_t_static.mk
EXTRA_DIST+= IDE/LINUX-SGX/build.sh
EXTRA_DIST+= IDE/LINUX-SGX/clean.sh

View File

@ -142,4 +142,4 @@ libwolfssl.sgx.static.lib.a: $(Wolfssl_C_Objects)
@echo "LINK => $@"
clean:
@rm -f wolfcrypt.* static_trusted/wolfssl_t.* libwolfssl.sgx.static.lib.a $(Wolfssl_C_Objects)
@rm -f $(WOLFSSL_ROOT)/wolfcrypt/benchmark/*.o $(WOLFSSL_ROOT)/wolfcrypt/test/*.o static_trusted/wolfssl_t.* libwolfssl.sgx.static.lib.a $(Wolfssl_C_Objects)