diff options
author | David Shaw <[email protected]> | 2002-06-01 04:10:16 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-06-01 04:10:16 +0000 |
commit | ee39ad5750de855daf03481e09ac52ff4987eb22 (patch) | |
tree | e8ba075690674939f5c7d8a70d0cc1096ee55f9d | |
parent | * gpg.sgml: Add "edit/addrevoker". Document --desig-revoke. Note that -z (diff) | |
download | gnupg-ee39ad5750de855daf03481e09ac52ff4987eb22.tar.gz gnupg-ee39ad5750de855daf03481e09ac52ff4987eb22.zip |
* 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.
-rw-r--r-- | g10/ChangeLog | 14 | ||||
-rw-r--r-- | g10/getkey.c | 4 | ||||
-rw-r--r-- | g10/hkp.c | 12 | ||||
-rw-r--r-- | g10/keyedit.c | 9 | ||||
-rw-r--r-- | g10/sign.c | 1 |
5 files changed, 35 insertions, 5 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index c5a41176b..7923b8178 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,17 @@ +2002-05-31 David Shaw <[email protected]> + + * 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. + 2002-05-31 Timo Schulz <[email protected]> * pkclist.c (do_show_revocation_reason): Don't use capital diff --git a/g10/getkey.c b/g10/getkey.c index b95f29a0f..01d2726c4 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -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; @@ -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; diff --git a/g10/keyedit.c b/g10/keyedit.c index c0c952144..a8e49a286 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -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; diff --git a/g10/sign.c b/g10/sign.c index 86a020f63..6cf1c8804 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -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) |