[evolution] eds-I#39 - Add Web Key Directory (WKD) support for OpenPGP
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] eds-I#39 - Add Web Key Directory (WKD) support for OpenPGP
- Date: Tue, 28 Jun 2022 11:34:34 +0000 (UTC)
commit 8be87f0a743e1d92217258ecebba67c818bd8379
Author: Milan Crha <mcrha redhat com>
Date: Tue Jun 28 13:33:10 2022 +0200
eds-I#39 - Add Web Key Directory (WKD) support for OpenPGP
Add an option in the Securities tab of the mail account Properties.
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/39
src/composer/e-msg-composer.c | 3 +++
src/mail/e-mail-config-security-page.c | 12 ++++++++++++
2 files changed, 15 insertions(+)
---
diff --git a/src/composer/e-msg-composer.c b/src/composer/e-msg-composer.c
index b8ba281d1e..589dc1ffd7 100644
--- a/src/composer/e-msg-composer.c
+++ b/src/composer/e-msg-composer.c
@@ -913,6 +913,7 @@ composer_build_message_pgp (AsyncContext *context,
gboolean always_trust;
gboolean encrypt_to_self;
gboolean prefer_inline;
+ gboolean locate_keys;
/* Return silently if we're not signing or encrypting with PGP. */
if (!context->pgp_sign && !context->pgp_encrypt)
@@ -924,6 +925,7 @@ composer_build_message_pgp (AsyncContext *context,
always_trust = e_source_openpgp_get_always_trust (extension);
encrypt_to_self = context->is_draft || e_source_openpgp_get_encrypt_to_self (extension);
prefer_inline = e_source_openpgp_get_prefer_inline (extension);
+ locate_keys = e_source_openpgp_get_locate_keys (extension);
pgp_key_id = e_source_openpgp_get_key_id (extension);
signing_algorithm = e_source_openpgp_get_signing_algorithm (extension);
@@ -988,6 +990,7 @@ composer_build_message_pgp (AsyncContext *context,
cipher = camel_gpg_context_new (context->session);
camel_gpg_context_set_always_trust (CAMEL_GPG_CONTEXT (cipher), always_trust);
camel_gpg_context_set_prefer_inline (CAMEL_GPG_CONTEXT (cipher), prefer_inline);
+ camel_gpg_context_set_locate_keys (CAMEL_GPG_CONTEXT (cipher), locate_keys);
handler_id = g_signal_connect (context->session, "get-recipient-certificate",
G_CALLBACK (composer_get_recipient_certificate_cb), context);
diff --git a/src/mail/e-mail-config-security-page.c b/src/mail/e-mail-config-security-page.c
index 0db9cccc4b..9bef665c70 100644
--- a/src/mail/e-mail-config-security-page.c
+++ b/src/mail/e-mail-config-security-page.c
@@ -625,6 +625,18 @@ mail_config_security_page_constructed (GObject *object)
G_BINDING_SYNC_CREATE |
G_BINDING_BIDIRECTIONAL);
+ text = _("_Lookup keys for encryption in Web Key Directory (WKD)");
+ widget = gtk_check_button_new_with_mnemonic (text);
+ gtk_widget_set_margin_left (widget, 12);
+ gtk_grid_attach (GTK_GRID (container), widget, 0, 8, 2, 1);
+ gtk_widget_show (widget);
+
+ e_binding_bind_property (
+ openpgp_ext, "locate-keys",
+ widget, "active",
+ G_BINDING_SYNC_CREATE |
+ G_BINDING_BIDIRECTIONAL);
+
#if defined (ENABLE_SMIME)
/*** Security MIME (S/MIME) ***/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]