diff options
author | Werner Koch <[email protected]> | 2017-10-27 11:56:15 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-10-27 11:56:15 +0000 |
commit | f6ab97fd9620bb8f512ffb471a66e5f96098a7cc (patch) | |
tree | 99db33d56ef4f0c05f1d6af6ec7ffaffd9547e1b /g10/trust.c | |
parent | agent: Clean up pinentry access locking. (diff) | |
parent | agent, tests: Support --disable-scdaemon build case. (diff) | |
download | gnupg-f6ab97fd9620bb8f512ffb471a66e5f96098a7cc.tar.gz gnupg-f6ab97fd9620bb8f512ffb471a66e5f96098a7cc.zip |
Merge branch 'STABLE-BRANCH-2-2' into master
--
Resolved Conflicts:
configure.ac - Adjust due to new log_clock otions
Diffstat (limited to 'g10/trust.c')
-rw-r--r-- | g10/trust.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/g10/trust.c b/g10/trust.c index ee6078b5a..6d4f0e74b 100644 --- a/g10/trust.c +++ b/g10/trust.c @@ -66,6 +66,26 @@ register_trusted_key (const char *string) #ifdef NO_TRUST_MODELS (void)string; #else + + /* Some users have conf files with entries like + * trusted-key 0x1234567812345678 # foo + * That is obviously wrong. Before fixing bug#1206 trailing garbage + * on a key specification if was ignored. We detect the above use case + * here and cut off the junk-looking-like-a comment. */ + if (strchr (string, '#')) + { + char *buf; + + buf = xtrystrdup (string); + if (buf) + { + *strchr (buf, '#') = 0; + tdb_register_trusted_key (buf); + xfree (buf); + return; + } + } + tdb_register_trusted_key (string); #endif } |