Home GnuPG
Diffusion GnuPG 934a60de6b88

ssh: Fix adding an ed25519 key with a zero length comment.

Description

ssh: Fix adding an ed25519 key with a zero length comment.

* agent/command-ssh.c (sexp_key_construct): Do not put an empty string
into an S-expression.
(stream_read_string): Do not not try to a read a zero length block.

Actually we could handles this different by not putting a comment tag
into the s-expression, however this requires more code and at other
places we already return "(none)" instead of an empty comment.

The second fix is more or less a cosmetic thing to get better error
messages in case the underlying read system call returns an error.

Details

Provenance
wernerAuthored on Jan 28 2022, 7:59 PM
Parents
rG34ea19aff99f: gpg: Allow --dearmor to decode all kinds of armor files.
Branches
Unknown
Tags
Unknown
Tasks
T5794: Cannot add ed25519 SSH key with empty comment