Hi
I'm on Debian 13 with tpm2-tools 5.7-1
Can someone please explain me why this works:
tpm2_createprimary -C o -G ecc -c primary.ctx
tpm2_evictcontrol -c primary.ctx 0x81110001
tpm2_create -C 0x81110001 -G ecc -u key.pub -r key.priv -p "super-secret"
tpm2_encodeobject -C 0x81110001 -u key.pub -r key.priv -o tpm.pem
openssl req -provider tpm2 -provider default -new -key tpm.pem -subj "/CN=server" -out server.csr -passin "pass:super-secret"
And this does not work:
tpm2_createprimary -C o -G ecc -c primary.ctx
tpm2_create -C primary.ctx -G ecc -u key.pub -r key.priv -p "super-secret"
tpm2_encodeobject -C primary.ctx -u key.pub -r key.priv -o tpm.pem
openssl req -provider tpm2 -provider default -new -key tpm.pem -subj "/CN=server" -out server.csr -passin "pass:super-secret"
I'm really sure there is a valid reason for this. If someone could explain this to me or point me to a documentation where this is explained I would be very happy.
Also a second question popped up.
The -p option on tpm2_encodeobject says:
...
-p, --key-auth:
Indicates if an authorization value is needed for the object specified by -r and -u.
...
https://www.mankier.com/1/tpm2_encodeobject
Is the description inverted? In my example above I use a password (super-secret) and don't need to set -p (If I set -p the example does not work).
But the same example without password needs the -p option to work.
Hi
I'm on Debian 13 with tpm2-tools 5.7-1
Can someone please explain me why this works:
And this does not work:
I'm really sure there is a valid reason for this. If someone could explain this to me or point me to a documentation where this is explained I would be very happy.
Also a second question popped up.
The
-poption ontpm2_encodeobjectsays:https://www.mankier.com/1/tpm2_encodeobject
Is the description inverted? In my example above I use a password (
super-secret) and don't need to set-p(If I set-pthe example does not work).But the same example without password needs the
-poption to work.