diff --git a/g10/ChangeLog b/g10/ChangeLog index 338553686..5d39dc16b 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,18 @@ +2002-04-13 David Shaw + + * parse-packet.c (parse_signature): Minor fix - signatures should + expire at their expiration time and not one second later. + + * keygen.c (proc_parameter_file): Allow specifying preferences + string (i.e. "s5 s2 z1 z2", etc) in a batchmode key generation + file. + + * keyedit.c (keyedit_menu): Print standard error message when + signing a revoked key (no new translation). + + * getkey.c (merge_selfsigs): Get the default set of key prefs from + the real (not attribute) primary uid. + 2002-04-12 David Shaw * pkclist.c (build_pk_list): Fix bug that allowed a key to be diff --git a/g10/getkey.c b/g10/getkey.c index e91e0edb8..00b458a18 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1635,7 +1635,7 @@ merge_selfsigs( KBNODE keyblock ) if(k->pkt->pkttype==PKT_PUBLIC_SUBKEY) k->pkt->pkt.public_key->is_valid=0; - /* set the preference list of all keys to those of the primary + /* set the preference list of all keys to those of the primary real * user ID. Note: we use these preferences when we don't know by * which user ID the key has been selected. * fixme: we should keep atoms of commonly used preferences or @@ -1648,6 +1648,7 @@ merge_selfsigs( KBNODE keyblock ) mdc_feature = 0; for (k=keyblock; k && k->pkt->pkttype != PKT_PUBLIC_SUBKEY; k = k->next) { if (k->pkt->pkttype == PKT_USER_ID + && !k->pkt->pkt.user_id->attrib_data && k->pkt->pkt.user_id->is_primary) { prefs = k->pkt->pkt.user_id->prefs; mdc_feature = k->pkt->pkt.user_id->mdc_feature; diff --git a/g10/keyedit.c b/g10/keyedit.c index b6e730f8b..786873d3d 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -1051,7 +1051,7 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands, } else { - tty_printf("\n"); + tty_printf(_(" Unable to sign.\n")); break; } } diff --git a/g10/keygen.c b/g10/keygen.c index 8cc8b91ab..7742fd3ac 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -49,6 +49,7 @@ enum para_name { pNAMEREAL, pNAMEEMAIL, pNAMECOMMENT, + pPREFERENCES, pUSERID, pEXPIREDATE, pKEYEXPIRE, /* in n seconds */ @@ -253,7 +254,7 @@ keygen_set_std_prefs (const char *string) else if (isspace (*s)) s2 = s+1; else { - log_info (_("invalid character in string\n")); + log_info (_("invalid character in preference string\n")); return -1; } } @@ -1458,6 +1459,9 @@ proc_parameter_file( struct para_data_s *para, const char *fname, } } + /* Set preferences, if any. */ + keygen_set_std_prefs(get_parameter_value( para, pPREFERENCES )); + /* make DEK and S2K from the Passphrase */ r = get_parameter( para, pPASSPHRASE ); if( r && *r->u.value ) { @@ -1538,6 +1542,7 @@ read_parameter_file( const char *fname ) { "Name-Comment", pNAMECOMMENT }, { "Expire-Date", pEXPIREDATE }, { "Passphrase", pPASSPHRASE }, + { "Preferences", pPREFERENCES }, { NULL, 0 } }; FILE *fp; diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 86cdccd7a..405edc43e 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1236,7 +1236,7 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen, p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_SIG_EXPIRE,NULL); if(p) sig->expiredate=sig->timestamp+buffer_to_u32(p); - if(sig->expiredate>0 && sig->expiredateexpiredate && sig->expiredate<=make_timestamp()) sig->flags.expired=1; p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_POLICY,NULL);