Lines 67-73
seahorse_agent_actions_uninit ()
Link Here
|
67 |
|
67 |
|
68 |
/* Called for the assuan GET_PASSPHRASE command */ |
68 |
/* Called for the assuan GET_PASSPHRASE command */ |
69 |
void |
69 |
void |
70 |
seahorse_agent_actions_getpass (SeahorseAgentConn * rq, gchar * id, |
70 |
seahorse_agent_actions_getpass (SeahorseAgentConn * rq, gboolean pass_as_data, gchar * id, |
71 |
gchar * errmsg, gchar * prompt, gchar * desc) |
71 |
gchar * errmsg, gchar * prompt, gchar * desc) |
72 |
{ |
72 |
{ |
73 |
SeahorseAgentPassReq *pr; |
73 |
SeahorseAgentPassReq *pr; |
Lines 80-87
seahorse_agent_actions_getpass (Seahorse
Link Here
|
80 |
* We don't need authorization, so if we have the password |
80 |
* We don't need authorization, so if we have the password |
81 |
* just reply now, without going to the queue. |
81 |
* just reply now, without going to the queue. |
82 |
*/ |
82 |
*/ |
83 |
if ((pass = seahorse_agent_cache_get (id)) != NULL) { |
83 |
if ((pass = seahorse_agent_cache_get (pass_as_data, id)) != NULL) { |
84 |
seahorse_agent_io_reply (rq, TRUE, pass); |
84 |
if (pass_as_data) { |
|
|
85 |
seahorse_agent_io_data (rq, pass); |
86 |
seahorse_agent_io_reply (rq, TRUE, NULL); |
87 |
} |
88 |
else { |
89 |
seahorse_agent_io_reply (rq, TRUE, pass); |
90 |
} |
85 |
return; |
91 |
return; |
86 |
} |
92 |
} |
87 |
} |
93 |
} |
Lines 89-94
seahorse_agent_actions_getpass (Seahorse
Link Here
|
89 |
/* A new queue item */ |
95 |
/* A new queue item */ |
90 |
pr = g_chunk_new (SeahorseAgentPassReq, g_memory); |
96 |
pr = g_chunk_new (SeahorseAgentPassReq, g_memory); |
91 |
memset (pr, 0, sizeof (*pr)); |
97 |
memset (pr, 0, sizeof (*pr)); |
|
|
98 |
pr->pass_as_data = pass_as_data; |
92 |
pr->id = id ? g_strdup (id) : NULL; |
99 |
pr->id = id ? g_strdup (id) : NULL; |
93 |
pr->errmsg = errmsg ? g_strdup (errmsg) : NULL; |
100 |
pr->errmsg = errmsg ? g_strdup (errmsg) : NULL; |
94 |
pr->prompt = g_strdup (prompt ? prompt : _("Passphrase:")); |
101 |
pr->prompt = g_strdup (prompt ? prompt : _("Passphrase:")); |
Lines 133-139
seahorse_agent_actions_doneauth (Seahors
Link Here
|
133 |
* exists also locks it into the cache. |
140 |
* exists also locks it into the cache. |
134 |
*/ |
141 |
*/ |
135 |
g_assert (pr->id); |
142 |
g_assert (pr->id); |
136 |
pass = seahorse_agent_cache_get (pr->id); |
143 |
pass = seahorse_agent_cache_get (pr->pass_as_data, pr->id); |
137 |
g_assert (pass != NULL); |
144 |
g_assert (pass != NULL); |
138 |
} |
145 |
} |
139 |
|
146 |
|
Lines 146-153
seahorse_agent_actions_donepass (Seahors
Link Here
|
146 |
{ |
153 |
{ |
147 |
if (pass == NULL) |
154 |
if (pass == NULL) |
148 |
seahorse_agent_io_reply (pr->request, FALSE, "111 cancelled"); |
155 |
seahorse_agent_io_reply (pr->request, FALSE, "111 cancelled"); |
149 |
else |
156 |
else { |
150 |
seahorse_agent_io_reply (pr->request, TRUE, pass); |
157 |
if (pr->pass_as_data) { |
|
|
158 |
seahorse_agent_io_data (pr->request, pass); |
159 |
seahorse_agent_io_reply (pr->request, TRUE, NULL); |
160 |
} |
161 |
else { |
162 |
seahorse_agent_io_reply (pr->request, TRUE, pass); |
163 |
} |
164 |
} |
151 |
|
165 |
|
152 |
free_passreq (pr); |
166 |
free_passreq (pr); |
153 |
seahorse_agent_actions_nextgui (); |
167 |
seahorse_agent_actions_nextgui (); |