1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* build-packet.c (build_sig_subpkt): Comments.

* exec.c (exec_write): Cast NULL to void* to properly terminate varargs
list.

* keyedit.c (show_key_with_all_names): Just for safety, catch an invalid
pk algorithm.

* sign.c (make_keysig_packet): Crucial that the call to mksubpkt comes
LAST before the calls to finalize the sig as that makes it possible for
the mksubpkt function to get a reliable pointer to the subpacket area.

* pkclist.c (do_we_trust_pre): If an untrusted key was chosen by a
particular user ID, use that ID as the one to ask about when prompting
whether to use the key anyway. (build_pk_list): Similar change here when
adding keys to the recipient list.

* trustdb.c (update_validity): Fix bug that prevented more than one
validity record per trust record. (get_validity): When retrieving validity
for a (user) supplied user ID, return the validity for that user ID only,
and do not fall back to the general key validity. (validate_one_keyblock):
Some commentary on whether non-self-signed user IDs belong in the web of
trust (arguably, they do).
This commit is contained in:
David Shaw 2003-04-30 05:33:52 +00:00
parent 82334b3bdc
commit 1fc1d26083
7 changed files with 109 additions and 30 deletions

View file

@ -542,17 +542,23 @@ do_we_trust_pre( PKT_public_key *pk, unsigned int trustlevel )
return 0;
if( !opt.batch && !rc ) {
char *p;
u32 keyid[2];
size_t n;
keyid_from_pk( pk, keyid);
tty_printf( "%4u%c/%08lX %s \"",
nbits_from_pk( pk ), pubkey_letter( pk->pubkey_algo ),
(ulong)keyid[1], datestr_from_pk( pk ) );
p = get_user_id( keyid, &n );
tty_print_utf8_string( p, n ),
m_free(p);
/* If the pk was chosen by a particular user ID, this is the
one to ask about. */
if(pk->user_id)
tty_print_utf8_string(pk->user_id->name,pk->user_id->len);
else
{
size_t n;
char *p = get_user_id( keyid, &n );
tty_print_utf8_string( p, n );
m_free(p);
}
tty_printf("\"\n");
print_fingerprint (pk, NULL, 2);
tty_printf("\n");
@ -932,8 +938,8 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
}
else {
int trustlevel;
trustlevel = get_validity (pk, NULL);
trustlevel = get_validity (pk, pk->user_id);
if( (trustlevel & TRUST_FLAG_DISABLED) ) {
tty_printf(_("Public key is disabled.\n") );
}
@ -946,8 +952,6 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
}
else {
PK_LIST r;
char *p;
size_t n;
u32 keyid[2];
keyid_from_pk( pk, keyid);
@ -956,9 +960,16 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
pubkey_letter( pk->pubkey_algo ),
(ulong)keyid[1],
datestr_from_pk( pk ) );
p = get_user_id( keyid, &n );
tty_print_utf8_string( p, n );
m_free(p);
if(pk->user_id)
tty_print_utf8_string(pk->user_id->name,
pk->user_id->len);
else
{
size_t n;
char *p = get_user_id( keyid, &n );
tty_print_utf8_string( p, n );
m_free(p);
}
tty_printf("\"\n");
r = m_alloc( sizeof *r );
@ -1028,7 +1039,7 @@ build_pk_list( STRLIST rcpts, PK_LIST *ret_pk_list, unsigned use )
else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use )) ) {
int trustlevel;
trustlevel = get_validity (pk, NULL);
trustlevel = get_validity (pk, pk->user_id);
if( (trustlevel & TRUST_FLAG_DISABLED) ) {
free_public_key(pk); pk = NULL;
log_info(_("%s: skipped: public key is disabled\n"),