Commit Graph

779 Commits (17faf6ac4f2d19a4398c0f45c395284c58f57a4d)

Author SHA1 Message Date
Isis Lovecruft 8d1e8c71ce
Only import the things we need in test_gnupg.py. 2013-05-29 13:14:13 +00:00
Isis Lovecruft 0dc545e51f
Switch to using distribute instead of setuptools due to projects merging. 2013-05-28 14:14:52 +00:00
Isis Lovecruft 494592a6ac
Add headers to setup.py. 2013-05-28 12:44:52 +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 c4fd9e52e5
Merge branch 'master' into develop 2013-05-27 14:58:15 +00:00
Isis Lovecruft 56a0928a4f
Merge branch 'release-1.0.0' 2013-05-27 14:39:13 +00:00
Isis Lovecruft 5925657017
Add another placeholder logfile to Makefile. 2013-05-27 13:52:23 +00:00
Isis Lovecruft 5d0d9f7356
Tell versioneer that the tag prefix is blank, to use gitflow standards. 2013-05-27 12:49:53 +00:00
Isis Lovecruft caad587a0d
Remove old Makefile commands. 2013-05-27 12:41:07 +00:00
Isis Lovecruft e344aa182f
Add commands to report python, gpg, and gpg2 versions before test runs. 2013-05-27 12:36:17 +00:00
Isis Lovecruft ffec019f35
Add cleanup-tests-all command to Makefile to remove tests/tmp.
* This command should be separate in case we've specified to save keys
   generated during tests.
2013-05-27 12:35:05 +00:00
Isis Lovecruft 6866bcf94a
Merge branch 'fix/delete-keys' into develop 2013-05-27 10:08:57 +00:00
Isis Lovecruft 235bcf18b4
Add binary keyring and random_seed files to .gitignore. 2013-05-27 10:06:33 +00:00
Isis Lovecruft af5e67aa91
Add docs/DETAILS, from git://git.gnupg.org/gnupg.git branch 'STABLE-BRANCH-2-0' 2013-05-27 09:39:31 +00:00
Isis Lovecruft 077773cb73
Add line to .gitignore for keys generated during unittests. 2013-05-27 09:38:41 +00:00
Isis Lovecruft 73cfafbbdf
Remove a pdb tracepoint now that all the unittests pass. :) 2013-05-27 09:35:06 +00:00
Isis Lovecruft 613f59eeff
test_decryption_multi_recipient→test_encryption_decryption_multi_recipient 2013-05-27 09:33:52 +00:00
Isis Lovecruft 87536c194e
Rewrite unittest for file encryption and decryption. 2013-05-27 09:33:24 +00:00
Isis Lovecruft fa57bc6158
Change unittest for symmetric encryption to include correct boolean options. 2013-05-27 09:30:05 +00:00
Isis Lovecruft 690b0efc76
Rewrite unittest for encryption/decryption to multi recipients. 2013-05-27 09:28:18 +00:00
Isis Lovecruft c1fb532c53
Change unittest, recipients doesn't need to be list, and data should be string. 2013-05-27 09:25:34 +00:00
Isis Lovecruft 622544ef13
Rewrite test_encryption_multi_recipient to also test separate keyrings option. 2013-05-27 09:23:32 +00:00
Isis Lovecruft 348c5b59fb
If setting Key-Length, also set Subkey-Length, else GnuPG defaults to 1024. 2013-05-27 09:20:51 +00:00
Isis Lovecruft 70ceb50744
Fix a unittest so that the data returned is a human readable string. 2013-05-27 09:18:13 +00:00
Isis Lovecruft c4ab6bd5d6
Change unittest, recipients don't need to be lists/tuples. 2013-05-27 09:17:27 +00:00
Isis Lovecruft 2c577466c3
Add two helpful debug statements, remove two superfluous asserts from unittest. 2013-05-27 09:14:38 +00:00
Isis Lovecruft a9ea5a1e48
Change unittest because recipients don't needs to be lists/tuples anymore. 2013-05-27 09:13:55 +00:00
Isis Lovecruft dad755ec3a
Awkwardly, fingerprints need to always be strings. Change unittests to do so. 2013-05-27 09:13:04 +00:00
Isis Lovecruft 611184f242
Add '--no-options' to unittest on _make_options() output. 2013-05-27 09:09:32 +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 a0e1d4db6e
Add a utility for getting the current UTC seconds-since-epoch time. 2013-05-27 08:14:08 +00:00
Isis Lovecruft 50b057918b
Change line to check multiple types in the same isinstance() call. 2013-05-27 08:13:27 +00:00
Isis Lovecruft bf591c2dd0
Add a utility for creating a 'user@hostname' string. 2013-05-27 08:12:54 +00:00
Isis Lovecruft cce8785f39
Slice equiv. bytes from strings as we read() from file handles in _copy_data(). 2013-05-27 07:50:36 +00:00
Isis Lovecruft e252f63341
Switch to calling a bound super on Crypt for handle_status() method again. 2013-05-27 07:49:10 +00:00