Commit Graph

73 Commits

Author SHA1 Message Date
Michael Greene
c9d39e3ebc unit test cleanups and additions 2017-02-27 10:05:57 -08:00
Michael Greene
4eaa84ad68 cleanup
[skip ci]
2017-01-23 11:38:51 -08:00
Michael Greene
3321022287 significantly updated unit test suite to work with py.test 3.x; renamed a few files 2017-01-11 14:04:42 -08:00
Michael Greene
761637d395 some gpg improvements; hopefully this will be a little more version resilient 2016-12-20 14:32:26 -08:00
Michael Greene
a1d9f1cf08 fixed a typo
[skip ci]
2016-02-15 23:10:02 -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
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
bbddeb7fcf Just because it's in PATH, doesn't mean it exists 2015-06-02 16:14:44 -07:00
Michael Greene
eb8b5de76d - stupid test fix to explicitly use gpg2 if both gpg and gpg2 are available, as their --list-packets format is slightly different
- fixed a stupid thing with struct.unpack on Py2 not working on bytearrays
2015-06-02 15:25:32 -07:00
Michael Greene
b227af0490 regression test for #140 2015-06-01 18:21:47 -07:00
Michael Greene
6fbe57bb96 some minor inspection fixes; documentation 2014-10-14 13:12:04 -07:00
Michael Greene
73111e505b whoops, forgot os.pardir 2014-10-10 10:45:54 -07:00
Michael Greene
579ffbf153 this should fix a problem that appears when trying to run the test suite if the project root is named something other than 'PGPy' 2014-10-10 10:37:41 -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
ee261fe8be initial pass of direct-key signing (0x1f) plus tests - #104 2014-09-26 16:56:25 -07:00
Michael Greene
2982be3603 uid signing; uid removal - closes #119; added "add_signature" method to PGPUID to ensure that certification signatures are added in sorted order; made primary signature retrieval more robust 2014-09-18 17:05:46 -07:00
Michael Greene
39b4743fd4 some unit test overhauling 2014-09-17 17:52:13 -07:00
Michael Greene
28b1f1b86d some much needed test and testdata cleanups; fixed verification being skipped in test_reg_bug_56; resolved regression test_reg_bug_56 was meant to prevent 2014-09-16 20:22:53 -07:00
Michael Greene
9c4f66a519 test 2014-09-16 13:06:26 -07:00
Michael Greene
423728d9b8 user id certification now fully tested and working properly - #104 2014-09-16 12:38:08 -07:00
Michael Greene
08e804ff33 asdf 2014-09-15 18:56:53 -07:00
Michael Greene
9f16d3f98a can create new user ids for existing keys - #119
can sign user ids (directly) - #104
2014-09-15 18:22:59 -07:00
Michael Greene
51cab7715a another test bug possibly fixed 2014-09-15 17:20:13 -07:00
Michael Greene
eaa7aef8e2 py.test errors for the last couple of builds should now be fixed 2014-09-15 17:09:47 -07:00
Michael Greene
73f38a4638 signing messages and adding those signatures to them now works - #114 2014-09-15 16:17:34 -07:00
Michael Greene
0875553d14 combined compression algorithm unit tests into one; changed method of creating literal message 2014-09-15 13:48:20 -07:00
Michael Greene
811c236720 stubbed out tests for #104
[skip ci]
2014-09-12 17:24:25 -07:00
Michael Greene
2387fc9c2d Verify key certifications - #99 2014-09-08 17:21:47 -07:00
Michael Greene
8728969f3d (both One-Pass and not) signed message signature verification now works - closes #117 2014-09-08 13:29:48 -07:00
Michael Greene
f670292cc7 almost forgot that decryption requires private keys 2014-09-08 12:43:11 -07:00
Michael Greene
3c5a23d046 Message encryption using RSA - closes #105 2014-09-08 12:31:10 -07:00
Michael Greene
7596d38f67 First pass for encrypting messages/storage using symmetric encryption only (via passphrase) - closes #113 2014-09-05 15:19:32 -07:00
Michael Greene
7975e5164c Basic PGPMessage creation (with and without compression) now works - #114
Unit tests for that, as well
2014-09-04 15:28:44 -07:00
Michael Greene
508c1fc634 PGPKey.unlock is now functionally implemented as a context manager, complete with basic memory wiping; basic unit test also implemented 2014-09-03 16:43:22 -07:00
Michael Greene
e69a02f43d dash un/escaping of cleartext now works 2014-09-03 12:34:37 -07:00
Michael Greene
cb4d06cce7 PGPKey can now verify signatures in cleartext PGPMessages - closes #27 2014-08-27 18:26:50 -07:00
Michael Greene
f4458cc02e Passphrase-protected (symmetrically encrypted only; no public-key encryption) messages can now be decrypted - #113
Also fixed a parsing issue in SKESessionKeyV4
2014-08-27 15:37:53 -07:00
Michael Greene
95261034f4 Can now decrypt asymmetrically-encrypted messages (RSA only; OpenSSL does not provide ElGamal at this time) - #105 2014-08-26 20:12:44 -07:00
Michael Greene
44e7a49ee1 removed keys.py as it is no longer needed (finally); forgot to remove one instance of params in conftest 2014-08-26 11:08:14 -07:00
Michael Greene
30ffc7fd78 signing binary documents works again - first pass (still some cleanup to do, but this is a good start) 2014-08-25 17:22:33 -07:00
Michael Greene
07c4343841 verification of signatures of binary documents works again 2014-08-25 15:03:28 -07:00
Michael Greene
902832bc8e Added parsing for signed messages, one-pass signed messages, and encrypted messages - closes #102 2014-08-25 12:31:07 -07:00
Michael Greene
98af166e90 added literal and compressed messages - #102 2014-08-22 20:59:50 -07:00
Michael Greene
db465fa191 refined the cleartext group in the ASCII regex some; implemented some of the properties in PGPMessage for the cleartext case; some PEP8 fixes; renamed one of the message blocks and added a new one; implemented a test harness for PGPMessage, and added a test to that harness for testing the cleartext messages 2014-08-22 19:05:22 -07:00
Michael Greene
43bc7bf7f6 Updated cryptography to 0.5.4 - closes #91
Slightly reorganized the default imports in pgpy/__init__.py
First pass at updating the ascii_unarmor regex to support cleartext signatures - #102, #27, #28
Added pypy3 to the test matrix as an allowed failure
2014-08-22 13:00:40 -07:00
Michael Greene
88fef75490 fixed test id enumeration to work on a test material file's basename (as it was supposed to) instead of the whole path; added additional test material to test all currently defined compression algorithm types 2014-08-21 11:08:34 -07:00
Michael Greene
1ce179a4c4 - partially reimplemented PGPKeyring - #80
- fixed a typo in UserID packet regex that was causing it to capture well-formatted comments as part of the name
 - changed _signature fields for PGPKey and PGPUID to deques
 - moved is_ascii and is_path into FileLoader as staticmethods
 - fixed comment0 header in pubtest.asc
 - changed Fingerprint.__hash__ to return the hash of the fingerprint without any spaces
 - partially added first unit test for PGPKeyring
