Skip to content

Commit 808e4c7

Browse files
committed
Fixed SGX SSL preparation scripts
Update OpenSSL and SGXSSL versions, switch to official OpenSSL sources, and fix build scripts Signed-off-by: Gotowalski, Bartosz <[email protected]>
1 parent e880e54 commit 808e4c7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

QuoteVerification/prepare_sgxssl.cmd

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,17 @@ set top_dir=%~dp0
3838
set sgxssl_dir=%top_dir%\sgxssl
3939

4040
set openssl_out_dir=%sgxssl_dir%\openssl_source
41-
set openssl_ver_name=openssl-3.1.6
41+
set openssl_ver_name=openssl-3.0.14
4242
set sgxssl_github_archive=https://github.com/intel/intel-sgx-ssl/archive
43-
set sgxssl_ver_name=3.1.6_Rev1
43+
set sgxssl_ver_name=3.0_Rev4
4444
set sgxssl_ver=%sgxssl_ver_name%
4545
set build_script=%sgxssl_dir%\Windows\build_package.cmd
4646

47-
@Rem set server_url_path=https://www.openssl.org/source/
48-
set server_url_path=https://af01p-igk.devtools.intel.com/artifactory/sgxdcapprerequisites-igk-local/prebuilt/ssl
47+
set server_url_path=https://www.openssl.org/source/
4948

5049
set full_openssl_url=%server_url_path%/%openssl_ver_name%.tar.gz
51-
set sgxssl_chksum=8fbacac2612f6117c11d04cd7989f1a035f978683a4626055133b2fbf332d016
52-
set openssl_chksum=5d2be4036b478ef3cb0a854ca9b353072c3a0e26d8a56f8f0ab9fb6ed32d38d7
50+
set sgxssl_chksum=3ae56df48a56f58fce8d0472ea82cc4380e30442b49b931c027fda9e637cb3fa
51+
set openssl_chksum=eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca
5352

5453
if not exist %sgxssl_dir% (
5554
mkdir %sgxssl_dir%
@@ -71,8 +70,7 @@ if not exist %build_script% (
7170
)
7271

7372
if not exist %openssl_out_dir%\%openssl_ver_name%.tar.gz (
74-
@Rem call powershell -Command "Invoke-WebRequest -URI %full_openssl_url% -OutFile %openssl_out_dir%\%openssl_ver_name%.tar.gz"
75-
call powershell -Command " [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; (New-Object Net.WebClient).DownloadFile('%full_openssl_url%', '%openssl_out_dir%\%openssl_ver_name%.tar.gz'); exit" > nul
73+
call powershell -Command "Invoke-WebRequest -URI %full_openssl_url% -OutFile %openssl_out_dir%\%openssl_ver_name%.tar.gz"
7674
)
7775
call powershell -Command " $opensslfilehash = Get-FileHash %openssl_out_dir%\%openssl_ver_name%.tar.gz; Write-Output $opensslfilehash.Hash | out-file -filepath %sgxssl_dir%\check_sum_openssl.txt -encoding ascii"
7876
findstr /i %openssl_chksum% %sgxssl_dir%\check_sum_openssl.txt>nul
@@ -84,7 +82,11 @@ if !errorlevel! NEQ 0 (
8482

8583
if not exist %sgxssl_dir%\Windows\package\lib\%PFM%\%CFG%\libsgx_tsgxssl.lib (
8684
cd %sgxssl_dir%\Windows\
87-
start /WAIT cmd /C call %build_script% %PFM%_%CFG% %openssl_ver_name% no-clean SIM || exit /b 1
85+
cmd /C (echo | call %build_script% %PFM%_%CFG% %openssl_ver_name% no-clean SIM)
86+
if !errorlevel! NEQ 0 (
87+
echo "Error calling %build_script% %PFM%_%CFG% %openssl_ver_name% no-clean SIM"
88+
exit /b 1
89+
)
8890
xcopy /E /H /y %sgxssl_dir%\Windows\package %top_dir%\package\
8991

9092
cd ..\

QuoteVerification/prepare_sgxssl.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ sgxssl_github_archive=https://github.com/intel/intel-sgx-ssl/archive
3939
sgxssl_file_name=3.1.6_Rev1
4040
build_script=$sgxssl_dir/Linux/build_openssl.sh
4141
server_url_path=https://www.openssl.org/source/
42-
#server_url_path=https://af01p-igk.devtools.intel.com/artifactory/sgxdcapprerequisites-igk-local/prebuilt/ssl
4342
full_openssl_url=$server_url_path/$openssl_ver_name.tar.gz
4443
full_openssl_url_old=$server_url_path/old/3.0/$openssl_ver_name.tar.gz
4544

@@ -76,8 +75,7 @@ if [[ "$*" == *SERVTD_ATTEST* ]];then
7675
fi
7776

7877
if [ ! -f $openssl_out_dir/$openssl_ver_name.tar.gz ]; then
79-
# wget $full_openssl_url_old -P $openssl_out_dir || wget $full_openssl_url -P $openssl_out_dir || exit 1
80-
wget $full_openssl_url -P $openssl_out_dir --no-check-certificate || exit 1
78+
wget $full_openssl_url -P $openssl_out_dir || exit 1
8179
sha256sum $openssl_out_dir/$openssl_ver_name.tar.gz > $sgxssl_dir/check_sum_openssl.txt
8280
grep $openssl_chksum $sgxssl_dir/check_sum_openssl.txt
8381
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)