mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* import.c (gpgsm_import): Add error messages.
This commit is contained in:
parent
b209c17be9
commit
8bb265d502
@ -1,3 +1,7 @@
|
|||||||
|
2002-05-23 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* import.c (gpgsm_import): Add error messages.
|
||||||
|
|
||||||
2002-05-21 Werner Koch <wk@gnupg.org>
|
2002-05-21 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* keylist.c (list_internal_keys): Renamed from gpgsm_list_keys.
|
* keylist.c (list_internal_keys): Renamed from gpgsm_list_keys.
|
||||||
|
16
sm/import.c
16
sm/import.c
@ -109,11 +109,16 @@ gpgsm_import (CTRL ctrl, int in_fd)
|
|||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
log_info ("certificate imported\n");
|
log_info ("certificate imported\n");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
log_error (_("error storing certificate\n"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
log_error (_("basic certificate checks failed - not imported\n"));
|
||||||
ksba_cert_release (cert);
|
ksba_cert_release (cert);
|
||||||
cert = NULL;
|
cert = NULL;
|
||||||
}
|
}
|
||||||
|
if (!i)
|
||||||
|
log_error ("no certificate found\n");
|
||||||
}
|
}
|
||||||
else if (ct == KSBA_CT_NONE)
|
else if (ct == KSBA_CT_NONE)
|
||||||
{ /* Failed to identify this message - assume a certificate */
|
{ /* Failed to identify this message - assume a certificate */
|
||||||
@ -139,7 +144,11 @@ gpgsm_import (CTRL ctrl, int in_fd)
|
|||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
log_info ("certificate imported\n");
|
log_info ("certificate imported\n");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
log_error (_("error storing certificate\n"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
log_error (_("basic certificate checks failed - not imported\n"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -154,6 +163,11 @@ gpgsm_import (CTRL ctrl, int in_fd)
|
|||||||
gpgsm_destroy_reader (b64reader);
|
gpgsm_destroy_reader (b64reader);
|
||||||
if (fp)
|
if (fp)
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
|
/* If we never printed an error message do it now so that a command
|
||||||
|
line invocation will return with an error (log_error keeps a
|
||||||
|
global errorcount) */
|
||||||
|
if (rc && !log_get_errorcount (0))
|
||||||
|
log_error (_("error importing certificate: %s\n"), gnupg_strerror (rc));
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user