* 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
* tests/run-verify.c (main): Remove C99-only syntax.
* tests/run-threaded.c (start_keylistings): Ditto.
--
Older gcc's do not grok this and there is no real need for it.
run-verify.c:324: error: ‘for’ loop initial declarations are only
allowed in C99 mode
run-verify.c:324: note: use option -std=c99 or -std=gnu99 to compile
your code
Reported-by: Lars Hecking
* tests/run-threaded.c (random_data_close): Correct FD test.
--
An invalid DS is -1 and not 0; this fix is for correctness and does
not chnage anything in the real world.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tests/run-threaded.c (main): Handle allow-del.
(allow-del): New. Variable to allow deletion of keys.
(import): Delete key after import if allow-del is set.
(delete_impres): Delete keys from an import result.
(delete_fpr): Delete a key by fingerprint.
--
This is intended to test write access and locking of the
keyring by repeatedly importing and deleting pubkeys.
It is an option because it might cause keyring corruption
etc. so it should be explicitly enabled.
* tests/Makefile.am (run-threaded): Add.
* tests/run-threaded.c: New.
--
This test is intended to help detect race conditions
or other multithread problems. It can also be used
to put the whole GnuPG system under extreme load.