Page MenuHome GnuPG

2.3.2: test suite is failing
Closed, ResolvedPublic

Description

Looks like something is tryimng to communicate with TPM module (which I haven't)
What I can do in that situation?

+ /usr/bin/mkdir -p /home/tkloczko/.gnupg
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check
Making check in m4
make[1]: Nothing to be done for 'check'.
[...]
PASS: t-sysutils
t-sexputil.c:468: test 0 failed: Unknown elliptic curve - ignored
This is likely due to a patched version of Libgcrypt with removed support for Brainpool curves
t-sexputil.c:468: test 1 failed: Unknown elliptic curve - ignored
PASS: t-sexputil
[...]
Making check in tpm2dtests
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/gnupg-2.3.2/tests/tpm2dtests'
LC_ALL=C EXEEXT= PATH="../gpgscm:/usr/bin:/usr/sbin:/usr/local/sbin" abs_top_srcdir="/home/tkloczko/rpmbuild/BUILD/gnupg-2.3.2" objdir="/home/tkloczko/rpmbuild/BUILD/gnupg-2.3.2" TPMSERVER="" SWTPM="/bin/swtpm" SWTPM_IOCTL="/bin/swtpm_ioctl" GPGSCM_PATH="/home/tkloczko/rpmbuild/BUILD/gnupg-2.3.2/tests/gpgscm" /home/tkloczko/rpmbuild/BUILD/gnupg-2.3.2/tests/gpgscm/gpgscm \
  /home/tkloczko/rpmbuild/BUILD/gnupg-2.3.2/tests/tpm2dtests/run-tests.scm
PASS: tests/openpgp/setup.scm
creating TPM  rsa2048  key
keytotpm failed: Secret key is available.

sec  rsa2048/8C68406504C219F9
     created: 2021-09-21  expires: 2023-09-21  usage: SC
[ unknown] (1). rsa <rsa@example.com>


sec  rsa2048/8C68406504C219F9
     created: 2021-09-21  expires: 2023-09-21  usage: SC
[ unknown] (1). rsa <rsa@example.com>

gpg: error from TPM: Card error


("/bin/kill" "96573") failed: kill: sending signal to 96573 failed: No such process

0: tests.scm:122: (throw (string-append (stringify what) " failed") (:stderr result))
1: defs.scm:367: (call-check `("/bin/kill" ,pid))
2: init.scm:671: (proc)
FAIL: <standard>tests/tpm2dtests/rsa.scm
[...]
12 tests run, 3 succeeded, 9 failed, 0 failed expectedly, 0 succeeded unexpectedly, 0 skipped.
Failed tests: <keyring>tests/tpm2dtests/longpassphrase.scm <keyring>tests/tpm2dtests/ecc.scm <keyring>tests/tpm2dtests/rsa.scm <keyboxd>tests/tpm2dtests/longpassphrase.scm <keyboxd>tests/tpm2dtests/ecc.scm <keyboxd>tests/tpm2dtests/rsa.scm <standard>tests/tpm2dtests/longpassphrase.scm <standard>tests/tpm2dtests/ecc.scm <standard>tests/tpm2dtests/rsa.scm
===================

Details

Version
2.3.2

Event Timeline

kloczek created this object in space S1 Public.
werner added a subscriber: werner.

Ich you do not have a working TPM or emulation but the tpm libraries installed run configure with the option

--disable-tpm2d

I think that scenario with TPM emulation would be more generic.
What needs to be done to have TPM emulation? Can you point on some doc about that?

Here is James' writeup on the use https://gnupg.org/blog/20210315-using-tpm-with-gnupg-2.3.html . For more details please consult the mailing lists and the commit messages.

werner claimed this task.