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)
committerWerner Koch <wk@gnupg.org>
Tue, 14 Feb 2017 09:55:13 +0000 (10:55 +0100)
commitb456e5be91dc064fc9509ea86edab113721ed299
tree1321c5f9494ae8ffb896388e0ce11ea78341deb0
parentdee026d761ae3d7594c3dbc5b3fa842df53cc189
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>
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]