now signMessage() calls the gpgme_set_include_certs() function before each call of...
authorKarl-Heinz Zimmer <khz@kde.org>
Tue, 26 Feb 2002 01:01:28 +0000 (01:01 +0000)
committerKarl-Heinz Zimmer <khz@kde.org>
Tue, 26 Feb 2002 01:01:28 +0000 (01:01 +0000)
trunk/gpgmeplug/gpgmeplug.c

index d89f00c7602945fcd4a5bef05879ee3634136390..8db8e840cb37a80f6933daeee5c4a3efd62b1779 100644 (file)
@@ -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 );