summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Witschel2019-01-03 14:39:55 +0100
committerJonas Witschel2019-01-03 14:39:55 +0100
commit3979217f6b36bc9767e768e47a45846bc95232de (patch)
tree3e08cad96783a3b2558e5736ddeea8cf4b702b71
parent2c3f621457d4534360bbf00c6ba93fcc8432a16b (diff)
downloadaur-3979217f6b36bc9767e768e47a45846bc95232de.tar.gz
upgpkg: tpm2-totp-git r8.f9822b9-1
- Add option to initcpio hook for specifying a custom NV index - Upstream now requires tpm2-tools-git for tests (for tpm2_pcrextend)
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD11
-rw-r--r--initcpio_hooks_tpm2-totp2
-rw-r--r--initcpio_install_tpm2-totp10
4 files changed, 20 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4d894e8789a..6edd41c33259 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,28 @@
pkgbase = tpm2-totp-git
pkgdesc = Attest the trustworthiness of a device against a human using time-based one-time passwords
- pkgver = r1.51c2aee
- pkgrel = 3
+ pkgver = r8.f9822b9
+ pkgrel = 1
url = https://github.com/AndreasFuchsSIT/tpm2-totp
arch = x86_64
license = BSD
checkdepends = ibm-sw-tpm2
checkdepends = psmisc
+ checkdepends = tpm2-tools-git
makedepends = git
makedepends = autoconf-archive
makedepends = oath-toolkit
makedepends = pandoc
depends = qrencode
depends = tpm2-tss
+ optdepends = mkinitcpio: hook to display the TOTP during boot
provides = tpm2-totp
conflicts = tpm2-totp
source = git+https://github.com/AndreasFuchsSIT/tpm2-totp.git
source = initcpio_install_tpm2-totp
source = initcpio_hooks_tpm2-totp
sha512sums = SKIP
- sha512sums = cd8e3d6d2dd84ec1c24ecc5ff8b099325dfafc5fb0b6f2309c70005c345f37a944d8a1240f512e91de6b09679f23f9822cfc5f779f54e66ecfd34287b21f8cb1
- sha512sums = ae334b3e11ff89554de485c744556d88c789b773ff26dce9f2fc4c51a78eb12cd1094334a4ea43dc042c406e74b629e7ab5a68eeb36894d9635f81b2eaf02837
+ sha512sums = 33738cb9d30d6ad338b6cf6bca538ba4f9b49b9ae799626efc7462bb2a31e386cd04d8298e8c2e3743f4c212866e864332869e4393871f22360edc2567fad163
+ sha512sums = cfe75f46018ce254991288ef701381e200a646ef8b9bbca3dd93ab9a862a6e94fd5e519245fb59427ecf73140e419302b4eb81e8134683dfd89660b847ce3538
pkgname = tpm2-totp-git
diff --git a/PKGBUILD b/PKGBUILD
index 8b19723658a0..958d464f3155 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,23 @@
# Maintainer: Jonas Witschel <diabonas at gmx dot de>
pkgname=tpm2-totp-git
-pkgver=r1.51c2aee
-pkgrel=3
+pkgver=r8.f9822b9
+pkgrel=1
pkgdesc='Attest the trustworthiness of a device against a human using time-based one-time passwords'
arch=('x86_64')
url='https://github.com/AndreasFuchsSIT/tpm2-totp'
license=('BSD')
depends=('qrencode' 'tpm2-tss')
makedepends=('git' 'autoconf-archive' 'oath-toolkit' 'pandoc')
-checkdepends=('ibm-sw-tpm2' 'psmisc')
+checkdepends=('ibm-sw-tpm2' 'psmisc' 'tpm2-tools-git')
+optdepends=('mkinitcpio: hook to display the TOTP during boot')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+$url.git"
'initcpio_install_tpm2-totp'
'initcpio_hooks_tpm2-totp')
sha512sums=('SKIP'
- 'cd8e3d6d2dd84ec1c24ecc5ff8b099325dfafc5fb0b6f2309c70005c345f37a944d8a1240f512e91de6b09679f23f9822cfc5f779f54e66ecfd34287b21f8cb1'
- 'ae334b3e11ff89554de485c744556d88c789b773ff26dce9f2fc4c51a78eb12cd1094334a4ea43dc042c406e74b629e7ab5a68eeb36894d9635f81b2eaf02837')
+ '33738cb9d30d6ad338b6cf6bca538ba4f9b49b9ae799626efc7462bb2a31e386cd04d8298e8c2e3743f4c212866e864332869e4393871f22360edc2567fad163'
+ 'cfe75f46018ce254991288ef701381e200a646ef8b9bbca3dd93ab9a862a6e94fd5e519245fb59427ecf73140e419302b4eb81e8134683dfd89660b847ce3538')
BUILDENV+=('!check') # see warning below before enabling tests
pkgver() {
diff --git a/initcpio_hooks_tpm2-totp b/initcpio_hooks_tpm2-totp
index bb4d400077cc..cd45a4529636 100644
--- a/initcpio_hooks_tpm2-totp
+++ b/initcpio_hooks_tpm2-totp
@@ -2,7 +2,7 @@
run_hook() {
echo 'Verification TOTP:'
- tpm2-totp --time calculate
+ tpm2-totp ${tpm2_totp_nvindex:+--nvindex} $tpm2_totp_nvindex --time calculate
}
# vim: set ft=sh ts=4 sw=4 et:
diff --git a/initcpio_install_tpm2-totp b/initcpio_install_tpm2-totp
index 001324f8e145..eb22958104d4 100644
--- a/initcpio_install_tpm2-totp
+++ b/initcpio_install_tpm2-totp
@@ -8,14 +8,14 @@ build() {
add_module "$mod"
done
else
- add_all_modules '/tpm/'
+ add_all_modules /tpm/
fi
- add_binary 'tpm2-totp'
+ add_binary tpm2-totp
# Force usage of device TCTI and suppress warnings issued by tpm2-tss
# when trying to load other TCTI libraries
- add_file '/usr/lib/libtss2-tcti-device.so' '/usr/lib/libtss2-tcti-default.so'
+ add_file /usr/lib/libtss2-tcti-device.so /usr/lib/libtss2-tcti-default.so
add_runscript
}
@@ -36,6 +36,10 @@ be compared with the output of the second device. This will only be successful
and show a matching output if the boot process has not changed (new UEFI
firmware, different boot loader, ...).
+When using a custom NV index with the '--nvindex index' option of tpm2-totp,
+this index needs to be specified as 'tpm2_totp_nvindex=index' on the kernel
+command line.
+
Note that calculating the TOTP requires some entropy, which might be scarce
directly after startup. If the boot process appears to be stuck, it might help
to press some random keys to gather more entropy. A better alternative on modern