[gnome-keyring] daemon: Remove the GnuPG agent



commit a8862f74aaed5ac7ea7b3d72984ddd9c40febd34
Author: Stef Walter <stefw gnome org>
Date:   Sun Jun 7 09:47:38 2015 +0200

    daemon: Remove the GnuPG agent
    
    The GnuPG agent is incomplete and incompatible with many uses of
    GnuPG 2.x.
    
    There is a new pinentry that replaces this. It prompts via system
    modal dialogs, and allows optional caching of passphrases.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750514

 HACKING                                     |    3 -
 Makefile.am                                 |    2 -
 configure.ac                                |   18 -
 daemon/.gitignore                           |    2 -
 daemon/Makefile.am                          |    3 +-
 daemon/gkd-glue.c                           |   41 --
 daemon/gkd-glue.h                           |    2 -
 daemon/gkd-main.c                           |   18 +-
 daemon/gkd-pkcs11.c                         |    5 +-
 daemon/gnome-keyring-gpg.desktop.in.in      |   13 -
 daemon/gpg-agent/.gitignore                 |    1 -
 daemon/gpg-agent/Makefile.am                |   15 -
 daemon/gpg-agent/gkd-gpg-agent-ops.c        |  665 ---------------------------
 daemon/gpg-agent/gkd-gpg-agent-private.h    |  118 -----
 daemon/gpg-agent/gkd-gpg-agent-standalone.c |  123 -----
 daemon/gpg-agent/gkd-gpg-agent.c            |  506 --------------------
 daemon/gpg-agent/gkd-gpg-agent.h            |   39 --
 daemon/login/gkd-login.c                    |    8 +-
 docs/gnome-keyring-daemon.xml               |    4 +-
 po/POTFILES.in                              |    2 -
 po/POTFILES.skip                            |    3 +-
 schema/org.gnome.crypto.cache.gschema.xml   |    5 -
 22 files changed, 10 insertions(+), 1586 deletions(-)
---
diff --git a/HACKING b/HACKING
index fa14a17..a661de3 100644
--- a/HACKING
+++ b/HACKING
@@ -40,9 +40,6 @@ daemon/control
 daemon/dbus
    Various DBus bits of the daemon including the Secret Service API.
 
-daemon/gpg-agent
-   A GPG agent implementation that uses a PKCS#11 module for it's password storage.
-
 daemon/login
    Used to lock and unlock the daemon.
 
diff --git a/Makefile.am b/Makefile.am
index 6b00617..9906920 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --enable-doc \
        --enable-pam \
        --enable-ssh-agent \
-       --enable-gpg-agent \
        --disable-strict \
        --disable-coverage \
        --disable-silent-rules \
@@ -198,7 +197,6 @@ include egg/Makefile.am
 include daemon/Makefile.am
 include daemon/control/Makefile.am
 include daemon/dbus/Makefile.am
-include daemon/gpg-agent/Makefile.am
 include daemon/login/Makefile.am
 include daemon/ssh-agent/Makefile.am
 include pkcs11/Makefile.am
diff --git a/configure.ac b/configure.ac
index 65d47c1..3f0f666 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,23 +350,6 @@ fi
 AM_CONDITIONAL(WITH_SSH, test "$enable_ssh_agent" != "no")
 
 # --------------------------------------------------------------------
