aboutsummaryrefslogtreecommitdiffstats
path: root/sm/import.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-10-01 20:33:53 +0000
committerWerner Koch <[email protected]>2010-10-01 20:33:53 +0000
commitbfbd80feb95fba36292cd9dab43016f17b1e6972 (patch)
tree9afbfd29e8aeb78fa34a1a49d8b8071554d4f593 /sm/import.c
parent* options.skel: Make the example for force-v3-sigs match reality (it (diff)
downloadgnupg-bfbd80feb95fba36292cd9dab43016f17b1e6972.tar.gz
gnupg-bfbd80feb95fba36292cd9dab43016f17b1e6972.zip
Exporting secret keys via gpg-agent is now basically supported.
A couple of forward ported changes. Doc updates.
Diffstat (limited to 'sm/import.c')
-rw-r--r--sm/import.c14
1 files changed, 10 insertions, 4 deletions
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);
}
}