1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-01 02:42:44 +02:00

* sign.c (mk_notation_and_policy): Free unneeded buffer.

* hkp.c (parse_hkp_index): Properly handle the '&' character (i.e.
"&") in HKP responses.

* getkey.c (merge_selfsigs_main): Fix reversed expiration time check with
self-sigs.

* keyedit.c (sign_uids): When making a new self-sig on a v3 key, make a v3
self-sig unless it is currently a v3 self-sig being promoted to v4.
This commit is contained in:
David Shaw 2002-06-01 04:10:16 +00:00
parent 1848ef6950
commit ee39ad5750
5 changed files with 35 additions and 5 deletions

View File

@ -1,3 +1,17 @@
2002-05-31 David Shaw <dshaw@jabberwocky.com>
* sign.c (mk_notation_and_policy): Free unneeded buffer.
* hkp.c (parse_hkp_index): Properly handle the '&' character
(i.e. "&amp;") in HKP responses.
* getkey.c (merge_selfsigs_main): Fix reversed expiration time
check with self-sigs.
* keyedit.c (sign_uids): When making a new self-sig on a v3 key,
make a v3 self-sig unless it is currently a v3 self-sig being
promoted to v4.
2002-05-31 Timo Schulz <ts@winpt.org>
* pkclist.c (do_show_revocation_reason): Don't use capital

View File

@ -1280,7 +1280,7 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked )
p = parse_sig_subpkt( sig->hashed,
SIGSUBPKT_SIG_EXPIRE, NULL );
if ( p && (sig->timestamp + buffer_to_u32(p)) >= curtime )
if ( p && (sig->timestamp + buffer_to_u32(p)) <= curtime )
; /* signature has expired - ignore it */
else {
sigdate = sig->timestamp;
@ -1411,7 +1411,7 @@ merge_selfsigs_main( KBNODE keyblock, int *r_revoked )
p = parse_sig_subpkt (sig->hashed,
SIGSUBPKT_SIG_EXPIRE, NULL );
if ( p && (sig->timestamp + buffer_to_u32(p)) >= curtime )
if ( p && (sig->timestamp + buffer_to_u32(p)) <= curtime )
; /* signature/revocation has expired - ignore it */
else {
sigdate = sig->timestamp;

View File

@ -395,8 +395,7 @@ parse_hkp_index(IOBUF buffer,char *line)
line+=4;
break;
}
if((*(line+1)!='\0' && tolower(*(line+1))=='g') &&
else if((*(line+1)!='\0' && tolower(*(line+1))=='g') &&
(*(line+2)!='\0' && tolower(*(line+2))=='t') &&
(*(line+3)!='\0' && *(line+3)==';'))
{
@ -404,6 +403,15 @@ parse_hkp_index(IOBUF buffer,char *line)
line+=4;
break;
}
else if((*(line+1)!='\0' && tolower(*(line+1))=='a') &&
(*(line+2)!='\0' && tolower(*(line+2))=='m') &&
(*(line+3)!='\0' && tolower(*(line+3))=='p') &&
(*(line+4)!='\0' && *(line+4)==';'))
{
uid[uidindex++]='&';
line+=5;
break;
}
default:
uid[uidindex++]=*line;

View File

@ -334,7 +334,14 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
/* Is this a self-sig? */
if(pk_keyid[0]==sk_keyid[0] && pk_keyid[1]==sk_keyid[1])
selfsig=1;
{
selfsig=1;
/* Do not force a v4 sig here, otherwise it would
be difficult to remake a v3 selfsig. If this
is a v3->v4 promotion case, then we set
force_v4 later anyway. */
force_v4=0;
}
}
else if( node->pkt->pkttype == PKT_USER_ID ) {
uidnode = (node->flag & NODFLG_MARK_A)? node : NULL;

View File

@ -117,6 +117,7 @@ mk_notation_and_policy( PKT_signature *sig,
| ((nd->flags & 1)? SIGSUBPKT_FLAG_CRITICAL:0),
buf, 8+n1+n2 );
m_free(expanded);
m_free(buf);
}
if(opt.show_notation)