aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2016-07-09 01:20:02 +0000
committerNIIBE Yutaka <[email protected]>2016-07-09 01:41:08 +0000
commitcf01cf8b88abb6ed5fea300c28e2a1e6a7c67804 (patch)
tree70c7b2cce88e6d23393e8fd4957bc3d7de5b47a7
parentg10: Fix keysize with --expert. (diff)
downloadgnupg-cf01cf8b88abb6ed5fea300c28e2a1e6a7c67804.tar.gz
gnupg-cf01cf8b88abb6ed5fea300c28e2a1e6a7c67804.zip
gpgv: Tweak default options for extra security.
* g10/gpgv.c (main): Set opt.no_sig _cache, so that it doesn't depend on cached status. Similarly, set opt.flags.require_cross_cert for backsig validation for subkey signature. -- (backport of master commit e32c575e0f3704e7563048eea6d26844bdfc494b) It is common that an organization distributes binary keyrings with signature cache (Tag 12, Trust Packet) and people use gpgv to validate signature with such keyrings. In such a use case, it is possible that the key validation itself is skipped. For the purpose of gpgv validation of signatures, we should not depend on signature cache in keyrings (if any), but we should validate the key by its self signature for primary key, and back signature for subkey. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--g10/gpgv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/gpgv.c b/g10/gpgv.c
index b2721bae9..f2899bf77 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -144,6 +144,8 @@ main( int argc, char **argv )
opt.pgp2_workarounds = 1;
opt.keyserver_options.options|=KEYSERVER_AUTO_KEY_RETRIEVE;
opt.trust_model = TM_ALWAYS;
+ opt.no_sig_cache = 1;
+ opt.flags.require_cross_cert = 1;
opt.batch = 1;
opt.weak_digests = NULL;