gpg: Fix error handling.
authorJustus Winter <justus@g10code.com>
Tue, 20 Jun 2017 08:46:52 +0000 (10:46 +0200)
committerJustus Winter <justus@g10code.com>
Tue, 20 Jun 2017 08:46:52 +0000 (10:46 +0200)
commitbadc1cdae52bd434e5fac2e4275575afeccc2837
tree2b8f9b86b150fcc240c315a1d057ad6d290860db
parent3621dbe52584bc8b417f61b5370ebaa5598db956
gpg: Fix error handling.

* g10/keygen.c (generate_subkeypair): Handle errors from pinentry.
--

Previously, when generating a subkey, gpg would ask for the passphrase
of the primary key.  If that dialog is canceled, gpg would ask a
second time for a passphrase to protect the new subkey.

Fix this by handling the error.

GnuPG-bug-id: 3212
Signed-off-by: Justus Winter <justus@g10code.com>
g10/keygen.c