-# GPG Agent support
-#
-
-AC_ARG_ENABLE([gpg-agent],
-               AC_HELP_STRING([--disable-gpg-agent],
-               [Don't include GPG agent in gnome-keyring]))
-
-if test "$enable_gpg_agent" != "no"; then
-       AC_DEFINE(WITH_GPG, 1, [Whether to build GPG agent or not])
-       gpg_status="yes"
-else
-       gpg_status="no"
-fi
-
-AM_CONDITIONAL(WITH_GPG, test "$enable_gpg_agent" != "no")
-
-# --------------------------------------------------------------------
 # libgcrypt
 #
 
@@ -664,7 +647,6 @@ echo "  SELinux:              $selinux_status"
 echo
 echo "CONFIGURATION"
 echo "  SSH Agent:            $ssh_status"
-echo "  GPG Agent:            $gpg_status"
 echo
 echo "BUILD"
 echo "  Debug Build:          $debug_status"
diff --git a/daemon/.gitignore b/daemon/.gitignore
index 031e7ee..a6d7515 100644
--- a/daemon/.gitignore
+++ b/daemon/.gitignore
@@ -1,8 +1,6 @@
 /gnome-keyring-daemon
 /org.gnome.keyring.service
 /org.freedesktop.secrets.service
-/gnome-keyring-gpg.desktop
-/gnome-keyring-gpg.desktop.in
 /gnome-keyring-pkcs11.desktop
 /gnome-keyring-pkcs11.desktop.in
 /gnome-keyring-secrets.desktop
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index e9c4a18..79bd85a 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -19,7 +19,6 @@ gnome_keyring_daemon_LDADD = \
        libgkd-login.la \
        libgkd-control.la \
        libgkd-ssh-agent.la \
-       libgkd-gpg-agent.la \
        libgkm-wrap-layer.la \
        libgkm-rpc-layer.la \
        libgkm-secret-store.la \
@@ -41,7 +40,7 @@ desktop_in_in_files = \
        daemon/gnome-keyring-pkcs11.desktop.in.in \
        daemon/gnome-keyring-secrets.desktop.in.in \
        daemon/gnome-keyring-ssh.desktop.in.in \
-       daemon/gnome-keyring-gpg.desktop.in.in
+       $(NULL)
 desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
diff --git a/daemon/gkd-glue.c b/daemon/gkd-glue.c
index 6974432..329a37e 100644
--- a/daemon/gkd-glue.c
+++ b/daemon/gkd-glue.c
@@ -23,7 +23,6 @@
 #include "gkd-glue.h"
 #include "gkd-util.h"
 
-#include "gpg-agent/gkd-gpg-agent.h"
 #include "ssh-agent/gkd-ssh-agent.h"
 
 #include "egg/egg-cleanup.h"
@@ -67,43 +66,3 @@ gkd_daemon_startup_ssh (void)
 
        return TRUE;
 }
-
-static void
-pkcs11_gpg_cleanup (gpointer unused)
-{
-       gkd_gpg_agent_shutdown ();
-}
-
-static gboolean
-accept_gpg_client (GIOChannel *channel, GIOCondition cond, gpointer unused)
-{
-       if (cond == G_IO_IN)
-               gkd_gpg_agent_accept ();
-       return TRUE;
-}
-
-gboolean
-gkd_daemon_startup_gpg (void)
-{
-       GIOChannel *channel;
-       const gchar *base_dir;
-       int sock;
-
-       base_dir = gkd_util_get_master_directory ();
-       g_return_val_if_fail (base_dir, FALSE);
-
-       sock = gkd_gpg_agent_startup (base_dir);
-       if (sock == -1)
-               return FALSE;
-
-       channel = g_io_channel_unix_new (sock);
-       g_io_add_watch (channel, G_IO_IN | G_IO_HUP, accept_gpg_client, NULL);
-       g_io_channel_unref (channel);
-
-       /* gpg-agent sets the environment variable */
-       gkd_util_push_environment ("GPG_AGENT_INFO", g_getenv ("GPG_AGENT_INFO"));
-
-       egg_cleanup_register (pkcs11_gpg_cleanup, NULL);
-
-       return TRUE;
-}
diff --git a/daemon/gkd-glue.h b/daemon/gkd-glue.h
index db0b26b..5cca8e4 100644
--- a/daemon/gkd-glue.h
+++ b/daemon/gkd-glue.h
@@ -26,6 +26,4 @@
 
 gboolean       gkd_daemon_startup_ssh      (void);
 
-gboolean       gkd_daemon_startup_gpg      (void);
-
 #endif /* GKD_GLUE_H_ */
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index 2bcfc04..f567633 100644
--- a/daemon/gkd-main.c
+++ b/daemon/gkd-main.c
@@ -78,7 +78,6 @@ typedef int socklen_t;
 #define GKD_COMP_PKCS11     "pkcs11"
 #define GKD_COMP_SECRETS    "secrets"
 #define GKD_COMP_SSH        "ssh"
-#define GKD_COMP_GPG        "gpg"
 
 EGG_SECURE_DECLARE (daemon_main);
 
@@ -112,7 +111,6 @@ static gchar* run_components = DEFAULT_COMPONENTS;
 static gboolean pkcs11_started = FALSE;
 static gboolean secrets_started = FALSE;
 static gboolean ssh_started = FALSE;
-static gboolean gpg_started = FALSE;
 static gboolean dbus_started = FALSE;
 
 static gboolean run_foreground = FALSE;
@@ -533,7 +531,7 @@ replace_daemon_at (const gchar *directory)
 
        /*
         * The first control_directory is the environment one, always
-        * prefer that since it's the one that ssh and gpg will connect to
+        * prefer that since it's the one that ssh will connect to
         */
        if (control_directory == NULL)
                control_directory = g_strdup (directory);
@@ -709,20 +707,6 @@ gkr_daemon_startup_steps (const gchar *components)
        }
 #endif
 
-#ifdef WITH_GPG
-       if (strstr (components, GKD_COMP_GPG)) {
-               if (gpg_started) {
-                       g_message ("The GPG agent was already initialized");
-               } else {
-                       gpg_started = TRUE;
-                       if (!gkd_daemon_startup_gpg ()) {
-                               gpg_started = FALSE;
-                               return FALSE;
-                       }
-               }
-       }
-#endif
-
        return TRUE;
 }
 
