From 33a003c2e1bc78981a999397b72ad243cc617b83 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Fri, 12 Jul 2024 14:36:13 +0800 Subject: [PATCH] Fix quote_verification test case Signed-off-by: Wei Liu --- .github/workflows/integration.yml | 1 + sh_script/integration_test.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3a855af..96cf2c0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -11,6 +11,7 @@ env: AS: nasm RUST_TOOLCHAIN: nightly-2023-12-31 TOOLCHAIN_PROFILE: minimal + LIBGUESTFS_BACKEND: direct permissions: contents: read diff --git a/sh_script/integration_test.py b/sh_script/integration_test.py index 8d2339c..8097ed3 100644 --- a/sh_script/integration_test.py +++ b/sh_script/integration_test.py @@ -265,7 +265,7 @@ def test_config_A_quote_verification(): LOG.debug("Export quote form CA\n") cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(ca_host_path).read()) - with open("quote.data", "wb") as fp: + with open(quote_path, "wb") as fp: fp.write(cert.get_extension(quote_extension_index).get_data()) LOG.debug("quote data export successfully: quote.data") @@ -846,7 +846,7 @@ def test_config_B_no_sb_quote_verification(): LOG.debug("Export quote form CA\n") cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(ca_host_path).read()) - with open("quote.data", "wb") as fp: + with open(quote_path, "wb") as fp: fp.write(cert.get_extension(quote_extension_index).get_data()) LOG.debug("quote data export successfully: quote.data") @@ -1380,7 +1380,7 @@ def test_config_B_sb_quote_verification(): LOG.debug("Export quote form CA\n") cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(ca_host_path).read()) - with open("quote.data", "wb") as fp: + with open(quote_path, "wb") as fp: fp.write(cert.get_extension(quote_extension_index).get_data()) LOG.debug("quote data export successfully: quote.data")