Commit Graph

89 Commits (ca28c1a4d202ce67168f29f35c3fd73d4af3289f)

Author SHA1 Message Date
Isis Lovecruft ca28c1a4d2
Remove a kwarg from GPG.__init__() since properties are settable in child cls. 2013-06-03 11:33:44 +00:00
Isis Lovecruft eb1967600e
Remove unnecessary io.BytesIO import from gnupg module. 2013-06-03 11:33:05 +00:00
Isis Lovecruft 36a6bf712a
Switch to using py3k absolute imports in gnupg module. 2013-06-03 11:32:25 +00:00
Isis Lovecruft dbb8e395cc
Use the copyleft.authors objects in module documentation for gnupg. 2013-06-03 11:31:21 +00:00
Isis Lovecruft c683ef31c2
Move old documentation to Sphinx rest file at the end.
* It seems annoying to have a bunch of licensing and history lessons as the
   first thing you read when you look at the documentation. Rather, the first
   thing you see should be how to install it and use it.
2013-05-26 14:04:33 +00:00
Isis Lovecruft 694ae87410
sign_with → default_key. Also, deduplicate code. 2013-05-28 11:00:13 +00:00
Isis Lovecruft 6a47c3cd77
Move several methods and attributes from GPG to GPGBase.
* Move _decode_errors
 * Move _result_map
 * Move _copy_data()
 * Move _read_data()
 * Move _read_response()
 * Move _make_args()
 * Move _open_subprocess()
 * Move _collect_output()
 * Move _handle_io()
2013-05-28 10:12:01 +00:00
Isis Lovecruft 8e2f905859
handle_status() → _handle_status() in _parsers.py and gnupg.py. 2013-05-28 09:24:06 +00:00
Isis Lovecruft 87ced52f85
GPG.encoding → GPG._encoding 2013-05-28 08:48:36 +00:00
Isis Lovecruft 08bbfb3a68
Fix several missing 's's in doctest calls to GPG(homedir='./tests/doctests'). 2013-05-28 08:37:46 +00:00
Isis Lovecruft 4c1d7599bd
Remove duplicate code from GPGWrapper. 2013-05-28 07:41:32 +00:00
Isis Lovecruft 18f527c514
Add a missing colon in an attribute autodoc comment. 2013-05-28 07:40:55 +00:00
Isis Lovecruft 6f5c7fb610
Split imports in gnupg.py to one-per-line. 2013-05-28 07:40:32 +00:00
Isis Lovecruft bdd08fb31f
Remove GPGMeta and GPGBase specific imports from gnupg.py. 2013-05-28 07:39:02 +00:00
Isis Lovecruft a95a49e04a
Move GPGMeta and GPGBase to _meta.py. 2013-05-28 07:35:15 +00:00
Isis Lovecruft ecd8faa425
Move re import to GPGWrapper class, it isn't used anywhere else. 2013-05-28 07:33:38 +00:00
Isis Lovecruft 72ef15f5a4
Remove unused logging and tempfile imports from gnupg.py. 2013-05-28 07:32:35 +00:00
Isis Lovecruft 6f9c4c7423
Remove commented out code and unused pprint import. 2013-05-28 07:31:04 +00:00
Isis Lovecruft fd85cb8f5c Remove commented out _init_decorator() from GPGMeta class. 2013-05-28 07:22:01 +00:00
Isis Lovecruft 2be8cb1fe6 Fix error in module docstring which had the wrong version we forked from. 2013-05-28 07:21:14 +00:00
Isis Lovecruft 490574c3ec
Change variable name file→filename in GPG.decrypt_file(). 2013-05-27 09:08:49 +00:00
Isis Lovecruft 688ceb9a6d
Change parameter name data→message in GPG.decrypt(). 2013-05-27 09:08:26 +00:00
Isis Lovecruft bfbb189459
GPG.encrypt() should now be called with each recipient as a single parameter. 2013-05-27 09:04:15 +00:00
Isis Lovecruft 7c9c00a957
Rewrite encrypt_file() to handle unicode/str, fn/files, and multi recipients. 2013-05-27 09:01:48 +00:00
Isis Lovecruft 8b355d5541
Update docstring for GPG.encrypt_file() with new parameter type requirements.
* GPG.encrypt_file() isn't ever directly used now, and so we should switch to
   calling it in the same way that GPG._sign_file() is now called when
   necessary though GPG.sign().
