Skip to content

Commit

Permalink
Update build script (#119)
Browse files Browse the repository at this point in the history
* update build scripts, removing OPENSSL_INSTALL_DIR
* update tsgxssl file to remove full path

Signed-off-by: Jing He <jing.j.he@intel.com>
  • Loading branch information
jinghe-INTC authored Mar 11, 2022
1 parent 5118521 commit 418ef33
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Linux/build_openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
SGXSSL_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $SGXSSL_ROOT

OPENSSL_INSTALL_DIR="$SGXSSL_ROOT/../openssl_source/OpenSSL_install_dir_tmp"
OPENSSL_VERSION=`ls $SGXSSL_ROOT/../openssl_source/*1.1.1*.tar.gz | head -1 | grep -o '[^/]*$' | sed -s -- 's/\.tar\.gz//'`
if [ "$OPENSSL_VERSION" == "" ]
then
Expand Down Expand Up @@ -137,7 +136,7 @@ cp sgx_config.conf $OPENSSL_VERSION/ || exit 1
cp x86_64-xlate.pl $OPENSSL_VERSION/crypto/perlasm/ || exit 1

cd $SGXSSL_ROOT/../openssl_source/$OPENSSL_VERSION || exit 1
perl Configure --config=sgx_config.conf sgx-linux-x86_64 --with-rand-seed=none $ADDITIONAL_CONF $SPACE_OPT $MITIGATION_FLAGS no-idea no-mdc2 no-rc5 no-rc4 no-bf no-ec2m no-camellia no-cast no-srp no-hw no-dso no-shared no-ssl3 no-md2 no-md4 no-ui-console no-stdio no-afalgeng -D_FORTIFY_SOURCE=2 -DGETPID_IS_MEANINGLESS -include$SGXSSL_ROOT/../openssl_source/bypass_to_sgxssl.h --prefix=$OPENSSL_INSTALL_DIR || exit 1
perl Configure --config=sgx_config.conf sgx-linux-x86_64 --with-rand-seed=none $ADDITIONAL_CONF $SPACE_OPT $MITIGATION_FLAGS no-idea no-mdc2 no-rc5 no-rc4 no-bf no-ec2m no-camellia no-cast no-srp no-hw no-dso no-shared no-ssl3 no-md2 no-md4 no-ui-console no-stdio no-afalgeng -D_FORTIFY_SOURCE=2 -DGETPID_IS_MEANINGLESS -include$SGXSSL_ROOT/../openssl_source/bypass_to_sgxssl.h || exit 1

sed -i 's/ENGINE_set_default_RAND/dummy_ENGINE_set_default_RAND/' crypto/engine/tb_rand.c
make build_all_generated || exit 1
Expand Down
3 changes: 1 addition & 2 deletions Windows/build_package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ set SGXSSL_ROOT=%cd%
set SGXSSL_SOLUTION=%SGXSSL_ROOT%\sgx\
set OPENSSL_VERSION=%2
set TEST_MODE=%4
set OPENSSL_INSTALL_DIR=%SGXSSL_ROOT%\..\openssl_source\OpenSSL_install_dir_tmp
set PROCESSOR_ARCHITECTURE=AMD64
set WIN_SDK_VER=8.1
perl svn_revision.pl > sgx\libsgx_tsgxssl\tsgxssl_version.h
Expand Down Expand Up @@ -143,7 +142,7 @@ if "%my_Configuration%"=="CVE-2020-0551-CF-Release" (
set CVE_2020_0551_MITIGATIONS=-Qspectre-load
)
)
perl Configure --config=sgx_config.conf %OPENSSL_CFG_PLFM% %CVE_2020_0551_MITIGATIONS% no-dtls no-ssl2 no-idea no-mdc2 no-rc5 no-rc4 no-bf no-ec2m no-camellia no-cast no-srp no-hw no-dso no-shared no-ui-console no-ssl3 no-md2 no-md4 no-stdio -FI"%SGXSSL_ROOT%\..\openssl_source\bypass_to_sgxssl.h" -D_NO_CRT_STDIO_INLINE -DOPENSSL_NO_SOCK -DOPENSSL_NO_DGRAM -DOPENSSL_NO_ASYNC -arch:IA32 --prefix=%OPENSSL_INSTALL_DIR%
perl Configure --config=sgx_config.conf %OPENSSL_CFG_PLFM% %CVE_2020_0551_MITIGATIONS% no-dtls no-ssl2 no-idea no-mdc2 no-rc5 no-rc4 no-bf no-ec2m no-camellia no-cast no-srp no-hw no-dso no-shared no-ui-console no-ssl3 no-md2 no-md4 no-stdio -FI"%SGXSSL_ROOT%\..\openssl_source\bypass_to_sgxssl.h" -D_NO_CRT_STDIO_INLINE -DOPENSSL_NO_SOCK -DOPENSSL_NO_DGRAM -DOPENSSL_NO_ASYNC -arch:IA32
call powershell -Command "(Get-Content crypto\engine\tb_rand.c) | Foreach-Object {$_ -replace 'ENGINE_set_default_RAND', 'dummy_ENGINE_set_default_RAND'} | Out-File crypto\engine\tb_rand.c"

copy /y "%SGXSDKInstallPath%scripts\sgx-asm-pp.py" .
Expand Down
2 changes: 2 additions & 0 deletions Windows/sgx/libsgx_tsgxssl/libsgx_tsgxssl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<OmitDefaultLibName>true</OmitDefaultLibName>
<AdditionalOptions>/d2FH4- /Zc:tlsGuards- %(AdditionalOptions)</AdditionalOptions>
<UseFullPaths>false</UseFullPaths>
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Lib>
<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
Expand Down

0 comments on commit 418ef33

Please sign in to comment.