gpg: Distinguish between missing and cleared key flags.
authorWerner Koch <wk@gnupg.org>
Fri, 15 Mar 2013 14:46:03 +0000 (15:46 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 4 Oct 2013 18:53:51 +0000 (20:53 +0200)
commit27d0f32f77fbef59ddf7c6d79b5b4adee6b2e6ac
tree6b77b789f5a7603d16d4513cef4f43dd434b3bb7
parent69088ac76fd4b9f303edf3c1453088dda8596399
gpg: Distinguish between missing and cleared key flags.

* include/cipher.h (PUBKEY_USAGE_NONE): New.
* g10/getkey.c (parse_key_usage): Set new flag.
--

We do not want to use the default capabilities (derived from the
algorithm) if any key flags are given in a signature.  Thus if key
flags are used in any way, the default key capabilities are never
used.

This allows to create a key with key flags set to all zero so it can't
be used.  This better reflects common sense.
(cherry picked from commit 4bde12206c5bf199dc6e12a74af8da4558ba41bf)
(cherry picked from commit 0a805ed1604ef3e9b27f3e22a936a2d439300e9f)

Resolved conflicts:
include/cipher.h
g10/getkey.c
include/cipher.h