[gnutls-devel] GnuTLS | tpmtool --outfile fails due to password handling (#1752)
    Read-only notification of GnuTLS library development activities 
    gnutls-devel at lists.gnutls.org
       
    Sun Oct 19 19:35:52 CEST 2025
    
    
  
Jeremy Jackson created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1752
## Description of problem:
tpmtool -d 9999 --generate-rsa --bits 2048 --outfile /tmp/foo.tpm --srk-well-known
Fails is you press enter for an empty key password:
Setting log level to 9999
Enter key password: 
|<3>| ASSERT: ../../lib/tpm.c[gnutls_tpm_privkey_generate]:1434
|<2>| TPM (tpm) error: Authentication failed (1)
gnutls_tpm_privkey_generate: Error in provided SRK password for TPM.
It also fails if you type a password.
## Version of gnutls used:
3.8.9-3 (Debian) recompiled for TPM support
## Expected results:
If patched to skip code that uses a password (when there is none), it works:
in lib/tmp.c around line 1402:
       /* set the password of the actual key */
        if (key_password && strlen(key_password) > 0) {
                gnutls_datum_t pout;
                char *password = NULL;
-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1752
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20251019/a1104ac1/attachment.html>
    
    
More information about the Gnutls-devel
mailing list