Similar to the concerns in #297, there are noisy warnings produced
when encrypting data to or signing data with a primary key, if a
subkey is ultimately what ends up being used:
```
./generate-test-vectors:279: UserWarning: Key F231550C4F47E38E does not have the required usage flag EncryptStorage, EncryptCommunications; using subkey 4766F6B9D5F21EB6
encmsg = alice_key.pubkey.encrypt(payloadmsg, cipher=cipher, sessionkey=sessionkey)
```
This change converts these warnings to debug information.
In #298, we just removed the noisy warnings on consuming data -- the
caller really has no choice in how to consume the data, so there's no
point in sending them alerts. Either we can decrypt or verify with
the primary key or one of the subkeys, or we can't.
But in the situation where the caller is producing data -- signing or
encrypting -- we might want be a little bit noisier, because the user
really might have some obscure reason that they prefer to use a
specific subkey that the library isn't in a position to understand.
So giving the user a hint at debug-level about what's going on is
probably reasonable.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
value must be constrained to the range
0-255 inclusive
- reversed six.PY2/3 checks so six.PY2 is the special case
- singledispatch import now tries the one in functools if singledispatch is not installed
- modified tox.ini so that py32 can continue to be tested even though cryptography no longer supports it
- Key Generation - #147 :
- implemented new API method
- added unit tests for generating keys, adding user ids, and adding new subkeys
- added unit tests to test basic expected exception raising when trying to use incomplete keys
- added a very basic key-completeness test to the @KeyAction decorator
- added __contains__ to SignatureVerification
- Forced ByteFlag subpackets to take/return sets now instead of lists
- removed some properties from PGPKey
- added new classmethod `from_blob` to Armorable
- made some modifications to the unit tests to work with this stuff