Commit 870ccfba authored by Stefan Walter's avatar Stefan Walter

Add rudimentary but working SSH agent proxy support. Bug #341986

    * configure.in:
    * agent/Makefile.am:
    * agent/seahorse-agent-ssh.c:
    * agent/seahorse-agent.c:
    * agent/seahorse-agent.h:
    * daemon/seahorse-daemon.c:
    * libseahorse/seahorse-ssh-key.c:
    * libseahorse/seahorse-ssh-key.h:
    * libseahorse/seahorse-ssh-key-properties.c: Add rudimentary but working
    SSH agent proxy support. Bug #341986
parent 251d9c35
2006-06-08 Nate Nielsen <nielsen@memberwebs.com>
* configure.in:
* agent/Makefile.am:
* agent/seahorse-agent-ssh.c:
* agent/seahorse-agent.c:
* agent/seahorse-agent.h:
* daemon/seahorse-daemon.c:
* libseahorse/seahorse-ssh-key.c:
* libseahorse/seahorse-ssh-key.h:
* libseahorse/seahorse-ssh-key-properties.c: Add rudimentary but working
SSH agent proxy support. Bug #341986
2006-06-07 Adam Schreiber <sadam@clemson.edu>
* pixmpas/22x22/Makefile.am:
* pixmaps/22x22/seahorse-sign-ok.png(added):
* pixmaps/22x22/seahorse-sign-ok.svg(added):
......
......@@ -17,9 +17,15 @@ INCLUDES = -I$(top_builddir) \
noinst_LIBRARIES = libseahorseagent.a
if WITH_SSH
SSH_SOURCES = seahorse-agent-ssh.c
else
SSH_SOURCES =
endif
libseahorseagent_a_SOURCES = seahorse-agent.c seahorse-agent.h seahorse-agent-actions.c \
seahorse-agent-cache.c seahorse-agent-prompt.c seahorse-agent-io.c \
seahorse-agent-status.c
seahorse-agent-status.c $(SSH_SOURCES)
glade_DATA = \
seahorse-agent-cache.glade
......
This diff is collapsed.
......@@ -154,20 +154,20 @@ seahorse_agent_postfork (pid_t child)
process_gpg_conf (socket, child);
}
int
gboolean
seahorse_agent_init ()
{
if(!seahorse_agent_enabled)
return 0;
return TRUE;
if (seahorse_agent_io_init () == -1)
return -1; /* message already printed */
return FALSE; /* message already printed */
/* Initialize our sub systems */
seahorse_agent_actions_init ();
seahorse_agent_cache_init ();
return 0;
return TRUE;
}
void
......
......@@ -51,7 +51,7 @@ void seahorse_agent_prefork ();
void seahorse_agent_postfork (pid_t child);
/* Called in the new child process */
int seahorse_agent_init ();
gboolean seahorse_agent_init ();
void seahorse_agent_uninit ();
/* Global options to set from the command line */
......@@ -75,7 +75,6 @@ void seahorse_agent_io_reply (SeahorseAgentConn *rq, gboolean ok, const gchar *r
* seahorse-agent-actions.c
*/
typedef struct _SeahorseAgentPassReq {
const gchar *id;
const gchar *errmsg;
......@@ -124,4 +123,11 @@ void seahorse_agent_prompt_cleanup ();
void seahorse_agent_status_cleanup ();
void seahorse_agent_status_update ();
#endif /* __SEAHORSE_AGENT_H__ */
/* -----------------------------------------------------------------------------
* seahorse-agent-ssh.c
*/
gboolean seahorse_agent_ssh_init ();
void seahorse_agent_ssh_uninit ();
#endif /* __SEAHORSE_AGENT_H__ */
......@@ -606,13 +606,17 @@ if test "x$enable_ssh" = "xno"; then
else
AC_PATH_PROG(SSH_KEYGEN_PATH, ssh-keygen, "failed")
AC_PATH_PROG(SSH_ADD_PATH, ssh-add, "failed")
AC_PATH_PROG(SSH_PATH, ssh, "failed")
if test $SSH_KEYGEN_PATH != "failed" && test $SSH_PATH != "failed"; then
if test $SSH_KEYGEN_PATH != "failed" &&
test $SSH_PATH != "failed" &&
test $SSH_ADD_PATH != "failed"; then
enable_ssh="yes"
AC_DEFINE(WITH_SSH, 1, [With SSH Support])
AC_DEFINE_UNQUOTED(SSH_KEYGEN_PATH, "$SSH_KEYGEN_PATH", [Path to ssh-keygen])
AC_DEFINE_UNQUOTED(SSH_PATH, "$SSH_PATH", [Path to ssh])
AC_DEFINE_UNQUOTED(SSH_ADD_PATH, "$SSH_ADD_PATH", [Path to ssh-add])
fi
fi
......
......@@ -250,22 +250,35 @@ int main(int argc, char* argv[])
#ifdef WITH_DBUS
seahorse_dbus_server_init ();
#endif
#ifdef WITH_AGENT
seahorse_agent_init ();
#endif
if (!seahorse_agent_init ())
seahorse_agent_uninit ();
#ifdef WITH_SSH
if (!seahorse_agent_ssh_init ())
seahorse_agent_ssh_uninit ();
#endif
#endif
#ifdef WITH_SHARING
seahorse_sharing_init ();
#endif
gtk_main ();
g_printerr ("left gtk_main\n");
/* And now clean them all up */
#ifdef WITH_SHARING
seahorse_sharing_cleanup ();
#endif
#ifdef WITH_AGENT
seahorse_agent_uninit ();
#endif
#ifdef WITH_SSH
seahorse_agent_ssh_uninit ();
#endif
#endif
#ifdef WITH_DBUS
seahorse_dbus_server_cleanup ();
#endif
......
......@@ -77,7 +77,7 @@ parse_ssh_algo (gchar *type)
return SSH_ALGO_RSA1;
if (strstr (type, "rsa"))
return SSH_ALGO_RSA;
if (strstr (type, "dsa"))
if (strstr (type, "dsa") || strstr (type, "dss"))
return SSH_ALGO_DSA;
return SSH_ALGO_UNK;
}
......@@ -307,8 +307,15 @@ seahorse_ssh_key_new (SeahorseKeySource *sksrc, SeahorseSSHKeyData *data)
return skey;
}
const gchar*
guint
seahorse_ssh_key_get_algo (SeahorseSSHKey *skey)
{
g_return_val_if_fail (SEAHORSE_IS_SSH_KEY (skey), SSH_ALGO_UNK);
return skey->keydata->algo;
}
const gchar*
seahorse_ssh_key_get_algo_str (SeahorseSSHKey *skey)
{
g_return_val_if_fail (SEAHORSE_IS_SSH_KEY (skey), "");
......
......@@ -93,7 +93,9 @@ SeahorseSSHKey* seahorse_ssh_key_new (SeahorseKeySource
GType seahorse_ssh_key_get_type (void);
const gchar* seahorse_ssh_key_get_algo (SeahorseSSHKey *skey);
guint seahorse_ssh_key_get_algo (SeahorseSSHKey *skey);
const gchar* seahorse_ssh_key_get_algo_str (SeahorseSSHKey *skey);
guint seahorse_ssh_key_get_strength (SeahorseSSHKey *skey);
......
......@@ -162,7 +162,7 @@ do_details (SeahorseWidget *swidget)
widget = glade_xml_get_widget (swidget->xml, "algo-label");
if (widget) {
label = seahorse_ssh_key_get_algo (skey);
label = seahorse_ssh_key_get_algo_str (skey);
gtk_label_set_text (GTK_LABEL (widget), label);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment