Page MenuHome GnuPG

gpg-preset-passphrase does not hex the passphrase
Closed, ResolvedPublic

Description

Release: gnupg2-1.9.21-3

Environment

i686 running Fedora Core 5 with gnupg2-1.9.21-3

Description

gpg-preset-passphrase does not hex the passphrase instead it issues this command to the agent

PRESET_PASSPHRASE key-fingerprint -1 passphrase_in_clea

where the last char of the passphrase is cut off

How To Repeat

run gpg-preset-passphrase --preset key-fingerprint

Fix

gpg-preset-passphrase must correctly hex the passphrase before sending it to the agent, by hand it works fine

Event Timeline

Marcus, can you please take care of this?

Fixed with the following change in SVN (r4209). Thanks for the report!

2006-07-29 Marcus Brinkmann <marcus@g10code.de>

  • preset-passphrase.c (preset_passphrase): Do not strip off last character of passphrase. (make_hexstring): New function.
  • command.c (cmd_preset_passphrase): Use parse_hexstring to syntax check passphrase argument. Truncate passphrase at delimiter.
werner added a project: Restricted Project.

That was not a proper fix. We need to decode the hextstring in gpg-agent too.
Kiss Gabor figured that out.

werner removed a project: Restricted Project.
CarlSchwan mentioned this in Unknown Object (Event).Nov 27 2023, 9:49 AM