diff options
author | Armin Kuster <akuster808@gmail.com> | 2019-03-14 07:18:01 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2019-03-16 04:17:29 -0700 |
commit | acd6a1aa9a8693dc16a16abeba73d9ce80f1491e (patch) | |
tree | f3960dd16c9681b184e9f1d74841a20639d9834c | |
parent | a471489ea2db0be8c32b95a2b8848f00ea4557f0 (diff) | |
download | meta-security-acd6a1aa9a8693dc16a16abeba73d9ce80f1491e.tar.gz |
tpm2-totp: add new package
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch | 36 | ||||
-rw-r--r-- | meta-tpm/recipes-tpm2/tpm2-totp/tpm2-totp_0.9.9.bb | 17 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch b/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch new file mode 100644 index 0000000..c147054 --- /dev/null +++ b/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | C99 fixes: | ||
2 | |||
3 | src/libtpm2-totp.c:172:13: error: format '%li' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] | ||
4 | | dbg("Calling Esys_GetRandom for %li bytes", SECRETLEN - *secret_size); | ||
5 | |||
6 | src/tpm2-totp.c:343:23: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Werror=format=] | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
10 | |||
11 | Index: git/src/libtpm2-totp.c | ||
12 | =================================================================== | ||
13 | --- git.orig/src/libtpm2-totp.c | ||
14 | +++ git/src/libtpm2-totp.c | ||
15 | @@ -169,7 +169,7 @@ tpm2totp_generateKey(uint32_t pcrs, uint | ||
16 | if (rc != TPM2_RC_INITIALIZE) chkrc(rc, goto error); | ||
17 | |||
18 | while (*secret_size < SECRETLEN) { | ||
19 | - dbg("Calling Esys_GetRandom for %li bytes", SECRETLEN - *secret_size); | ||
20 | + dbg("Calling Esys_GetRandom for %li bytes", (long int) (SECRETLEN - *secret_size)); | ||
21 | rc = Esys_GetRandom(ctx, | ||
22 | ESYS_TR_NONE, ESYS_TR_NONE, ESYS_TR_NONE, | ||
23 | SECRETLEN - *secret_size, &t); | ||
24 | Index: git/src/tpm2-totp.c | ||
25 | =================================================================== | ||
26 | --- git.orig/src/tpm2-totp.c | ||
27 | +++ git/src/tpm2-totp.c | ||
28 | @@ -340,7 +340,7 @@ main(int argc, char **argv) | ||
29 | localtime (&now)); | ||
30 | chkrc(rc, exit(1)); | ||
31 | } | ||
32 | - printf("%s%06ld", timestr, totp); | ||
33 | + printf("%s%06ld", timestr, (long int)totp); | ||
34 | break; | ||
35 | case CMD_RESEAL: | ||
36 | rc = tpm2totp_loadKey_nv(opt.nvindex, &keyBlob, &keyBlob_size); | ||
diff --git a/meta-tpm/recipes-tpm2/tpm2-totp/tpm2-totp_0.9.9.bb b/meta-tpm/recipes-tpm2/tpm2-totp/tpm2-totp_0.9.9.bb new file mode 100644 index 0000000..bc94ab7 --- /dev/null +++ b/meta-tpm/recipes-tpm2/tpm2-totp/tpm2-totp_0.9.9.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "The tpm2-tss-engine project implements a cryptographic engine for OpenSSL." | ||
2 | DESCRIPTION = "The tpm2-tss-engine project implements a cryptographic engine for OpenSSL for Trusted Platform Module (TPM 2.0) using the tpm2-tss software stack that follows the Trusted Computing Groups (TCG) TPM Software Stack (TSS 2.0). It uses the Enhanced System API (ESAPI) interface of the TSS 2.0 for downwards communication. It supports RSA decryption and signatures as well as ECDSA signatures." | ||
3 | |||
4 | LICENSE = "BSD-2-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ed23833e93c95173c8d8913745e4b4e1" | ||
6 | |||
7 | SECTION = "security/tpm" | ||
8 | |||
9 | DEPENDS = "autoconf-archive libtss2-dev qrencode" | ||
10 | |||
11 | SRCREV = "44fcb6819f79302d5a088b3def648616e3551d4a" | ||
12 | SRC_URI = "git://github.com/tpm2-software/tpm2-totp.git \ | ||
13 | file://litpm2_totp_build_fix.patch " | ||
14 | |||
15 | inherit autotools-brokensep pkgconfig | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||