From 74ae38c32658348645e8490e891daffe38f594b6 Mon Sep 17 00:00:00 2001 From: YangLiang <37134635+YangLiang3@users.noreply.github.com> Date: Thu, 10 Sep 2020 19:45:20 +0800 Subject: [PATCH] ra-tls: Fix an error and remove a hardcode In python, range paramter should use int type instead of float. And remove SGX_UNLINKABLE_SIGNATURE hardcode by variant quote_type. Signed-off-by: Liang Yang --- ra-tls/sgx-ra-tls/ra_tls_options.c.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ra-tls/sgx-ra-tls/ra_tls_options.c.sh b/ra-tls/sgx-ra-tls/ra_tls_options.c.sh index 1000571..382ecc4 100755 --- a/ra-tls/sgx-ra-tls/ra_tls_options.c.sh +++ b/ra-tls/sgx-ra-tls/ra_tls_options.c.sh @@ -16,7 +16,7 @@ if ( [[ "$QUOTE_TYPE" != "SGX_LINKABLE_SIGNATURE" ]] ) && \ echo "//QUOTE_TYPE must be one of SGX_UNLINKABLE_SIGNATURE or SGX_LINKABLE_SIGNATURE" fi -SPID_BYTE_ARRAY=$(echo $SPID | python -c 'import sys ; s = sys.stdin.readline().strip(); print("".join(["0x"+s[2*i:2*i+2]+"," for i in range(len(s)/2)]))') +SPID_BYTE_ARRAY=$(echo $SPID | python -c 'import sys ; s = sys.stdin.readline().strip(); print("".join(["0x"+s[2*i:2*i+2]+"," for i in range(int(len(s)/2))]))') cat <