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

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