gpgsm, keygrip

Dirk-Willem van Gulik dirkx at webweaving.org
Sun Jul 30 14:52:14 CEST 2017


> On 30 Jul 2017, at 12:39, Dirk-Willem van Gulik <dirkx at webweaving.org> wrote:
> 
> Tools such as 
> 
> 	gpg-preset-passphrase 
> 
> require the 40 character keygrip. The manpage of gpg-preset-passphrase(1) suggest that this is best extracted from 
> 
> 	gpgsm
> 
> and that works nicely
> 
> gpgsm --dump-secret-key | grep keygrip:
>      keygrip: 1234567890123456789012345678901234567890
> 
> however a 'nice to parse' version of that:
> 
> 	gpgsm --dump-secret-key --with-colons
> 
> does not seem to emit the keygrip.
> 
> Any way of rectifying that - or another place to get the keygrip in a robust parsable format ?

Replying to my own question — the man page of of gpg-preset-passphrase  should perhaps suggest to use ‘gpg —with-keygrip ..’ or ‘gpg —with-colons ..’.

Dw.


More information about the Gnupg-users mailing list