Commit Graph

982 Commits (b1dab1570d6f92ec7428ef6b4a69a9e29a058f40)

Author SHA1 Message Date
Isis Lovecruft f97c78d963
Remove outdated, unused scripts/ directory. 2014-09-26 05:54:57 +00:00
Isis Lovecruft ba632f3dad
Add a bunch of maintenance scripts which were in scripts/ directory.
These are going to be removed in the next commit, but just in case they
are/were useful, I'm making a record of their existence.
2014-09-26 05:53:28 +00:00
Isis Lovecruft 345ac83742
Remove old, unused patches/ directory. 2014-09-26 05:43:22 +00:00
Isis Lovecruft 1472a5ccb7
Merge branch 'fix/66-keyrevoked' into develop 2014-09-26 03:50:34 +00:00
Isis Lovecruft 4da7ec92bd
Handle KEYREVOKED status message during signature verification.
If we get a VALIDSIG, but the signing key has since been revoked, we
(mostly) ignore the KEYREVOKED status message (except to append "key
revoked" to the `Verify.status` string).

 * ADD ability to handle KEYREVOKED status to `gnupg._parsers.Verify`.

 * FIXES Issue #66
   https://github.com/isislovecruft/python-gnupg/issues/66

 * THANKS TO Tom Galloway for finding this bug.
   https://github.com/tomgalloway

 * CLOSES PR#38
   https://github.com/isislovecruft/python-gnupg/pull/38
2014-09-26 03:39:36 +00:00
Isis Lovecruft 08370fbc02
Merge branch 'fix/44-verbose-arg' into develop 2014-09-26 02:52:27 +00:00
Isis Lovecruft b51b0eb5ac
Only use `--debug-level=` syntax if GnuPG<=1.4.18.
* FIXES Issue #44 (again):
   https://github.com/isislovecruft/python-gnupg/issues/44#issuecomment-56907151
2014-09-26 02:43:22 +00:00
Isis Lovecruft bb5e2444ad
Cleanup logic for helping users who set a weird `verbose=` level.
* ADD new `gnupg._meta.GPGBase._set_verbose()` method, which will set
   `'basic'` as the default `--debug-level` for GnuPG, if the user did
   something weird like specifying `verbose=True` or typoing one of the
   string levels (e.g. `verbose='guruu'`).
2014-09-26 02:36:12 +00:00
Isis Lovecruft 6e228c3ef0
Move logic for sanity check and getting binary version to new method.
* CHANGE behaviour so that `gnupg.GPG.binary_version` is set in
   `gnupg._meta.GPGBase.__init__()`, instead of `gnupg.GPG.__init__()`.

 * ADD new `gnupg._meta.GPGBase._check_sane_and_get_gpg_version()`
   method, and move logic for doing a sanity check on the binary and
   getting the binary's version, which was previously in
   `gnupg.GPG.__init__()`, into this new method.

 * ADD an additional field for the `binary_version` to the logger call
   which displays initialisation settings when `gnupg.GPG.__init__()`
   is run.
2014-09-26 02:29:59 +00:00
Isis Lovecruft eb25ef2b91
Only compile the version string regex once on module import.
* MOVE the compiled regex for matching the GnuPG binary's version to a
   module-level variable in `gnupg._util`.
2014-09-26 02:24:46 +00:00
Isis Lovecruft 7dc3b66de4
Make GnuPG>2.0.x only methods always public.
They are only effective if the binary is GnuPG>=2.0.x anyway, and the
extra code to change the method names depending on the underlying
binary will cause clutter for anyone using python-gnupg.

This change is backwards compatible with python-gnupg<=1.3.1, since the
private methods (e.g. `gnupg.GPG._create_trusttb`) are kept intact.
2014-09-26 02:23:37 +00:00
Isis Lovecruft ed031210ca
Merge branch 'fix/44-verbose-arg' into develop 2014-09-24 22:21:56 +00:00
Isis Lovecruft 69cc991938
Fix bug in determining behaviours for those using GnuPG2 binaries.
This bug caused some extra behaviours which should only be invoked if
the user is using a gpg2 binary. It was caused by checking:

    if _util._is_gpg2:

which is always true, since `_util._is_gpg2` is a function which isn't
being called in this case, i.e.:

    >>> def foo(): return False
    >>> bool(foo)
    True

So instead this should be changed to actually call `_util._is_gpg2()`,
by using `gnupg.GPG.is_gpg2()` which will automatically pass in the
detected binary version number.
2014-09-24 22:13:25 +00:00
Isis Lovecruft 5ad99acd7c
Despite what GnuPG says it expects, it actually expects `--debug-level=`.
* FIXES Issue #44:
   https://github.com/isislovecruft/python-gnupg/issues/44
2014-09-24 22:12:20 +00:00
Isis Lovecruft d5fe2d7cc4
GnuPG's `--debug-level` ints are only required to be ≥ 1.
They aren't required to be ≤ 9, as the previous check in
`gnupg._meta.GPGBase._make_args()` ensured. That is, calling GnuPG from
the commandline, doing:

  $ gpg --debug-level=100000 …

is valid, so we should also accept 10000 (even though everything > 8
means the same debug level anyway).
2014-09-24 22:07:42 +00:00
Isis Lovecruft 7c56dd5864
Merge remote-tracking branch 'akerl/master' into develop 2014-09-24 21:30:46 +00:00
Isis Lovecruft f521545903
Merge remote-tracking branch 'anarcat/dev/monkeysign' into develop 2014-09-24 21:12:05 +00:00
Isis Lovecruft 728b5c8ec9
Merge remote-tracking branch 'kalikaneko/feature/expand-homedir' into develop 2014-09-24 19:49:34 +00:00
Isis Lovecruft 042550d151
Merge remote-tracking branch 'drebs/bug/6025_verify-file-is-inconsistent' into develop 2014-09-24 19:40:06 +00:00
Kali Kaneko bde27abcf2 expand ~ in homedir 2014-09-09 16:44:05 -05:00
Antoine Beaupré 293fa6b2e0
fix truth evaluation of import results
for some reason, the count was accessed as if it was a Storage
instance, and it's not, it behaves as a dictionnary

includes test case that will fail with the original code
2014-08-29 21:10:48 -07:00
drebs a26cc9c0f4 Fix verify_file() to really treat signed data as file descriptor. 2014-08-27 12:29:14 -03:00
Isis Lovecruft adf27fbdef
Merge branch 'master' into develop 2014-08-02 04:23:31 +00:00
Isis Lovecruft 961bf8da1b
Merge branch 'release/1.3.1' 2014-08-02 04:23:16 +00:00
Isis Lovecruft 87928205a8 Merge branch 'fix/24-output-to-filename' into develop 2014-08-02 04:18:27 +00:00
Isis Lovecruft 80741e8703
Remove `sudo` from `uninstall` directive in Makefile. 2014-08-02 04:17:24 +00:00
Isis Lovecruft 4d120a2288
Add unittest which tests encrypt() when `output` is given an open file.
* ADD new unittest, `test_encryption_to_filehandle`.
2014-08-02 04:14:22 +00:00
Isis Lovecruft 83784657d5
Add new unittest that tests encryption with a filename output.
* ADD test_encryption_to_filename which checks that encrypt(...,
   output='somefilename.gpg') works correctly (when `output` is a string
   containing the filename).
   This tests for the bug reported in Issue #24.
   https://github.com/isislovecruft/python-gnupg/issues/24
2014-08-02 04:02:15 +00:00
Isis Lovecruft 137d3ac5c5
Fix encrypting to filenames and/or file-like objects.
* FIXES Issue#24, which prevented python-gnupg from encrypting to a
   filename given as a string to the `output` parameter of
   `gnupg.GPGMeta._encrypt()`.

 * THANKS TO by Bill Buddington of SecureDrop and Yan Zhu of the
   Electronic Frontier Foundation (EFF) for finding and reporting the
   bug. The ticket for this bug can be viewed at:
   https://github.com/isislovecruft/python-gnupg/issues/24
2014-08-02 03:33:55 +00:00
Isis Lovecruft 5207ccc6b4
Update copyright years on Sphinx docs. 2014-08-02 01:54:30 +00:00
Isis Lovecruft 166eb472b9
Merge branch 'master' into develop 2014-08-02 01:15:13 +00:00
Isis Lovecruft ac850a40ee
Merge branch 'release/1.3.0' 2014-08-02 01:14:56 +00:00
Isis Lovecruft a238f9ad86
Merge remote-tracking branch 'kalikaneko/feature/subprocess_shell_false' into develop 2014-08-02 00:25:36 +00:00
Isis Lovecruft 285649cfa0
Merge remote-tracking branch 'kalikaneko/doc-fixes' into develop 2014-08-01 23:59:33 +00:00
Isis Lovecruft bee4c1f01a
Merge remote-tracking branch 'kalikaneko/fix-expired-test-certs' into develop 2014-08-01 23:56:43 +00:00
Isis Lovecruft 3c53bdf029
Merge branch 'master' into develop 2014-08-01 23:54:21 +00:00
Isis Lovecruft 2b47ac2508
Merge branch 'release/1.2.7' 2014-08-01 23:54:09 +00:00
kali 36c701b08f do not expand shell on subprocess 2014-08-01 17:37:11 -05:00
kali 99e3407036 fix failing test_signature_string_bad_passphase
also, do pass a passphrase to test_signature_string_verification
so that we have something to compare to.
2014-08-01 17:13:27 -05:00
kali 90c8586c8d substitute expired test certificates 2014-08-01 17:13:22 -05:00
kali 949b8b4511 ignore vim swapfiles 2014-07-14 10:33:51 -05:00
kali 6afd63ed34 add missing imports 2014-07-14 10:32:46 -05:00
kali 44c5d92745 update interface calls in README 2014-07-14 10:31:42 -05:00
Isis Lovecruft ea9363a466
Merge remote-tracking branch 'kalikaneko/bug/include-manifest' into develop 2014-07-09 10:44:48 +00:00
Kali Kaneko 8b58cb313c relax psutil version pinning 2014-07-02 12:27:05 -05:00
Kali Kaneko d8e2ab7a7c add Manifest.in
- include requirements.txt
- add LICENSE and docs to package
2014-07-02 12:26:42 -05:00
Les Aker ff96904233 Merge branch 'master' of github.com:isislovecruft/python-gnupg 2014-06-14 19:39:07 -04:00
Isis Lovecruft b6a7de4104
Fix PyPI module classifiers to specify support for Python 3.3 and 3.4. 2014-06-04 21:14:23 +00:00
Isis Lovecruft ef01fef99a
Merge branch 'master' into develop 2014-06-04 21:11:49 +00:00
Isis Lovecruft 1ea44e81af
Merge branch 'release/1.2.6' 2014-06-04 21:11:13 +00:00