mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
*** empty log message ***
This commit is contained in:
parent
41fa8a3345
commit
9a854f1010
13 changed files with 200 additions and 31 deletions
|
@ -247,6 +247,7 @@ import_one( const char *fname, KBNODE keyblock )
|
|||
u32 keyid[2];
|
||||
int rc = 0;
|
||||
int new_key = 0;
|
||||
int mod_key = 0;
|
||||
|
||||
/* get the key and print some info about it */
|
||||
node = find_kbnode( keyblock, PKT_PUBLIC_KEY );
|
||||
|
@ -284,6 +285,7 @@ import_one( const char *fname, KBNODE keyblock )
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* do we have this key already in one of our pubrings ? */
|
||||
pk_orig = m_alloc_clear( sizeof *pk_orig );
|
||||
rc = get_pubkey( pk_orig, keyid );
|
||||
|
@ -350,6 +352,7 @@ import_one( const char *fname, KBNODE keyblock )
|
|||
if( rc )
|
||||
goto leave;
|
||||
if( n_uids || n_sigs || n_subk ) {
|
||||
mod_key = 1;
|
||||
/* keyblock_orig has been updated; write */
|
||||
if( opt.verbose > 1 )
|
||||
log_info_f(keyblock_resource_name(&kbpos),
|
||||
|
@ -394,6 +397,8 @@ import_one( const char *fname, KBNODE keyblock )
|
|||
log_error("key %08lX: trustdb insert failed: %s\n",
|
||||
(ulong)keyid[1], g10_errstr(rc) );
|
||||
}
|
||||
else if( mod_key )
|
||||
rc = update_trustdb( new_key? pk: pk_orig);
|
||||
else
|
||||
rc = clear_trust_checked_flag( new_key? pk : pk_orig );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue