mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
See ChangeLog: Thu Jul 27 17:33:04 CEST 2000 Werner Koch
This commit is contained in:
parent
a2ad808d1f
commit
7f55ee83bb
7 changed files with 41 additions and 4 deletions
20
g10/import.c
20
g10/import.c
|
@ -50,6 +50,7 @@ static struct {
|
|||
ulong secret_read;
|
||||
ulong secret_imported;
|
||||
ulong secret_dups;
|
||||
ulong skipped_new_keys;
|
||||
} stats;
|
||||
|
||||
|
||||
|
@ -201,6 +202,9 @@ print_stats()
|
|||
{
|
||||
if( !opt.quiet ) {
|
||||
log_info(_("Total number processed: %lu\n"), stats.count );
|
||||
if( stats.skipped_new_keys )
|
||||
log_info(_(" skipped new keys: %lu\n"),
|
||||
stats.skipped_new_keys );
|
||||
if( stats.no_user_id )
|
||||
log_info(_(" w/o user IDs: %lu\n"), stats.no_user_id );
|
||||
if( stats.imported || stats.imported_rsa ) {
|
||||
|
@ -228,8 +232,8 @@ print_stats()
|
|||
}
|
||||
|
||||
if( is_status_enabled() ) {
|
||||
char buf[12*20];
|
||||
sprintf(buf, "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
|
||||
char buf[13*20];
|
||||
sprintf(buf, "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
|
||||
stats.count,
|
||||
stats.no_user_id,
|
||||
stats.imported,
|
||||
|
@ -241,7 +245,8 @@ print_stats()
|
|||
stats.n_revoc,
|
||||
stats.secret_read,
|
||||
stats.secret_imported,
|
||||
stats.secret_dups);
|
||||
stats.secret_dups,
|
||||
stats.skipped_new_keys );
|
||||
write_status_text( STATUS_IMPORT_RES, buf );
|
||||
}
|
||||
}
|
||||
|
@ -413,6 +418,13 @@ import_one( const char *fname, KBNODE keyblock, int fast )
|
|||
log_error( _("key %08lX: public key not found: %s\n"),
|
||||
(ulong)keyid[1], g10_errstr(rc));
|
||||
}
|
||||
else if ( rc && opt.merge_only ) {
|
||||
if( opt.verbose )
|
||||
log_info( _("key %08lX: new key - skipped\n"), (ulong)keyid[1] );
|
||||
rc = 0;
|
||||
fast = 1; /* so that we don't get into the trustdb update */
|
||||
stats.skipped_new_keys++;
|
||||
}
|
||||
else if( rc ) { /* insert this key */
|
||||
/* get default resource */
|
||||
if( get_keyblock_handle( NULL, 0, &kbpos ) ) {
|
||||
|
@ -583,7 +595,7 @@ import_secret_one( const char *fname, KBNODE keyblock )
|
|||
|
||||
/* do we have this key already in one of our secrings ? */
|
||||
rc = seckey_available( keyid );
|
||||
if( rc == G10ERR_NO_SECKEY ) { /* simply insert this key */
|
||||
if( rc == G10ERR_NO_SECKEY && !opt.merge_only ) { /* simply insert this key */
|
||||
/* get default resource */
|
||||
if( get_keyblock_handle( NULL, 1, &kbpos ) ) {
|
||||
log_error("no default secret keyring\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue