tpm2-pk11 icon indicating copy to clipboard operation
tpm2-pk11 copied to clipboard

p11tool shows 'No matching objects found'

Open stefanberger opened this issue 5 years ago • 1 comments

I followed the Wiki instructions for creating a key, which worked fine. Then used GnuTLS p11tool with the following command line

# p11tool --provider=${PWD}/libtpm2-pk11.so --list-privkeys
No matching objects found

Should the p11tool returned the created key at this point ?

stefanberger avatar Oct 15 '18 18:10 stefanberger

With the TPM 2 tool tpm2_listpersistent I see two keys.

Creating a key with p11tool also doesn't work:

# p11tool --provider=${PWD}/libtpm2-pk11.so --generate-privkey rsa --label mykey --bits 2048 --login "pkcs11:model=TPM2"
warning: no --outfile was specified and the generated public key will be printed on screen.
Generating an RSA key...
Error in pkcs11_generate:1311: The requested PKCS #11 object is not available
note: several smart cards do not support arbitrary size keys; try --bits 1024 or 2048.

stefanberger avatar Oct 15 '18 19:10 stefanberger