summaryrefslogtreecommitdiffstats
path: root/sm/server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-05-18 19:38:34 +0200
committerWerner Koch <wk@gnupg.org>2009-05-18 19:38:34 +0200
commit387a51f9515fdfa26b5fa8bb22366844a315fd9c (patch)
tree026a801ad349e59e2e64c495a7478533cf627ecb /sm/server.c
parentChanged default algo and size. (diff)
downloadgnupg2-387a51f9515fdfa26b5fa8bb22366844a315fd9c.tar.xz
gnupg2-387a51f9515fdfa26b5fa8bb22366844a315fd9c.zip
New gpgsm server option no-encrypt-to.
Add caching for symkey encryption. Minor cleanups.
Diffstat (limited to '')
-rw-r--r--sm/server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sm/server.c b/sm/server.c
index 6b9eeb82d..dfd4f690f 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -51,6 +51,7 @@ struct server_local_s {
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. */
+ int no_encrypt_to; /* Local version of option. */
};
@@ -301,6 +302,10 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
int i = *value? atoi (value) : 0;
ctrl->with_ephemeral_keys = i;
}
+ else if (!strcmp (key, "no-encrypt-to"))
+ {
+ ctrl->server_local->no_encrypt_to = 1;
+ }
else
return gpg_error (GPG_ERR_UNKNOWN_OPTION);
@@ -486,7 +491,7 @@ cmd_encrypt (assuan_context_t ctx, char *line)
/* Now add all encrypt-to marked recipients from the default
list. */
rc = 0;
- if (!opt.no_encrypt_to)
+ if (!opt.no_encrypt_to && !ctrl->server_local->no_encrypt_to)
{
for (cl=ctrl->server_local->default_recplist; !rc && cl; cl = cl->next)
if (cl->is_encrypt_to)