aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2021-12-22 11:13:23 +0000
committerIngo Klöcker <[email protected]>2021-12-22 14:25:42 +0000
commit305d8668ca724982c50fe4e05315c48a20cc33e5 (patch)
treea5dcd47b072d7934f3aa01631ed64083729e9e2d /doc
parentbuild: Update for newer autoconf. (diff)
downloadgpgme-305d8668ca724982c50fe4e05315c48a20cc33e5.tar.gz
gpgme-305d8668ca724982c50fe4e05315c48a20cc33e5.zip
core: Detect bad passphrase error on certificate import
* src/import.c (gpgme_op_import_result): Check fpr for NULL. (parse_error): New. (import_status_handler): Handle error status line. * doc/gpgme.texi (gpgme_import_status_t): Mention that fpr can be NULL. * tests/gpg/t-import.c (check_result): Check fpr for NULL. * tests/run-threaded.c (delete_impres): Check fpr for NULL. -- When importing an encrypted certificate a wrong passphrase may be entered. In this case gpgsm emits a status line with a bad passphrase error and an "invalid object" error. To make it possible for callers to handle a wrong passphrase error more gracefully, an import status with bad passphrase error is added to the import result for each status line with bad passphrase error. GnuPG-bug-id: 5713
Diffstat (limited to 'doc')
-rw-r--r--doc/gpgme.texi4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index cc8ff5e5..01a55032 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -5115,7 +5115,9 @@ This is a pointer to the next status structure in the linked list, or
@code{NULL} if this is the last element.
@item char *fpr
-This is the fingerprint of the key that was considered.
+This is the fingerprint of the key that was considered, or @code{NULL}
+if the fingerprint of the key is not known, e.g. because the key to
+import was encrypted and decryption failed.
@item gpgme_error_t result
If the import was not successful, this is the error value that caused