diff options
author | Werner Koch <[email protected]> | 2007-12-12 10:28:30 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2007-12-12 10:28:30 +0000 |
commit | bae4b256c79c24e5306c692adf9bb5891433c7d5 (patch) | |
tree | c0aae4de008d75964074146240257f81b8ded0b1 /sm/call-agent.c | |
parent | Allow decryption using type 20 Elgamal keys. (diff) | |
download | gnupg-bae4b256c79c24e5306c692adf9bb5891433c7d5.tar.gz gnupg-bae4b256c79c24e5306c692adf9bb5891433c7d5.zip |
Support DSA2.
Support Camellia for testing.
More audit stuff.
Diffstat (limited to 'sm/call-agent.c')
-rw-r--r-- | sm/call-agent.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sm/call-agent.c b/sm/call-agent.c index 3f4e11ec2..af35ac53a 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -1,5 +1,6 @@ /* call-agent.c - divert operations to the agent - * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2005, + * 2007 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -69,13 +70,14 @@ struct learn_parm_s static int start_agent (ctrl_t ctrl) { - if (agent_ctx) - return 0; /* fixme: We need a context for each thread or serialize - the access to the agent (which is suitable given that - the agent is not MT. */ - + int rc; - return start_new_gpg_agent (&agent_ctx, + if (agent_ctx) + rc = 0; /* fixme: We need a context for each thread or + serialize the access to the agent (which is + suitable given that the agent is not MT. */ + else + rc = start_new_gpg_agent (&agent_ctx, GPG_ERR_SOURCE_DEFAULT, opt.homedir, opt.agent_program, @@ -84,7 +86,13 @@ start_agent (ctrl_t ctrl) opt.xauthority, opt.pinentry_user_data, opt.verbose, DBG_ASSUAN, gpgsm_status2, ctrl); + if (!ctrl->agent_seen) + { + ctrl->agent_seen = 1; + audit_log_ok (ctrl->audit, AUDIT_AGENT_READY, rc); + } + return rc; } |