Isis Lovecruft
cc7beb7185
Rewrite GPG.decrypt_file().
2013-05-11 18:26:14 +00:00
Isis Lovecruft
cfd7b38242
Add option to delete subkeys with GPG.delete_keys().
...
* TODO this needs unittests.
2013-05-11 18:25:17 +00:00
Isis Lovecruft
dce4b4a226
Rename handle_status() parser methods to be private to cleanup the API.
2013-05-11 18:10:41 +00:00
Isis Lovecruft
e4f2d533b1
Add cipher, compress, and digest preferences and rename parameters.
...
* Rename gpghome to homedir.
* Rename gpgbinary to binary.
* Add setting to append '--no-use-agent' to the command string in an attempt
to overcome bugs resulting on systems where the user has gpg-agent running
in the background (with some configurations, this is run before X is
started, and killing the agent can result in X dying) and GnuPG tries to
call the program specified by the symlink at /usr/bin/pinentry, result in
encryption and decryption failing due to the '--batch' option blasting
through pinentry without input. This results in a complaint from GnuPG:
gpg: Sorry, no terminal at all requested - can't get input
This bug also prevents symmetric encryption/decryption from working in a
similar manner.
Daniel Kahn Gilmor's monkeysphere, if I am recalling correctly, has a
hack to remove the $DISPLAY variable from the users environment, and then
add it back in, but frankly this option frightens me, as unsetting the
display could result in all X applications failing.
Werner Koch's suggestions, from the gnupg-devel mailing list are:
http://lists.gnupg.org/pipermail/gnupg-users/2007-April/030927.html
And, for the record, '--no-use-agent' doesn't disable pinentry.
2013-05-11 18:03:41 +00:00
Isis Lovecruft
458b8a4c2c
Remove unused logger statement.
2013-05-11 14:48:45 +00:00
Isis Lovecruft
228cec9533
Add all available key fields for GPG.gen_key_input to the docstring.
2013-05-11 08:49:37 +00:00
Isis Lovecruft
a7afce0394
Add a testing mode to GPG.gen_key_input() which uses insecure PRNG.
...
* This should only be used in the unittests, as the PRNG it uses in GnuPG does
not create strong keypairs (though it's faster, thus why we're using it for
testing).
2013-05-11 08:43:33 +00:00
Isis Lovecruft
f95c3c7c1e
Remove old TODO comment.
2013-05-10 09:50:56 +00:00
Isis Lovecruft
d392265101
Fix two bugs, one due to an extra pair of quotes, the other due to strformat.
2013-05-10 09:45:39 +00:00
Isis Lovecruft
b66fc4ca82
Add subkey support and a docstring to GPG.export_keys().
2013-05-10 09:44:07 +00:00
Isis Lovecruft
55185d528b
Separate options into tidy groups so that the parser handles them efficiently.
2013-05-10 09:42:30 +00:00
Isis Lovecruft
fdaadcbd20
Fix a bug due to calling a GnuPG option which was removed several versions ago.
2013-05-10 09:40:36 +00:00
Isis Lovecruft
5d0e45170f
Add a docsting for GPG.delete_keys().
2013-05-10 09:39:40 +00:00
Isis Lovecruft
04a79a2802
Remove the version string from generated keys, encrypted files, and sigs.
2013-05-10 09:33:07 +00:00
Isis Lovecruft
df5346694d
Get rid of the "--no-show-photos is deprecated" GnuPG warning.
2013-04-17 22:49:09 +00:00
Isis Lovecruft
bd853d3fdb
Make the util module private.
2013-04-17 22:48:07 +00:00
Isis Lovecruft
0bc97dd48b
Move _copy_data(), _write_passphrase(), and _threaded_copy_data() to util.
2013-04-17 22:47:13 +00:00
Isis Lovecruft
0394034236
Add key generation utility functions.
...
* Add util._make_passphrase() for creating a random string passphrase and
optionally writing it to a file only readable by the real uid of the
running process.
* Change the util._today() function to _next_year(), which gives us today's
date a year from now, for setting the default expire date in
GPG.gen_key_input().
2013-04-17 20:58:49 +00:00
Isis Lovecruft
9288f8eead
Add docstring for GPG.gen_key_input().
2013-04-17 20:57:51 +00:00
Isis Lovecruft
a9faa376e7
Update docstring for GPG.genkey().
2013-04-17 20:54:39 +00:00
Isis Lovecruft
faf102e6ac
Remove old commented out code for keyring generation in GPG.__init__().
2013-04-17 20:53:56 +00:00
Isis Lovecruft
56131179c6
Add stub GPG.list_sigs() function.
2013-04-17 00:16:28 +00:00
Isis Lovecruft
9dc2947014
Update docstrings for GPG.decrypt() and GPG.send_keys().
2013-04-17 00:14:06 +00:00
Isis Lovecruft
961b63f958
Add explicit --no-show-photos option to GPG.list_keys() just in case.
2013-04-17 00:12:18 +00:00
Isis Lovecruft
2fb88ad6b4
Fix function verify_file() to handle detached signature files.
2013-04-16 23:09:05 +00:00
Isis Lovecruft
301fd6f89c
Clean up the logging statements in _sign_file().
2013-04-16 23:07:37 +00:00
Isis Lovecruft
70b8269aaf
Remove one of the sources of the UnicodeDecodeErrors on Python2.6.
2013-04-16 23:06:42 +00:00
Isis Lovecruft
807aa9821b
Make log statements in _copy_data() more explicit.
2013-04-16 22:45:33 +00:00
Isis Lovecruft
07310a860e
Move _make_binary_stream() to util module and update unittests.
2013-04-15 01:42:55 +00:00
Isis Lovecruft
b09adb3f19
Remove extra output handing logic in GPG.encrypt_file().
2013-04-15 01:13:47 +00:00
Isis Lovecruft
f357c16a21
Move dreb's GPGWrapper class to gnupg.py.
2013-04-15 01:12:36 +00:00
Isis Lovecruft
4a63023e4b
Update docstring for GPG.encrypt().
2013-04-15 01:11:47 +00:00
Isis Lovecruft
06a480b669
Get rid of useless inline comment.
2013-04-15 01:11:20 +00:00
Isis Lovecruft
a17b8828c1
Again, _result_map is a private attribute.
2013-04-15 01:10:33 +00:00
Isis Lovecruft
af996b8a69
Update docstring for GPG.encrypt_file().
2013-04-15 01:09:32 +00:00
Isis Lovecruft
4a719cec79
Update docstring for GPG.gen_key_input().
2013-04-15 01:08:54 +00:00
Isis Lovecruft
5f3f26f916
Refactor method GPG.gen_key().
2013-04-15 01:08:14 +00:00
Isis Lovecruft
26d8f98513
Explicitly list public keys if we didn't specify for secret ones.
2013-04-15 01:07:22 +00:00
Isis Lovecruft
1be0114847
Changes because of now-private attributes and checks moved to util.py.
2013-04-15 01:06:29 +00:00
Isis Lovecruft
acbe787847
Make _result_map attribute private.
2013-04-15 01:02:44 +00:00
Isis Lovecruft
3626132c6c
Update check in GPG.verify_file() to use util._is_file().
2013-04-15 01:01:35 +00:00
Isis Lovecruft
7555cbac3c
Update docstring for GPG.verify_file().
2013-04-15 01:01:02 +00:00
Isis Lovecruft
4383e9ac5c
Update docstring for GPG.verify().
2013-04-15 00:59:55 +00:00
Isis Lovecruft
773b7adfb8
Make _result_map a private attribute.
2013-04-15 00:59:31 +00:00
Isis Lovecruft
265c32ac47
Change keyid in _sign_file() to remove extra quoting.
2013-04-15 00:59:03 +00:00
Isis Lovecruft
2691cc8d33
Change level of two log statements.
2013-04-15 00:58:29 +00:00
Isis Lovecruft
f6e3d19826
Change GnuPG argument construction in GPG.sign() to use allowed options.
2013-04-15 00:57:42 +00:00
Isis Lovecruft
22e0443dcc
Change GPG.sign() to handle files and strings, make _sign_file() private.
2013-04-15 00:56:49 +00:00
Isis Lovecruft
6c0370efaa
Update docstrings for _read_data(), _handle_io(), and _collect_output().
2013-04-15 00:55:45 +00:00
Isis Lovecruft
d2b1ae62c2
Update docstring for GPG._read_response().
2013-04-15 00:55:06 +00:00
Isis Lovecruft
9ce776116f
Make a logger statement more explicit.
2013-04-15 00:54:25 +00:00
Isis Lovecruft
671b190a91
Update docstring for GPG._open_subprocess() and make _make_args() private.
2013-04-15 00:53:31 +00:00
Isis Lovecruft
41219d209c
Add --secret-keyring to argument list in GPG._make_args().
2013-04-15 00:52:10 +00:00
Isis Lovecruft
88a187bb06
Update docstring for GPG._make_args().
2013-04-15 00:51:23 +00:00
Isis Lovecruft
bd98bc9003
Call check util._has_readwrite() from GPG.__init__().
2013-04-15 00:50:08 +00:00
Isis Lovecruft
4d74b5703f
Remove resolved note on android locale.
2013-04-15 00:48:57 +00:00
Isis Lovecruft
8f2204f464
Don't touch non-existent pubring.gpg and secring.gpg, let GnuPG handle it.
2013-04-15 00:48:06 +00:00
Isis Lovecruft
25a10567d0
Raise a DeprecationWarning for GPG argument 'keyring'.
2013-04-15 00:47:16 +00:00
Isis Lovecruft
5f96682378
Use util._find_gpgbinary() function in GPG.__init__().
2013-04-15 00:46:32 +00:00
Isis Lovecruft
93ab899d4a
Use util._create_gpghome() function in GPG.__init__().
2013-04-15 00:45:47 +00:00
Isis Lovecruft
92d52268ba
Make gpghome default to _conf directory from util.py.
2013-04-15 00:45:17 +00:00
Isis Lovecruft
ec1a81b197
Change GPG class attributes to be private and update docstring for GPG.
2013-04-15 00:44:18 +00:00
Isis Lovecruft
3f78e119ea
Remove extra whitespace line.
2013-04-15 00:43:32 +00:00
Isis Lovecruft
273b5c8635
Make a logger statement more explicit.
2013-04-15 00:43:07 +00:00
Isis Lovecruft
0b54d68e6a
Refactor function _copy_data().
2013-04-15 00:42:39 +00:00
Isis Lovecruft
0a19ba201c
Change _py3k check to belong in util.py
2013-04-15 00:41:50 +00:00
Isis Lovecruft
a3e4cb661b
Comment out faulting assertion to debug other issues.
2013-04-15 00:41:04 +00:00
Isis Lovecruft
d0783cb398
Remove _which() from gnupg.py and add doctring for _threaded_copy_data().
2013-04-15 00:40:28 +00:00
Isis Lovecruft
48a7ad3374
Remove function _today() from gnupg.py.
2013-04-15 00:39:01 +00:00
Isis Lovecruft
a92490af2e
Remove checks from gnupg.py and add utility functions to util.py.
...
* Remove _has_readwrite()
* Remove _is_file()
* Remove _is_stream()
* Remove _is_sequence()
* Add _create_gpghome()
* Add _find_gpgbinary()
2013-04-15 00:28:22 +00:00
Isis Lovecruft
484ab3b442
Update docstring for _copy_data().
2013-04-15 00:25:28 +00:00
Isis Lovecruft
f6cd904708
Add note on android locale hack.
2013-04-15 00:23:48 +00:00
Isis Lovecruft
4cf1c698c1
Fix import statements in gnupg.py and util.py.
2013-04-15 00:22:41 +00:00
Isis Lovecruft
5a6414074b
Change __module__ level attributes.
2013-04-15 00:20:07 +00:00
Isis Lovecruft
85fc2692a5
Change how we create the pubring.gpg and secring.gpg.
2013-04-12 00:02:49 +00:00
Isis Lovecruft
d97ae0b356
Relayout module structure.
2013-04-11 23:45:22 +00:00