diff options
author | David Shaw <[email protected]> | 2005-05-05 19:21:40 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-05-05 19:21:40 +0000 |
commit | c71639cfffc8796d3109afff1340cd8fac1504f6 (patch) | |
tree | d8bfb2c6bc946b9e3ae62f62506f17efce152680 /g10/keyedit.c | |
parent | * gpg.sgml: Clarify --min-cert-level a bit. (diff) | |
download | gnupg-c71639cfffc8796d3109afff1340cd8fac1504f6.tar.gz gnupg-c71639cfffc8796d3109afff1340cd8fac1504f6.zip |
* 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.
Diffstat (limited to '')
-rw-r--r-- | g10/keyedit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c index 00499b3d3..18908a693 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -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; |