diff options
author | Werner Koch <wk@gnupg.org> | 2016-01-08 20:37:25 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-01-08 20:37:25 +0100 |
commit | b2da3951a395366bf1644bc4c4eb42d657effe17 (patch) | |
tree | a31221678bdd1d171be7f1129c01c2a5173d37aa /g10/export.c | |
parent | gpg: New command --export-ssh-key (diff) | |
download | gnupg2-b2da3951a395366bf1644bc4c4eb42d657effe17.tar.xz gnupg2-b2da3951a395366bf1644bc4c4eb42d657effe17.zip |
gpg: Support ECDSA keys with --export-ssh-key.
* g10/export.c (key_to_sshblob): Add hack for ECDSA.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/export.c')
-rw-r--r-- | g10/export.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/export.c b/g10/export.c index f415c1b7e..3f0693488 100644 --- a/g10/export.c +++ b/g10/export.c @@ -1369,6 +1369,12 @@ key_to_sshblob (membuf_t *mb, const char *identifier, ...) ulongtobuf (nbuf, (ulong)strlen (identifier)); put_membuf (mb, nbuf, 4); put_membuf_str (mb, identifier); + if (!strncmp (identifier, "ecdsa-sha2-", 11)) + { + ulongtobuf (nbuf, (ulong)strlen (identifier+11)); + put_membuf (mb, nbuf, 4); + put_membuf_str (mb, identifier+11); + } va_start (arg_ptr, identifier); while ((a = va_arg (arg_ptr, gcry_mpi_t))) { |