399 Commits

Author SHA1 Message Date
rot42
e2b873c5ee support for S2K GNU extensions: no private part + smartcard 2019-04-23 00:55:54 +02:00
Stephen Fuhry
e163a0cf22 make expiration date relative to utcnow() 2019-02-04 13:55:40 -05:00
Wolf480pl
c168de2199 #243 - add a regression test 2018-07-15 00:20:18 +02:00
Michael Greene
f1c3d68e32 #226 - added regression test 2017-11-14 14:11:59 -08:00
Michael Greene
c5c64d0b3a RIPEMD160 is no longer accessible through cryptography; changed this line to MD5 so it raises the exception being tested 2017-11-08 11:48:47 -08:00
Michael Greene
0cc3fe6bc1 gpg is finnicky sometimes 2017-08-18 13:04:07 -07:00
Michael Greene
bdd04fba1e try building libgpgme and libgpg-error 2017-08-16 18:42:24 -07:00
Michael Greene
ca7ca6b24d bugfixen
- added missed call to _compute.chksum in ECDSAPriv
- replaced all gpg wrapper fixtures in the unit test suite with gpg package
- moved test suite gnupghome location to tests/gnupghome
2017-08-15 21:43:37 -07:00
J08nY
e9733da494 Add revocation_signatures property to PGPKey.
- Exposes the revocation signatures of the key(primary or sub).

> OpenPGP users may transfer public keys.  The essential elements of a
>   transferable public key are as follows:
>
>     - One Public-Key packet
>
>     - Zero or more revocation signatures
2017-08-07 17:13:36 +02:00
J08nY
d4f5fa0359 Add IssuerFingerprint subpacket per draft-ietf-openpgp-rfc4880bis.
- GPG creates these subpackets in key revocation signatures for
   example from at least version 2.1.18, even though they are only
   in an OpenPGP draft.

 - The draft can be downloaded from:

https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-02

 - Section 5.2.3.27 specifies the new subpacket format:

https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-02#section-5.2.3.27
2017-08-07 16:34:13 +02:00
J08nY
741fbcbee3 Add PGPKeyring.load() for PGPKey instance param.
- Allows one to load a PGPKey into a PGPKeyring via the load
   method. A copy of the PGPKey is added to the keyring. Perhaps
   a different method (?add?) might be added in the future.
2017-08-07 16:17:46 +02:00
Michael Greene
41bff26e46 test suite kerjiggering 2017-08-04 13:19:32 -07:00
Michael Greene
0610b3d464 add some logic so that test_gen_key and test_add_subkey can imperatively skip generating keys that the current OpenSSL build does not have available 2017-08-04 12:58:34 -07:00
Michael Greene
f8c572a43b added missing KeyActions decorator so PGPKey.decrypt is guarded correctly. Fixes #204 2017-08-04 12:48:02 -07:00
Michael Greene
b86829a3c6 handle non-unicode locales. Fixes #173 2017-08-04 12:33:55 -07:00
Michael Greene
5ac069f524 Merge pull request #200 from J08nY/fix/armorable-empty-string
Fix PGPKey.from_blob('') not raising an exception. Fixes #199.
2017-08-04 11:37:18 -07:00
Michael Greene
480e7943f5 Merge pull request #191 from J08nY/fix/encrypt-then-sign
Fix encrypt then sign. #186
2017-08-04 11:23:45 -07:00
J08nY
00d9217f19 Parse partial length headers correctly. 2017-08-04 17:14:17 +02:00
J08nY
b7226e1777 Fix PGPKey.from_blob('') not raising an exception. Fixes #199. 2017-07-28 14:55:30 +02:00
J08nY
484b581878 Add regression tests for #192. 2017-06-29 22:22:31 +02:00
J08nY
26b6f70297 Add tests for signing an encrypted message. 2017-06-29 13:36:00 +02:00
Michael Greene
b24831e243 #194 - regression test 2017-06-28 15:35:28 -07:00
Michael Greene
d3556490c5 Merge pull request #181 from J08nY/feature/armor-regex
Add Armorable.is_armor(text) for detecting ASCII-armored data.
2017-06-21 17:48:43 -07:00
Michael Greene
e7a0807093 #185 - added regression test 2017-06-21 17:32:30 -07:00
J08nY
af67384b34 Add Armorable.is_armor(text) for detecting ASCII-armored data. 2017-06-20 20:17:42 +02:00
Michael Greene
efdbd5f40f #172 - regression test added 2017-04-25 17:53:29 -07:00
Michael Greene
c9d39e3ebc unit test cleanups and additions 2017-02-27 10:05:57 -08:00
Michael Greene
0ab3a67288 cleanup
[skip ci]
2017-02-16 20:36:00 -08:00
Michael Greene
c5d26db522 unit test suite is finally fixed, I think! 2017-02-16 20:25:43 -08:00
Michael Greene
325281c63d typo city 2017-01-23 11:39:01 -08:00
Michael Greene
4eaa84ad68 cleanup
[skip ci]
2017-01-23 11:38:51 -08:00
Michael Greene
8163d535cb more test checks to eliminate unintended failures 2017-01-23 11:23:48 -08:00
Michael Greene
d1abdcb518 test checks to eliminate unintended failures 2017-01-23 11:16:44 -08:00
Michael Greene
b3a86fe0d8 cleanup 2017-01-23 11:09:48 -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
a0486e116c this is fine 2016-12-20 14:38:37 -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
efbdb7305d asserting here seems wrong (and makes the test fail when that isn't entirely the point of this particular regression test) 2016-06-10 16:27:00 -07:00
Michael Greene
0c941948a3 improved the test to check that the resulting count value is actually close to the target, and improved tune_count accordingly - closes #157 2016-06-09 16:13:12 -07:00
Michael Greene
e1515f755a - made HashAlgorithm.tune_count more robust and added a regression test for it - closes #157
- PEP8
2016-06-09 14:59:13 -07:00
Michael Greene
6bc5029843 minor test output cleanup
[skip ci]
2016-06-09 14:51:59 -07:00
Michael Greene
6a47ed5259 bah! 2016-06-02 17:02:44 -07:00
Michael Greene
fcb5058ae5 - better organization for running the tests, plus slight change to the fix itself [#156]
- locked py.test to 2.9.1 for now so I can figure out the changes to fixtures that are breaking my tests later
2016-06-02 16:47:44 -07:00
Michael Greene
b5893e6e6b updated Armorable.is_ascii to include carriage returns; updated Armorable.unarmor regex to be more forgiving of line endings and trailing spaces [#156] 2016-06-02 15:42:31 -07:00
Michael Greene
7c6f01e7af very minor organization tweak
[skip ci]
2016-04-22 17:15:00 -07:00
Michael Greene
2a5e8209ea - added Brainpool Standard curve support (matching GnuPG) for users with openssl >= 1.0.2
- bumped dev branch version to 0.5.0
2016-04-22 17:10:51 -07:00
Michael Greene
895590c3d1 erroneous build failure 2016-04-21 22:16:49 -07: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