From 34d9defc42bacfaf2bb1ce70b2c3f0fdf0a106c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 22 Jun 2021 16:23:26 +0200 Subject: 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. GnuPG-bug-id: 5336, 5505 --- doc/gpgme.texi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/gpgme.texi b/doc/gpgme.texi index b9908170..4a705b1c 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -3179,6 +3179,14 @@ rebuilding the trust-db. This flag passes the option @option{--expert} to gpg key edit. This can be used to get additional callbacks in @code{gpgme_op_edit}. +@item "cert-expire" +@since{1.15.2} +The string given in @var{value} is passed to the GnuPG engine to set +the expiration time to use for key signature expiration. Valid values +are documented in the GnuPG manual and the gpg man page under +the option @option{--default-cert-expire}. + + @end table This function returns @code{0} on success. -- cgit v1.2.3