aboutsummaryrefslogtreecommitdiffstats
path: root/agent/trustlist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-05-03 13:37:38 +0000
committerWerner Koch <[email protected]>2004-05-03 13:37:38 +0000
commit30bbef1a285929422bd99d648592e146cd5418ae (patch)
treecc826fb8208072461b4c1f884b979204872e0f50 /agent/trustlist.c
parent(main) <gpgconf>: Use gpg.conf and not /dev/null as (diff)
downloadgnupg-30bbef1a285929422bd99d648592e146cd5418ae.tar.gz
gnupg-30bbef1a285929422bd99d648592e146cd5418ae.zip
* gpg-agent.c: Remove help texts for options lile --lc-ctype.
(main): New option --allow-mark-trusted. * trustlist.c (agent_marktrusted): Use it here. * gpg-agent.texi (Agent Options): Add --allow-mark-trusted. * gpgconf-comp.c: Add --allow-mark-trusted for the gpg-agent.
Diffstat (limited to 'agent/trustlist.c')
-rw-r--r--agent/trustlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/agent/trustlist.c b/agent/trustlist.c
index 5c3271ac0..19de0708d 100644
--- a/agent/trustlist.c
+++ b/agent/trustlist.c
@@ -224,7 +224,7 @@ agent_listtrusted (void *assuan_context)
/* Insert the given fpr into our trustdb. We expect FPR to be an all
uppercase hexstring of 40 characters. FLAG is either 'P' or 'C'.
- This function does first check whether that key has alreay ben put
+ This function does first check whether that key has alreay been put
into the trustdb and returns success in this case. Before a FPR
actually gets inserted, the user is asked by means of the pin-entry
whether this is actual wants he want to do.
@@ -265,6 +265,10 @@ agent_marktrusted (CTRL ctrl, const char *name, const char *fpr, int flag)
if (rc != -1)
return rc; /* error in the trustdb */
+ /* This feature must explicitly been enabled. */
+ if (!opt.allow_mark_trusted)
+ return gpg_error (GPG_ERR_NOT_SUPPORTED);
+
/* insert a new one */
if (asprintf (&desc,
"Please verify that the certificate identified as:%%0A"