1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Poems for AllowSetForegroundWindow (W32)

This commit is contained in:
Werner Koch 2008-02-14 19:50:10 +00:00
parent 0819c1e8ca
commit 30a97e770c
39 changed files with 8817 additions and 8079 deletions

View file

@ -49,6 +49,8 @@ struct server_local_s {
certlist_t recplist;
certlist_t signerlist;
certlist_t default_recplist; /* As set by main() - don't release. */
int allow_pinentry_notify; /* Set if pinentry notifications should
be passed back to the client. */
};
@ -292,6 +294,8 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
int i = *value? atoi (value) : 0;
ctrl->server_local->enable_audit_log = i;
}
else if (!strcmp (key, "allow-pinentry-notify"))
ctrl->server_local->allow_pinentry_notify = 1;
else
return gpg_error (GPG_ERR_UNKNOWN_OPTION);
@ -299,8 +303,6 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
}
static void
reset_notify (assuan_context_t ctx)
{
@ -1284,3 +1286,18 @@ gpgsm_status_with_err_code (ctrl_t ctrl, int no, const char *text,
return gpgsm_status2 (ctrl, no, buf, NULL);
}
/* Helper to notify the client about Pinentry events. Because that
might disturb some older clients, this is only done when enabled
via an option. Returns an gpg error code. */
gpg_error_t
gpgsm_proxy_pinentry_notify (ctrl_t ctrl, const unsigned char *line)
{
if (!ctrl || !ctrl->server_local
|| !ctrl->server_local->allow_pinentry_notify)
return 0;
return assuan_inquire (ctrl->server_local->assuan_ctx, line, NULL, NULL, 0);
}