diff --git a/daemon/gkd-pkcs11.c b/daemon/gkd-pkcs11.c
index b2e94c3..71fdfe2 100644
--- a/daemon/gkd-pkcs11.c
+++ b/daemon/gkd-pkcs11.c
@@ -32,7 +32,6 @@
 #include "pkcs11/gnome2-store/gkm-gnome2-store.h"
 #include "pkcs11/xdg-store/gkm-xdg-store.h"
 
-#include "gpg-agent/gkd-gpg-agent.h"
 #include "ssh-agent/gkd-ssh-agent.h"
 
 #include <string.h>
@@ -52,7 +51,6 @@ pkcs11_daemon_cleanup (gpointer unused)
 
        gkd_ssh_agent_uninitialize ();
        gkm_rpc_layer_uninitialize ();
-       gkd_gpg_agent_uninitialize ();
        rv = (pkcs11_roof->C_Finalize) (NULL);
 
        if (rv != CKR_OK)
@@ -115,8 +113,7 @@ gkd_pkcs11_initialize (void)
 
        egg_cleanup_register (pkcs11_daemon_cleanup, NULL);
 
-       ret = gkd_gpg_agent_initialize (pkcs11_roof) &&
-             gkd_ssh_agent_initialize (pkcs11_roof) &&
+       ret = gkd_ssh_agent_initialize (pkcs11_roof) &&
              gkm_rpc_layer_initialize (pkcs11_roof);
 
        return ret;
