summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niewöhner2018-12-28 16:33:58 +0100
committerMichael Niewöhner2018-12-28 16:34:24 +0100
commitcd8e15cca96f04189db9532d9b48eca3b173647f (patch)
tree2b57863d0e29f4bcb3adc1f31dc195c93baf068a
parentadf88a94e70f1503218d14e78b0da5d6ee8ecc75 (diff)
downloadaur-tpm-quote-tools.tar.gz
Add srk well_known fix
-rw-r--r--.SRCINFO6
-rw-r--r--0001-Differentiate-between-owner-and-srk-well-known-passs.patch92
-rw-r--r--PKGBUILD13
3 files changed, 106 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c4918a56bbf1..2e4507e4ed89 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,15 @@
pkgbase = tpm-quote-tools
pkgdesc = Tools for TPM remote attestation
pkgver = 1.0.4
- pkgrel = 2
+ pkgrel = 3
url = http://sf.net/projects/tpmquotetools
arch = x86_64
license = BSD
depends = trousers
source = tpm-quote-tools-1.0.4.tar.gz::https://sourceforge.net/projects/tpmquotetools/files/1.0.4/tpm-quote-tools-1.0.4.tar.gz/download
- sha1sums = SKIP
+ source = 0001-Differentiate-between-owner-and-srk-well-known-passs.patch
+ sha1sums = dfbe967744833e76b7642b379bba2918d0a4263d
+ sha1sums = a02f51d88bc803a8866b87c90a09110bbb367a92
pkgname = tpm-quote-tools
diff --git a/0001-Differentiate-between-owner-and-srk-well-known-passs.patch b/0001-Differentiate-between-owner-and-srk-well-known-passs.patch
new file mode 100644
index 000000000000..5ea8771629b1
--- /dev/null
+++ b/0001-Differentiate-between-owner-and-srk-well-known-passs.patch
@@ -0,0 +1,92 @@
+From 500ca87db7e4935c77a545168183e9f7c3146c32 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= <foss@mniewoehner.de>
+Date: Fri, 28 Dec 2018 16:28:19 +0100
+Subject: [PATCH] Differentiate between owner and srk well known passsword
+
+---
+ tpm_mkaik.8 | 7 +++++--
+ tpm_mkaik.c | 15 ++++++++++-----
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/tpm_mkaik.8 b/tpm_mkaik.8
+index ee98ead..5f05423 100644
+--- a/tpm_mkaik.8
++++ b/tpm_mkaik.8
+@@ -3,7 +3,7 @@
+ tpm_mkaik \- make a TPM Attestation Identity Key
+ .SH SYNOPSIS
+ .B tpm_mkaik
+-.RB [ \-zuhv ]
++.RB [ \-yzuhv ]
+ .RI BLOB-FILE
+ .RI PUBKEY-FILE
+ .br
+@@ -16,9 +16,12 @@ The public key is stored in the file
+ .RI PUBKEY-FILE.
+ The public key is DER encoded.
+ .TP
+-.RB \-z
++.RB \-y
+ Use the well known secret used as the owner secret.
+ .TP
++.RB \-z
++Use the well known secret used as the SRK secret.
++.TP
+ .RB \-u
+ Use TSS UNICODE encoding for passwords.
+ .TP
+diff --git a/tpm_mkaik.c b/tpm_mkaik.c
+index 3c9edcd..ef3dc1b 100644
+--- a/tpm_mkaik.c
++++ b/tpm_mkaik.c
+@@ -102,7 +102,8 @@ static int usage(const char *prog)
+ const char text[] =
+ "Usage: %s [options] blob pubkey\n"
+ "Options:\n"
+- "\t-z Use well known secret used as owner secret\n"
++ "\t-y Use well known secret used as owner secret\n"
++ "\t-z Use well known secret used as SRK secret\n"
+ "\t-u Use TSS UNICODE encoding for passwords\n"
+ "\t-h Display command usage info\n"
+ "\t-v Display command version info\n"
+@@ -115,13 +116,17 @@ static int usage(const char *prog)
+
+ int main (int argc, char **argv)
+ {
+- int well_known = 0;
++ int well_known_srk = 0;
++ int well_known_owner = 0;
+ int utf16le = 0;
+ int opt;
+ while ((opt = getopt(argc, argv, "zuhv")) != -1) {
+ switch (opt) {
++ case 'y':
++ well_known_owner = 1;
++ break;
+ case 'z':
+- well_known = 1;
++ well_known_srk = 1;
+ break;
+ case 'u':
+ utf16le = 1;
+@@ -173,7 +178,7 @@ int main (int argc, char **argv)
+ if (rc != TSS_SUCCESS)
+ return tidy(hContext, tss_err(rc, "getting SRK policy"));
+
+- rc = setSecret("Enter SRK password: ", hContext, hSrkPolicy, well_known, utf16le);
++ rc = setSecret("Enter SRK password: ", hContext, hSrkPolicy, well_known_srk, utf16le);
+ if (rc != TSS_SUCCESS)
+ return tidy(hContext, tss_err(rc, "setting SRK secret"));
+
+@@ -193,7 +198,7 @@ int main (int argc, char **argv)
+ if (rc != TSS_SUCCESS)
+ return tidy(hContext, tss_err(rc, "assigning TPM policy"));
+
+- rc = setSecret("Enter owner password: ", hContext, hTPMPolicy, well_known, utf16le);
++ rc = setSecret("Enter owner password: ", hContext, hTPMPolicy, well_known_owner, utf16le);
+ if (rc != TSS_SUCCESS)
+ return tidy(hContext, tss_err(rc, "setting TPM policy secret"));
+
+--
+2.20.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 65ea08824adb..ab36c99bef09 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,21 @@
pkgname=tpm-quote-tools
pkgver=1.0.4
-pkgrel=1
+pkgrel=3
pkgdesc="Tools for TPM remote attestation"
arch=('x86_64')
url="http://sf.net/projects/tpmquotetools"
license=('BSD')
depends=('trousers')
-source=("tpm-quote-tools-${pkgver}.tar.gz::https://sourceforge.net/projects/tpmquotetools/files/${pkgver}/tpm-quote-tools-${pkgver}.tar.gz/download")
-sha1sums=('SKIP')
+source=("tpm-quote-tools-${pkgver}.tar.gz::https://sourceforge.net/projects/tpmquotetools/files/${pkgver}/tpm-quote-tools-${pkgver}.tar.gz/download"
+ "0001-Differentiate-between-owner-and-srk-well-known-passs.patch")
+sha1sums=('dfbe967744833e76b7642b379bba2918d0a4263d'
+ 'a02f51d88bc803a8866b87c90a09110bbb367a92')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../0001-Differentiate-between-owner-and-srk-well-known-passs.patch
+}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"