mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[Pal/Linux-SGX] Skip attestation test if no RA key is configured
Before this commit the attestation regression test was run even if there was no SPID/key configured.
This commit is contained in:
committed by
Michał Kowalczyk
parent
1738f698e7
commit
bcf8a963b1
@@ -9,6 +9,7 @@ import random
|
||||
import shutil
|
||||
import string
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
@@ -18,6 +19,10 @@ from regression import (
|
||||
expectedFailureIf,
|
||||
)
|
||||
|
||||
if HAS_SGX:
|
||||
sys.path.insert(0, os.path.dirname(__file__) + '/../src/host/Linux-SGX/signer')
|
||||
from pal_sgx_sign import read_manifest
|
||||
|
||||
CPUINFO_FLAGS_WHITELIST = [
|
||||
'fpu', 'vme', 'de', 'pse', 'tsc', 'msr', 'pae', 'mce', 'cx8', 'apic', 'sep',
|
||||
'mtrr', 'pge', 'mca', 'cmov', 'pat', 'pse36', 'pn', 'clflush', 'dts',
|
||||
@@ -566,6 +571,10 @@ class TC_40_AVXDisable(RegressionTestCase):
|
||||
@unittest.skipUnless(HAS_SGX, 'need SGX')
|
||||
class TC_50_Attestation(RegressionTestCase):
|
||||
def test_000_remote_attestation(self):
|
||||
manifest, _ = read_manifest(self.get_manifest("Attestation"))
|
||||
if not manifest.get('sgx.ra_client_spid'):
|
||||
raise unittest.SkipTest('needs RA SPID and key')
|
||||
|
||||
_, stderr = self.run_binary(["Attestation"])
|
||||
|
||||
for line in stderr.split("\n"):
|
||||
|
||||
Reference in New Issue
Block a user