From bfbd80feb95fba36292cd9dab43016f17b1e6972 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 1 Oct 2010 20:33:53 +0000 Subject: Exporting secret keys via gpg-agent is now basically supported. A couple of forward ported changes. Doc updates. --- sm/import.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sm/import.c') diff --git a/sm/import.c b/sm/import.c index 69a64f1c8..c70e4e916 100644 --- a/sm/import.c +++ b/sm/import.c @@ -194,7 +194,8 @@ check_and_store (ctrl_t ctrl, struct stats_s *stats, if (!rc && ctrl->with_validation) rc = gpgsm_validate_chain (ctrl, cert, "", NULL, 0, NULL, 0, NULL); if (!rc || (!ctrl->with_validation - && gpg_err_code (rc) == GPG_ERR_MISSING_CERT) ) + && (gpg_err_code (rc) == GPG_ERR_MISSING_CERT + || gpg_err_code (rc) == GPG_ERR_MISSING_ISSUER_CERT))) { int existed; @@ -253,9 +254,14 @@ check_and_store (ctrl_t ctrl, struct stats_s *stats, log_error (_("basic certificate checks failed - not imported\n")); if (stats) stats->not_imported++; - print_import_problem (ctrl, cert, - gpg_err_code (rc) == GPG_ERR_MISSING_CERT? 2 : - gpg_err_code (rc) == GPG_ERR_BAD_CERT? 1 : 0); + /* We keep the test for GPG_ERR_MISSING_CERT only in case + GPG_ERR_MISSING_CERT has been used instead of the newer + GPG_ERR_MISSING_ISSUER_CERT. */ + print_import_problem + (ctrl, cert, + gpg_err_code (rc) == GPG_ERR_MISSING_ISSUER_CERT? 2 : + gpg_err_code (rc) == GPG_ERR_MISSING_CERT? 2 : + gpg_err_code (rc) == GPG_ERR_BAD_CERT? 1 : 0); } } -- cgit v1.2.3