Blame SOURCES/0001-tpm2_getekcertificate-add-default-web-address.patch

cecfa4
From 8c72f7402d8977807f531b08976760d62676cf8a Mon Sep 17 00:00:00 2001
cecfa4
From: Imran Desai <imran.desai@intel.com>
cecfa4
Date: Thu, 23 Jan 2020 11:21:58 -0700
cecfa4
Subject: [PATCH] tpm2_getekcertificate: add default web address
cecfa4
cecfa4
Currently only Intel (R) PTT certificates are hosted online.
cecfa4
A default web address pointing to the endorsement key certificate
cecfa4
hosting will help reduce user input.
cecfa4
cecfa4
Signed-off-by: Imran Desai <imran.desai@intel.com>
cecfa4
---
cecfa4
 test/integration/tests/getekcertificate.sh | 6 ++----
cecfa4
 tools/tpm2_getekcertificate.c              | 1 +
cecfa4
 2 files changed, 3 insertions(+), 4 deletions(-)
cecfa4
cecfa4
diff --git a/test/integration/tests/getekcertificate.sh b/test/integration/tests/getekcertificate.sh
cecfa4
index 33f4f8b2e4c0..e8c521756d2a 100755
cecfa4
--- a/test/integration/tests/getekcertificate.sh
cecfa4
+++ b/test/integration/tests/getekcertificate.sh
cecfa4
@@ -38,12 +38,10 @@ else
cecfa4
     fi
cecfa4
 fi
cecfa4
 
cecfa4
-tpm2_getekcertificate -u test_ek.pub -x -X -o ECcert.bin \
cecfa4
-https://ekop.intel.com/ekcertservice/
cecfa4
+tpm2_getekcertificate -u test_ek.pub -x -X -o ECcert.bin
cecfa4
 
cecfa4
 # Test that stdoutput is the same
cecfa4
-tpm2_getekcertificate -u test_ek.pub -x https://ekop.intel.com/ekcertservice/ \
cecfa4
--X > ECcert2.bin
cecfa4
+tpm2_getekcertificate -u test_ek.pub -x -X > ECcert2.bin
cecfa4
 
cecfa4
 # stdout file should match -E file.
cecfa4
 cmp ECcert.bin ECcert2.bin
cecfa4
diff --git a/tools/tpm2_getekcertificate.c b/tools/tpm2_getekcertificate.c
cecfa4
index 233d04d8b3d7..6a8fe894bb1c 100644
cecfa4
--- a/tools/tpm2_getekcertificate.c
cecfa4
+++ b/tools/tpm2_getekcertificate.c
cecfa4
@@ -32,6 +32,7 @@ struct tpm_getekcertificate_ctx {
cecfa4
 
cecfa4
 static tpm_getekcertificate_ctx ctx = {
cecfa4
     .is_tpm2_device_active = true,
cecfa4
+    .ek_server_addr = "https://ekop.intel.com/ekcertservice/",
cecfa4
 };
cecfa4
 
cecfa4
 static unsigned char *hash_ek_public(void) {
cecfa4
-- 
cecfa4
2.31.0
cecfa4