Home GnuPG
Diffusion GPGME 34d9defc42ba

core: Allow specifying an expiration date for key signatures

Description

core: Allow specifying an expiration date for key signatures

* src/context.h (struct gpgme_context): Add 'cert_expire'.
* src/engine-gpg.c (append_args_from_cert_expire): New.
(gpg_edit): Set option according to the new flag.
* src/gpgme.c (gpgme_release): Free 'cert_expire'.
(gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "cert-expire".
* tests/gpg/Makefile.am (c_tests): Add new test.
(gpg.conf): Write "allow-weak-key-signatures" to gpg.conf.
* tests/gpg/t-edit-sign.c: New.

The new context flag "cert-expire" allows setting the expiration date
for key signatures created with gpgme_op_interact.