A whole bunch of changes to allow building for W32.
[gnupg.git] / sm / server.c
index 2938571..e39c78a 100644 (file)
@@ -353,7 +353,7 @@ cmd_encrypt (ASSUAN_CONTEXT ctx, char *line)
   rc = 0;
   if (!opt.no_encrypt_to)
     {
-      for (cl=ctrl->server_local->recplist; !rc && cl; cl = cl->next)
+      for (cl=ctrl->server_local->default_recplist; !rc && cl; cl = cl->next)
         if (cl->is_encrypt_to)
           rc = gpgsm_add_cert_to_certlist (ctrl, cl->cert,
                                            &ctrl->server_local->recplist, 1);
@@ -811,16 +811,23 @@ gpgsm_server (certlist_t default_recplist)
                  assuan_strerror(rc));
       gpgsm_exit (2);
     }
-  if (opt.verbose)
+  if (opt.verbose || opt.debug)
     {
       char *tmp = NULL;
+      const char *s1 = getenv ("GPG_AGENT_INFO");
+      const char *s2 = getenv ("DIRMNGR_INFO");
+
       if (asprintf (&tmp,
-                     "Home: %s\n"
-                     "Config: %s\n"
-                     "%s",
-                     opt.homedir,
-                     opt.config_filename,
-                     hello) > 0)
+                    "Home: %s\n"
+                    "Config: %s\n"
+                    "AgentInfo: %s\n"
+                    "DirmngrInfo: %s\n"
+                    "%s",
+                    opt.homedir,
+                    opt.config_filename,
+                    s1?s1:"[not set]",
+                    s2?s2:"[not set]",
+                    hello) > 0)
         {
           assuan_set_hello_line (ctx, tmp);
           free (tmp);