}
- /* Ask the pinentry for its version and flavor and streo that as a
+ /* Ask the pinentry for its version and flavor and store that as a
* string in MB. This information is useful for helping users to
* figure out Pinentry problems. */
{
if (assuan_transact (entry_ctx, "GETINFO version",
put_membuf_cb, &mb, NULL, NULL, NULL, NULL))
put_membuf_str (&mb, "unknown");
+ put_membuf_str (&mb, " ");
+ if (assuan_transact (entry_ctx, "GETINFO ttyinfo",
+ put_membuf_cb, &mb, NULL, NULL, NULL, NULL))
+ put_membuf_str (&mb, "? ? ?");
put_membuf (&mb, "", 1);
flavor_version = get_membuf (&mb, NULL);
}
gpg_error_t
gpg_proxy_pinentry_notify (ctrl_t ctrl, const unsigned char *line)
{
- if (opt.verbose)
- {
- char *linecopy = xtrystrdup (line);
- char *fields[4];
-
- if (linecopy
- && split_fields (linecopy, fields, DIM (fields)) >= 4
- && !strcmp (fields[0], "PINENTRY_LAUNCHED"))
- log_info (_("pinentry launched (pid %s, flavor %s, version %s)\n"),
- fields[1], fields[2], fields[3]);
+ const char *s;
- xfree (linecopy);
+ if (opt.verbose
+ && !strncmp (line, "PINENTRY_LAUNCHED", 17)
+ && (line[17]==' '||!line[17]))
+ {
+ for (s = line + 17; *s && spacep (s); s++)
+ ;
+ log_info (_("pinentry launched (%s)\n"), s);
}
if (!ctrl || !ctrl->server_local