diff options
author | Justus Winter <justus@g10code.com> | 2016-12-13 16:30:47 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-12-13 16:35:08 +0100 |
commit | dd3dde07a9a46130ac01d849f8edf0566e44f11f (patch) | |
tree | 5a80f57d3c2ba6eb403af9fc492af23c69dd4a89 /g10 | |
parent | gpgscm: Print failed and skipped tests. (diff) | |
download | gnupg2-dd3dde07a9a46130ac01d849f8edf0566e44f11f.tar.xz gnupg2-dd3dde07a9a46130ac01d849f8edf0566e44f11f.zip |
g10: Create expiring keys in quick key generation mode.
* doc/gpg.texi: Document that fact.
* g10/keygen.c (quick_generate_keypair): Use a default value.
* tests/openpgp/quick-key-manipulation.scm: Test that fact.
GnuPG-bug-id: 2701
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'g10')
-rw-r--r-- | g10/keygen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index c93708438..9fa4a0708 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -3957,6 +3957,8 @@ quick_generate_keypair (ctrl_t ctrl, const char *uid, const char *algostr, } } + if (!*expirestr || strcmp (expirestr, "-") == 0) + expirestr = default_expiration_interval; if ((!*algostr || !strcmp (algostr, "default") || !strcmp (algostr, "future-default")) |