Noticed while writing a unit test for tofu info in gpgme++
For a message signed with gpgme's alpha@example.net key I get a list of TOFU
Information where for one UID the policy is auto and there is a description
while for the other two uids I get policy none and no description.
cat << EOF > /tmp/testmsg -----BEGIN PGP MESSAGE----- owGbwMvMwCSoW1RzPCOz3IRxjXQSR0lqcYleSUWJTZOvjVdpcYmCu1+oQmaJIleH GwuDIBMDGysTSIqBi1MApi+nlGGuwDeHao53HBr+FoVGP3xX+kvuu9fCMJvl6IOf y1kvP4y+8D5a11ang0udywsA =Crq6 -----END PGP MESSAGE----- EOF
Then in gpgme/tests build directory:
export GNUPGHOME=$(mktemp -d) echo "trust-model tofu+pgp" > $GNUPGHOME/gpg.conf cp gpg/pubring.gpg $GNUPGHOME cp gpg/secring.gpg $GNUPGHOME ./run-verify /tmp/testmsg
Original file name: [none]
Signature 0
status ....: Success summary ...: fingerprint: A0FF4590BB6122EDEF6E3C542D727CC768697734 created ...: 1015172412 expires ...: 0 validity ..: marginal val.reason : Success pubkey algo: 17 (DSA) digest algo: 2 (SHA1) pka address: [none] pka trust .: n/a other flags: tofu addr .: alfa@example.net validity : 1 (no history) policy ..: 1 (auto) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: Verified 0 messages signed by "Alfa Test (demo key)
<alfa@example.net>".
tofu addr .: alpha@example.net validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none] tofu addr .: alice (demo key) validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none]
^ See here that the policy differs and two of the UID's have no description.
Now if I put two commands in a script or quickly execute them twice I get
even weirder results:
(kf5) aheinecke@esus ~/a/k/b/g/tests>./run-verify /tmp/testmsg
Original file name: [none]
Signature 0
status ....: Success summary ...: fingerprint: A0FF4590BB6122EDEF6E3C542D727CC768697734 created ...: 1015172412 expires ...: 0 validity ..: marginal val.reason : Success pubkey algo: 17 (DSA) digest algo: 2 (SHA1) pka address: [none] pka trust .: n/a other flags: tofu addr .: alfa@example.net validity : 1 (no history) policy ..: 1 (auto) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: Verified 0 messages signed by "Alfa Test (demo key)
<alfa@example.net>".
tofu addr .: alpha@example.net validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none] tofu addr .: alice (demo key) validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none]
(kf5) aheinecke@esus ~/a/k/b/g/tests>./run-verify /tmp/testmsg
Original file name: [none]
Signature 0
status ....: Success summary ...: fingerprint: A0FF4590BB6122EDEF6E3C542D727CC768697734 created ...: 1015172412 expires ...: 0 validity ..: marginal val.reason : Success pubkey algo: 17 (DSA) digest algo: 2 (SHA1) pka address: [none] pka trust .: n/a other flags: tofu addr .: alfa@example.net validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none] tofu addr .: alpha@example.net validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none] tofu addr .: alice (demo key) validity : 1 (no history) policy ..: 0 (none) sigcount : 0 firstseen: 0 lastseen : 0 desc ....: [none]
Where I would have expected sigcount to be 1 on the second call.
If I add a sleep 1 between the calls the result is as expected.