Isis Lovecruft
d66d86ca7e
Fix bug in example/make-8192-bit-key.py resulting from parser changes.
2015-03-18 03:50:16 +00:00
Isis Lovecruft
10df44b75f
Merge branch 'master' into develop
2015-03-13 05:06:50 +00:00
Isis Lovecruft
af781626a9
Merge branch 'release/2.0.1'
2015-03-13 05:06:34 +00:00
Isis Lovecruft
cf4d3efd8d
Merge branch 'fix/94-encrypt-from-stream' into develop
2015-03-13 03:48:49 +00:00
Isis Lovecruft
b7ff69092a
Avoid writing to /tmp and borking terminals in regression test from #94 .
2015-03-13 03:47:42 +00:00
Isis Lovecruft
8e6c2a752c
Merge branch 'fix/93-encrypt-to-stream' into develop
2015-03-13 03:46:47 +00:00
Isis Lovecruft
79285c4c17
Add @doktorstick's example code for reproducing #93 as a unittest.
...
* ADD regression test for #93 .
2015-03-13 03:45:20 +00:00
Isis Lovecruft
6d1890389c
Actually check output file contents in to test_encrypt_*() tests.
...
This provides more accurate testing for issues like #93 .
2015-03-13 03:44:12 +00:00
Isis Lovecruft
8579331562
Merge branch 'fix/94-encrypt-from-stream' into develop
2015-03-13 03:22:31 +00:00
Isis Lovecruft
0c87da3d78
Recognise builtin Python2 and Python3 file handle types as streams.
...
* FIXES Issue #93 for both Python2 and Python3.
2015-03-13 03:20:32 +00:00
Isis Lovecruft
38685ae001
Add @doktorstick's example code for reproducing Issue #93 as a test.
2015-03-13 03:18:52 +00:00
Isis Lovecruft
9d8d6cce5c
Merge branch 'fix/89-python3' into develop
2015-03-13 02:47:57 +00:00
Isis Lovecruft
43164fa7db
Fix Python3 stream encoding issues in _copy_data().
...
These issues were introduced in f8ccdc50
. Because we no longer convert
everything to an io.BytesIO in _encrypt() with _make_binary_stream(),
all io.StringIO()s which are passed through must take encoded strings
and io.BytesIO()s must take bytes (and there is actually a difference
with Python3).
Additionally, there appears to be an issue where the `outstream` passed
to _copy_data() is sometimes a _io.BufferedWriter and other times an
encodings.utf_8.StreamWriter. I am not sure yet where this problem was
introduced. For now, the workaround for dealing with the Python3
bytes/str io.BytesIO/io.StringIO problem also provides a workaround for
this issue.
* FIXES #88 .
* FIXES #89 for Python3.
* FIXES #93 .
2015-03-13 02:45:05 +00:00
Isis Lovecruft
a7e772f10a
Make an open() file mode explicitly binary.
...
It already was binary, due to the `from codecs import open as open`,
however we should be more explicit.
2015-03-13 02:32:52 +00:00
Isis Lovecruft
4be6fb75e3
Fix potential UnicodeEncodeError in gen_key_input().
2015-03-13 02:32:52 +00:00
Isis Lovecruft
b970917701
Fix multiple encoding errors in tests.
2015-03-13 02:32:51 +00:00
Isis Lovecruft
782a81b46a
Split encryption tests for file-like objects into multiple tests.
...
This modifies the tests added in #89 .
2015-03-13 02:32:50 +00:00
Isis Lovecruft
b3dd20a7e5
Merge branch 'fix/99-recv-keys-network-test' into develop
2015-03-13 02:26:36 +00:00
Isis Lovecruft
af403fe144
Move 'test_recv_keys_default' to a new test group which doesn't run.
...
* FIXES #99 temporarily.
2015-03-13 02:25:10 +00:00
Isis Lovecruft
657be31ae1
Change a str to a repr in a log message.
2015-03-13 02:21:18 +00:00
Isis Lovecruft
749ef6fa00
PEP8 whitespace fixes in gnupg/_meta.py.
2015-03-13 02:20:48 +00:00
Isis Lovecruft
2cf3dd1c86
Add coverage related commands to Makefile and clean up test directives.
2015-03-13 02:20:13 +00:00
Isis Lovecruft
3127c21d55
Merge branch 'fix/100-listpackets-good-passphrase' into develop
2015-03-11 03:44:31 +00:00
Isis Lovecruft
2c57c0f6d0
Handle [GOOD|BAD|MISSING]_PASSPHRASE statuses in _parsers.ListPackets.
...
* FIXES #100 .
2015-03-11 03:25:55 +00:00
Isis Lovecruft
88bfaaffc2
Merge branch 'fix/98-pinentry-launched' into develop
2015-03-09 08:52:12 +00:00
Isis Lovecruft
eb205774fb
Add support for PINENTRY_LAUNCHED status message.
...
* FIXES #98 .
2015-03-09 08:50:52 +00:00
Isis Lovecruft
5d03c3c5eb
Merge branch 'fix/96-no-use-agent' into develop
2015-03-09 08:45:22 +00:00
Isis Lovecruft
ae5cb33d63
Unset GPG.user_agent if using gpg2 binary.
...
* FIXES #96 .
2015-03-09 08:42:50 +00:00
Thomas Tanner
d3e6ae33b4
no-use-agent is obsolete for GPG2
...
(cherry picked from commit 19fd35c7232e42a4112c8f18686df1c0407c2d0d)
Signed-off-by: Isis Lovecruft <isis@leap.se>
* FIXES #96 .
* CLOSES #96 .
* CLOSES #46 .
2015-03-09 08:21:04 +00:00
Isis Lovecruft
d3b7dd0353
Merge branch 'fix/91-missing-passphrase' into develop
2015-03-09 08:14:55 +00:00
Isis Lovecruft
d31d0cf131
Handle MISSING_PASSPHRASE in _parsers.Sign.
...
* FIXES #91 .
2015-03-09 08:12:41 +00:00
Isis Lovecruft
f3c193d8b4
Merge remote-tracking branch 'charles-dyfis-net/homedir-perm-check-skippable' into develop
2015-03-09 07:52:59 +00:00
Isis Lovecruft
55b586fd18
Merge remote-tracking branch '6si/feature/allow_output_flag' into develop
2015-03-09 07:48:34 +00:00
Isis Lovecruft
f858080148
Merge remote-tracking branch 'charles-dyfis-net/pass_through_good_options' into develop
2015-03-09 07:24:38 +00:00
Isis Lovecruft
572429eed9
Merge branch 'fix/89-fix-encrypting-streams' into develop
2015-03-09 07:19:36 +00:00
Isis Lovecruft
ceb1c2fbbd
Add _STREAMLIKE_TYPES for determining stream-likeness in _is_stream().
...
* FIXES Python3 problems with various StringIO imports commit 8c261eb
from fix for #89 in PR #92 .
2015-03-09 07:01:15 +00:00
Isis Lovecruft
90c6613684
Merge branch 'master' into develop
2015-02-24 21:59:04 +00:00
Isis Lovecruft
939728694c
Merge branch 'release/2.0.0'
2015-02-24 21:58:37 +00:00
Isis Lovecruft
d66b23b896
Add support for running on PyPy.
2015-02-22 22:57:59 +00:00
Garrett Robinson
6c15f25ee5
Unit test for encrypting file-like objects
2015-01-20 11:18:55 -08:00
Garrett Robinson
8c261eba30
Expand set of classes recognized by `_util._is_stream`
...
Adds additional commonly used stream classes from the standard library
to `_util._is_stream`. This means these classes can be used successfully
wherever `_is_stream` is used to decide whether or not to encode data
throughout the codebase, including in `_encrypt`.
2015-01-20 09:22:54 -08:00
Garrett Robinson
f8ccdc5028
Fix `GPG.encrypt` for file-like objects
...
`GPG.encrypt_file` was refactored into `GPG.encrypt` in 295d98f
, which
broke the functionality of `GPG.encrypt_file` for encrypting file-like
stream objects such as StringIO, BytesIO, etc.
The main difference between `GPG.encrypt_file` and `GPG.encrypt` is that
`GPG.encrypt` first converts its `data` argument into a binary stream
via `_make_binary_stream`. This is unnecessary when the argument is
already a stream, as was often the case in calls to `GPG.encrypt_file`.
Additionally, `_make_binary_stream` typically fails when it attempts
to encode a stream object, which means it is no longer possible to
achieve the functionality of `GPG.encrypt_file` with `GPG.encrypt` after
the refactor.
This commit only converts `data` to a binary stream if it is not already
a stream, re-using `_util._is_stream` to make that determination.
2015-01-17 16:09:39 -08:00
Viral Bajaria
8a7699236c
add output as a valid option
2015-01-06 11:13:46 -08:00
Isis Lovecruft
5025df1661
Merge branch 'master' into develop
2014-11-27 04:14:11 +00:00
Isis Lovecruft
b1dab1570d
Merge branch 'release/1.4.0'
2014-11-27 04:14:03 +00:00
Isis Lovecruft
8f92335476
Merge branch 'master' into develop
2014-11-27 02:59:22 +00:00
Isis Lovecruft
613e84cd56
Merge branch 'release/1.3.3'
2014-11-27 02:58:47 +00:00
Isis Lovecruft
1a22565e24
Merge branch 'fix/67-hidden-encrypt' into develop
2014-11-27 02:41:02 +00:00
Isis Lovecruft
81b2d9d9c2
Change ListPackets.key to be backwards compatible.
...
This also adds a new ``ListPackets.encrypted_to`` list, which contains
all the keyids which a message was encrypted to. ``ListPackets.key`` is
just the first one we discovered that it was encrypted to, for backwards
compatibility.
* FIXES part of Issue #67 .
https://github.com/isislovecruft/python-gnupg/issues/67
* CHANGES the additions made in commit f70a7dc4f0
by @tomgalloway in
PR#70 to be backwards compatible.
f70a7dc4f0
https://github.com/isislovecruft/python-gnupg/pull/77
2014-11-27 02:35:52 +00:00
Isis Lovecruft
513a48d876
Add throw_keyids=bool option to encrypt() method.
...
* FIXES part of Issue #67 .
https://github.com/isislovecruft/python-gnupg/issues/67
2014-11-27 02:19:34 +00:00