2013-05-27 08:59:10 +00:00
Isis Lovecruft 897f32307e
Make the kwargs for GPG.encrypt_file() appear slightly less overwhelming. 2013-05-27 08:53:18 +00:00
Isis Lovecruft b6076a7f65
Add support for using separate keyrings during key generation.
* If GPG.gen_key_input() is called with 'separate_keyring = True', then a
   unique temporary keyring filename will be created in the format:

       username@hostname_timestamp.[pub|sec]ring

   where the timestamp is an integer representing seconds since epoch for
   UTC. The filename for the two temporary keyrings are stored in the class
   attribute GPG.temp_keyring and GPG.temp_secring, so that when GPG.gen_key()
   is called with results of GPG.gen_key_input([...], separate_keyring=True),
   the keys are created using the temporary keyrings, which are then renamed
   to:

       fingerprint.[pub|sec]ring

   where fingerprint is the fingerprint of the key which has just been
   generated. The attributes GPG.temp_keyring and GPG.temp_secring are then
   both reset to None, so that these attributes, if the hold anything, only
   hold the filenames for the last call to GPG.gen_key_input().

 * I didn't especially want to add new features right now, but this turned out
   to be necessary for cases where we want to generate a bunch of keys and
   then use them right away. Without doing this, it would have been necessary
   to store the results of the freshly generated key in memory and then write
   them to a file by hand, which proved to be rather volatile and error-prone,
   as none of the unittests for encryption/decryption for multiple recipients
   were passing, nor had ever passed. (A note again on the latter: upstream's
   unittests for encryption and decryption are entirely encased in try/except
   blocks which CATCH ALL ERRORS. Qu'est-que fuck is the point of a unittest
   if it catches all errors?)
2013-05-27 08:47:17 +00:00
Isis Lovecruft ea58623e75
Fix doctest for GPG.recv_keys(). 2013-05-27 08:23:35 +00:00
Isis Lovecruft 3516431da9
Comment out the pretty printing of results for GPG.import_key() for now. 2013-05-27 08:22:35 +00:00
Isis Lovecruft eb93fd48de
Fix doctest for GPG.import_key(). 2013-05-27 08:22:00 +00:00
Isis Lovecruft 434a650799
Change ivar name p→proc. 2013-05-27 08:21:25 +00:00
Isis Lovecruft de36fe52d1
Change varable name keyid→default_key. 2013-05-27 08:20:27 +00:00
Isis Lovecruft 77bb8d8500
Make GPG._make_args() shorter and prettier. 2013-05-27 08:16:35 +00:00
Isis Lovecruft e501afb6a7
Add initialization of GPG.temp_keyring and GPG.temp_secring objects. 2013-05-27 08:15:50 +00:00
Isis Lovecruft 1dfadbf32f
Remove excessive log statement. 2013-05-27 08:15:10 +00:00
Isis Lovecruft efc10b6791
Remove unused import for socket module. 2013-05-27 08:14:52 +00:00
Isis Lovecruft 4c67e45759
Add batch file save functionality, including creating a README in that dir. 2013-05-23 08:56:20 +00:00
Isis Lovecruft 0921ca7a2b
If Key-Type is 'default', force 'Subkey-Type' to also be 'default'. 2013-05-23 08:54:05 +00:00
Isis Lovecruft 9e5bdafffa
Remove excess EOL whitespace. 2013-05-23 08:52:18 +00:00
Isis Lovecruft 22aa8d2ee1
Add a parameter to GPG.gen_key_input for saving batch files. 2013-05-23 08:49:27 +00:00
Isis Lovecruft 51e2b33265
Add .../homedir/batch-files and .../homedir/generated-keys directories. 2013-05-23 08:47:47 +00:00
Isis Lovecruft 8afd189d36
InheritablePropery→_util.InheritableProperty 2013-05-23 07:06:11 +00:00
Isis Lovecruft c7a4845ce4
Also get set GPG.filesystemencoding in case we have to save a file. 2013-05-23 07:05:14 +00:00
Isis Lovecruft 55ca5487bb
Change sign/sign_with param in GPG.encrypt* to be named 'default_key'. 2013-05-23 05:15:22 +00:00
Isis Lovecruft b50e91bd5e
Remove two extra functions from GPGWrapper class. 2013-05-22 17:58:22 +00:00
Isis Lovecruft 5578f130b8
Update docs for GPG.gen_key_input(). 2013-05-22 17:09:02 +00:00
Isis Lovecruft b6797d6a47
Replace old doctest in GPG.gen_key_input(). 2013-05-22 17:06:48 +00:00
Isis Lovecruft 352668b7af
Use codecs.open() in gnupg.py. 2013-05-22 17:05:46 +00:00
Isis Lovecruft 9437604c71
Add list-sigs implementation 2013-05-22 17:05:17 +00:00
Isis Lovecruft 716d2f1d4e
Remove extra whitespace line. 2013-05-21 22:47:12 +00:00