2014-08-15 01:17:00 -07:00
Michael Greene
95deebdc0d PGPKey is alive again! - #80
- Filled out EmbeddedSignature finally
 - Added EmbeddedSignatureHeader since Embeded Signatures don't have a tag or a length, just a version
 - Fixed a logic error in SubPackets.__contains__
 - Added tag class bases to *Key classes
 - Added a PacketTag enum
 - Shortened the names of the certification signature types in SignatureType
 - Expanded PGPSignature.prefs into separate methods
 - Added unit tests for PGPKey (for an rsa public key and an rsa private key)
 - This also brings us one step away from completing #76 and #71
2014-08-13 20:02:21 -07:00
Michael Greene
08e3f7a051 PGPSignature is alive again! - #80
- Two property methods are not yet because I don't have test data for them yet
 - Added __sig__ method to Signature(MPIs). DSASignature.__sig__ outputs in (hopefully) correct ASN.1 DER format
 - Removed keyfields.py finally
 - Changed expiration subpacket payloads to timedelta objects (as they should have been already)
 - Changed SignatureV4.hleft to SignatureV4.hash2 for consistency
 - Added unit test harness for basic loading of PGP blocks
 - Added unit test harness for loading/testing signature blocks
 - Added unit test stub for (eventual) loading/testing key blocks
2014-08-12 18:36:42 -07:00
Michael Greene
943c39c0bb fixed Python 2.7 2014-08-10 02:34:35 -07:00