diff --git a/daemon/login/gkd-login.c b/daemon/login/gkd-login.c
index a3d6dcf..549fbe3 100644
--- a/daemon/login/gkd-login.c
+++ b/daemon/login/gkd-login.c
@@ -482,7 +482,7 @@ find_saved_items (GckSession *session,
 
        search = gck_session_create_object (session, gck_builder_end (&builder), NULL, &error);
        if (search == NULL) {
-               g_warning ("couldn't perform search for gpg agent stored passphrases: %s",
+               g_warning ("couldn't perform search for stored passphrases: %s",
                           egg_error_message (error));
                g_clear_error (&error);
                return NULL;
@@ -493,7 +493,7 @@ find_saved_items (GckSession *session,
        g_object_unref (search);
 
        if (data == NULL) {
-               g_warning ("couldn't retrieve list of gpg agent stored passphrases: %s",
+               g_warning ("couldn't retrieve list of stored passphrases: %s",
                           egg_error_message (error));
                g_clear_error (&error);
                return NULL;
@@ -574,7 +574,7 @@ gkd_login_lookup_password (GckSession *session,
                data = gck_object_get_data_full (l->data, CKA_VALUE, egg_secure_realloc, NULL, &length, 
&error);
                if (error) {
                        if (!g_error_matches (error, GCK_ERROR, CKR_USER_NOT_LOGGED_IN))
-                               g_warning ("couldn't lookup gpg agent password: %s", egg_error_message 
(error));
+                               g_warning ("couldn't lookup password: %s", egg_error_message (error));
                        g_clear_error (&error);
                        data = NULL;
                } else {
@@ -704,7 +704,7 @@ gkd_login_store_password (GckSession *session,
 
        item = gck_session_create_object (session, gck_builder_end (&builder), NULL, &error);
        if (item == NULL) {
-               g_warning ("couldn't store gpg agent password: %s", egg_error_message (error));
+               g_warning ("couldn't store password: %s", egg_error_message (error));
                g_clear_error (&error);
                ret = FALSE;
        } else {
diff --git a/docs/gnome-keyring-daemon.xml b/docs/gnome-keyring-daemon.xml
index 9353391..b878159 100644
--- a/docs/gnome-keyring-daemon.xml
+++ b/docs/gnome-keyring-daemon.xml
@@ -59,10 +59,10 @@
 
        <variablelist>
                <varlistentry>
-                       <term><option>-c</option>, 
<option>--components=<parameter>ssh,secrets,gpg,pkcs11</parameter></option></term>
+                       <term><option>-c</option>, 
<option>--components=<parameter>ssh,secrets,pkcs11</parameter></option></term>
                        <listitem>
                        <para>Ask the daemon to only initialize certain components. Valid
-                               components are <literal>ssh</literal>, <literal>gpg</literal>,
+                               components are <literal>ssh</literal>,
                                <literal>secrets</literal>, <literal>pkcs11</literal>.</para>
                        <para>By default all components are initialized.</para>
                        </listitem>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1f92a0d..6d1a337 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,11 +3,9 @@
 daemon/dbus/gkd-secret-change.c
 daemon/dbus/gkd-secret-create.c
 daemon/dbus/gkd-secret-unlock.c
-daemon/gnome-keyring-gpg.desktop.in.in
 daemon/gnome-keyring-pkcs11.desktop.in.in
 daemon/gnome-keyring-secrets.desktop.in.in
 daemon/gnome-keyring-ssh.desktop.in.in
-daemon/gpg-agent/gkd-gpg-agent-ops.c
 daemon/login/gkd-login.c
 daemon/org.gnome.keyring.service.in
 egg/dotlock.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 9de11d3..e652b97 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,10 +1,9 @@
 daemon/gnome-keyring-secrets.desktop.in
 daemon/gnome-keyring-ssh.desktop.in
-daemon/gnome-keyring-gpg.desktop.in
 daemon/gnome-keyring-pkcs11.desktop.in
 daemon/org.freedesktop.secrets.service.in
 daemon/org.gnome.keyring.service.in
 
 # POTFILES.skip insists on finding files $builddir :S
 x86_64/
-_build/
\ No newline at end of file
+_build/
diff --git a/schema/org.gnome.crypto.cache.gschema.xml b/schema/org.gnome.crypto.cache.gschema.xml
index 4547399..377a6a9 100644
--- a/schema/org.gnome.crypto.cache.gschema.xml
+++ b/schema/org.gnome.crypto.cache.gschema.xml
@@ -13,10 +13,5 @@
                        <summary>Cache Time To Live</summary>
                        <description>The amount of time in seconds to cache passphrases when the 'idle' or 
'timeout' gpg-cache-method are in use.</description>
                </key>
-               <key name="gpg-cache-authorize" type="b">
-                       <default>false</default>
-                       <summary>Authorize Cache Access</summary>
-                       <description>Not yet implemented.</description>
-               </key>
        </schema>
 </schemalist>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]