Commit Graph

27 Commits

Author SHA1 Message Date
Michael Greene
621bb658d6 this is fine 2016-12-20 14:38:11 -08:00
Michael Greene
afdc317ec9 some gpg improvements; hopefully this will be a little more version resilient 2016-12-20 14:36:35 -08:00
Michael Greene
848c8afe28 - added SECP256K1 curve to EllipticCurveOID because GnuPG supports it
- marked some regression tests as such
 - minor organization stuff
[skip ci]
2016-04-21 18:46:28 -07:00
Michael Greene
a893965ebe more test coverage 2016-04-21 16:48:58 -07:00
Michael Greene
2817059e8f unit test coverage and a couple of minor fixed bugs found from running those tests 2016-04-21 16:07:31 -07:00
Michael Greene
137c5d4df4 - fixed improper munging of non-unicode inputs - #154
- added additional unicode tests - #153
 - fixed mixin/base class ordering of PGPObject subclasses
2016-02-26 16:23:02 -08:00
Michael Greene
9fb619067e expanded PGPMessage testing somewhat and organized the literal data files a bit better
[skip ci]
2016-02-26 16:20:43 -08:00
Michael Greene
a7742540ec - started adding memoryview stuff for further reducing parsing IO [#145]
added a memoryview wrapper for python 2 to make this usage more uniform
 - started implementing __copy__ methods to make copying PGP* objects less useless
 - added an initial set of copy tests
 - moved _parent stuff to a new mixin class ParentRef to reduce code duplication
   this also wraps _parent references in weakrefs to help reduce cycles
 - implemented recovering a public key from a private key [closes #92]
   added a test for this as well
2016-02-19 20:54:18 -08:00
Michael Greene
3cbad620e1 - generalized/refactored away some repeated code in MPIs subclasses
- updated __all__ in a few places
- improved test_exports
- pep8
2016-02-16 21:05:21 -08:00
Michael Greene
e8326b4771 - correctly deriving the KEK length now for KDF
- added missing OIDs for EllipticCurveOID enum members
 - expanded test of expected key generation failures to test all ECC OIDs that aren't implemented yet
 - some minor code cleanups
2016-02-16 16:23:13 -08:00
Michael Greene
f31a802c73 - Implemented proper parsing of ECDH keys - closes #110
- Additional code needed to generate ECDH keys also added
 - Encrypt/decrypt using ECDH also works
 - Added some code to the test harness to start making it work with gpg 2.1
 - Fixed key generation tests to test generating keys using all possible algorithms
 - Updated documentation sources to reflect these changes
2016-02-15 22:48:01 -08:00
Michael Greene
9c6d9636b4 - implemented key protection such that unprotected private keys can be protected with passphrases, and already-protected passphrases can be re-protected with a new passphrase, and unit tests for these two scenarios - closes #149
- updated CI configs so that Python 3.2 can actually finish running the test suite without crashing since it is stuck on an older version of Cryptography
- added additional tests to test setup.py on all versions of Python after I noticed that a recent change would have made it break on Python 3.2
- enum34 should no longer be installed needlessly on Python 3.4 or newer
- added --no-cache-dir to tox's call to pip to install dependencies needed for testing
2015-06-11 19:55:07 -07:00
Michael Greene
c76ba55ee5 - Implemented proper parsing of ECDSA keys - closes #109
- Added ECDSA signing and verification - closes #111
 - ECDSA key generation is also supported
 - refactored some of the signing/verification machinery to simplify code in PGPKey._sign and PGPKey.verify
 - fixed a bug with Signature subpacket ByteFlags where the byte output was not being properly null-padded to the length of the subpacket when necessary, which led to the potential for key outputs that would fail to parse properly if update_hlen was not called (which is silly)
 - fixed string formatting UserID packets when the comment and/or email address are missing - closes #142
 - implemented OpaquePubKey and OpaquePrivKey so that keys using unimplemented formats can still be loaded without error, even if they can't be used
 - enabled initial key action testing using ecc.1.pub.asc and ecc.1.sec.asc (which also required copying the two signatures from ecc.1.pub.asc to ecc.1.sec.asc)
 - improved test output for some tests with auto-ids that were formed in an unfortunate manner
2015-06-10 22:39:21 -07:00
Michael Greene
84567e085f - PEP8
- 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
2015-06-01 17:45:41 -07:00
Michael Greene
8ee07a2ef8 - renamed PGPSignature.expired to PGPSignature.is_expired for consistency
- renamed PGPSignature.expires to PGPSignature.expires_at for consistency
 - added missing property PGPKey.expires_at
 - added documentation to PGPUID's class docstring to indicate that it implements __format__ for GnuPG-like formatting of User IDs.
2014-10-17 14:44:57 -07:00
Michael Greene
123874aac4 fixed a potential inconsistency between a successful PGPKey.unlock and one that warns that the operation did nothing if it is invoked with an "as ..." clause; updated relevant tests to check that 2014-10-15 12:05:48 -07:00
Michael Greene
21102f9aae Documentation extravaganza!
[skip ci]
2014-10-14 14:41:24 -07:00
Michael Greene
737b265452 changed instances of __add__ to __or__ -- closes #133 2014-10-14 12:05:11 -07:00
Michael Greene
a36a776079 documentation updates and a minor API change to PGPUID.new 2014-10-07 16:32:20 -07:00
Michael Greene
c98dad8537 removed unused argument, message
[skip ci]
2014-10-07 11:57:55 -07:00
Michael Greene
9b59b8bc07 standalone signature support edge case 2014-10-07 11:53:12 -07:00
Michael Greene
accac2f702 - Selection of signing/encrypting user id is now possible; closes #121
- 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
2014-10-06 13:12:32 -07:00
Michael Greene
008c911877 fixed some unicode stuff and some encoding stuff; added more thorough unicode testing; moved deque sorting functions into a new subclass of deque; fixed some broken tests 2014-10-02 19:11:23 -07:00
Michael Greene
c8a34762bd Python 2.x fix 2014-10-02 10:50:26 -07:00
Michael Greene
e600be8921 some documentation; overhauled PGPKey.sign by splitting it into multiple methods; reimplemented almost all of TestPGPKey in test_05_actions 2014-10-01 21:47:31 -07:00
Michael Greene
851f645cdd 100% test coverage - closes #115 2014-09-30 18:38:10 -07:00
Michael Greene
b1204fb5ac more coverage 2014-09-30 15:27:14 -07:00