From 82b1feb99234b5d17e1464300715af2f282570bd Mon Sep 17 00:00:00 2001 From: Karl-Heinz Zimmer Date: Tue, 26 Feb 2002 01:01:28 +0000 Subject: [PATCH] now signMessage() calls the gpgme_set_include_certs() function before each call of gpgme_op_sign --- gpgmeplug/gpgmeplug.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gpgmeplug/gpgmeplug.c b/gpgmeplug/gpgmeplug.c index d89f00c..8db8e84 100644 --- a/gpgmeplug/gpgmeplug.c +++ b/gpgmeplug/gpgmeplug.c @@ -773,6 +773,28 @@ bool signMessage( const char* cleartext, gpgme_set_armor (ctx, 1); gpgme_set_textmode (ctx, 1); + int sendCerts; + switch ( config.sendCertificates() ) { + case SendCert_undef: + break; + case SendCert_DontSend: + sendCerts = 0; + break; + case SendCert_SendOwn: + sendCerts = 1; + break; + case SendCert_SendChainWithoutRoot: + sendCerts = -2; + break; + case SendCert_SendChainWithRoot: + sendCerts = -1; + break; + default: + sendCerts = 0; + break; + } + gpgme_set_include_certs (ctx, sendCerts); + gpgme_data_new_from_mem (&data, cleartext, 1+strlen( cleartext ), 1 ); gpgme_data_new ( &sig ); -- 2.26.2