mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* options.h, g10.c (main): Add new --default-sig-expire and
--default-cert-expire options. Suggested by Florian Weimer. * main.h, keygen.c (parse_expire_string, ask_expire_interval): Use defaults passed in, or "0" to control what default expiration is. * keyedit.c (sign_uids), sign.c (sign_file, clearsign_file, sign_symencrypt_file): Call them here, so that default expiration is used when --ask-xxxxx-expire is off.
This commit is contained in:
parent
cf7c0feca4
commit
c71639cfff
7 changed files with 128 additions and 47 deletions
|
@ -860,8 +860,13 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
|
|||
|
||||
/* Only ask for duration if we haven't already set it to match
|
||||
the expiration of the pk */
|
||||
if(opt.ask_cert_expire && !duration && !selfsig)
|
||||
duration=ask_expire_interval(1);
|
||||
if(!duration && !selfsig)
|
||||
{
|
||||
if(opt.ask_cert_expire)
|
||||
duration=ask_expire_interval(1,opt.def_cert_expire);
|
||||
else
|
||||
duration=parse_expire_string(opt.def_cert_expire)*86400L;
|
||||
}
|
||||
|
||||
if(duration)
|
||||
force_v4=1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue