chiark / gitweb /
gpg: Make --export-ssh-key work for the primary key.
authorWerner Koch <wk@gnupg.org>
Tue, 14 Feb 2017 09:55:13 +0000 (10:55 +0100)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 18 Sep 2017 20:41:12 +0000 (21:41 +0100)
commit7a8cb91b3ba13aae3e3705e87b11b98cbc8f94f9
tree693c0aea264f976212a35ac6cad27975cd18ad72
parentd334ac27581e7ea269a278b95dfdcdffa4d292e8
gpg: Make --export-ssh-key work for the primary key.

* g10/export.c (export_ssh_key): Also check the primary key.
--

If no suitable subkey was found for export, we now check whether the
primary key is suitable for export and export this one.  Without this
change it was only possible to export the primary key by using the '!'
suffix in the key specification.

Also added a sample key for testing this.

GnuPG-bug-id: 2957
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit b456e5be91dc064fc9509ea86edab113721ed299)

Gbp-Pq: Name 0038-gpg-Make-export-ssh-key-work-for-the-primary-key.patch
g10/export.c
tests/openpgp/samplekeys/README
tests/openpgp/samplekeys/rsa-primary-auth-only.pub.asc [new file with mode: 0644]
tests/openpgp/samplekeys/rsa-primary-auth-only.sec.asc [new file with mode: 0644]