Commit Graph

334 Commits (adaf53c2561a99e83502e19e13d8923281a67d29)

Author SHA1 Message Date
Isis Lovecruft adaf53c256
Fix a call in a unittest to _make_binary_stream() to call the correct module. 2013-05-11 08:55:47 +00:00
Isis Lovecruft 79bf77a185
Update test_import_and_export() unittest with newer key generation utility. 2013-05-11 08:54:17 +00:00
Isis Lovecruft 6c87679e7e
Fix a bug in two unittests caused by a method not having been renamed. 2013-05-11 08:53:12 +00:00
Isis Lovecruft ed2bc4d882
Split the old test_encryption_and_decryption() up into several smaller tests. 2013-05-11 08:51:48 +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 863ad194a5
Cleanup indentation style a bit. 2013-05-11 08:48:39 +00:00
Isis Lovecruft b562a346ff
Fix typo in docstring. 2013-05-11 08:48:12 +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 58300c3149
Enable all tests in the Makefile.
* To run tests, it is necessary -- due to the module structure -- to do:
       $ make uninstall && make install && make test
   which is recommended to do in a virtualenv, or similar such isolated testing
   environment.
2013-05-10 09:34:46 +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 ce323251ed
Fix a bug due to the _py3k check being moved to the utils module. 2013-05-09 19:14:52 +00:00
Isis Lovecruft d6ac61cc81
Merge branch 'fix/2184-twisted-license' into develop 2013-04-21 08:26:44 +00:00
Isis Lovecruft 85c1cbc0c8
Fix #2184, add twisted copyright info for the util._which() function. 2013-04-21 08:25:07 +00:00
Isis Lovecruft fd6dbe71b6
Merge branch 'feature/cleanup-api' into develop 2013-04-17 23:52:10 +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 72b2d9058e
Fix missing method calls in unittest for GPG.list_keys(). 2013-04-17 22:42:38 +00:00
Isis Lovecruft 0801492eaf
Add unittest for _copy_data(). 2013-04-17 22:42:31 +00:00
Isis Lovecruft 4e79a29cea
Fix the super() calls in ResultStringIO in unittest script. 2013-04-17 22:39:59 +00:00
Isis Lovecruft b183f6984a
Add listkeys tests to Makefile command. 2013-04-17 22:38:07 +00:00
Isis Lovecruft debe70723b
We don't have a default Name-Comment in gen_key anymore, so change unittest. 2013-04-17 21:04:26 +00:00
Isis Lovecruft aba04d5803
Only create one test directory while running unittests. 2013-04-17 21:03:44 +00:00
Isis Lovecruft c53be427ca
Remove unused code from the unittest runner. 2013-04-17 21:02:43 +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 4706932275
Merge branch 'fix/2131-unittests' into develop 2013-04-17 00:37:39 +00:00
Isis Lovecruft f76fa59827
Add parsers.py tests to the "make tests" command in the Makefile. 2013-04-17 00:16:59 +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 8dcf49fa95
Catch OSErrors and IOErrors also in util._is_file if input does not exist. 2013-04-17 00:10:52 +00:00
Isis Lovecruft 0b9ee78d20
Add tests for detached signature verification. 2013-04-17 00:09:45 +00:00
Isis Lovecruft 1a0d27636b
More string shuffling. 2013-04-17 00:09:21 +00:00
Isis Lovecruft f369f2e822
Add the cypherpunk manifesto as a lorem ipsum dolor for unittests. 2013-04-17 00:00:47 +00:00
Isis Lovecruft e631272ce6
Fix unittest for checking that signing a file works. 2013-04-16 23:59:29 +00:00
Isis Lovecruft 7ff7807068
Some trivial string and docstring changes. 2013-04-16 23:58:32 +00:00
Isis Lovecruft 4b45fede16
Add unittests for parsers._fix_unsafe() and parsers._is_hex().
* The _fix_unsafe() unittest proves that the original vulnerability in
   GPG._open_subprocess(..., shell=True, ...) is handled correctly.
2013-04-16 23:54:23 +00:00
Isis Lovecruft d5985ddd87
Add check in signature string verfication unittest for signature timestamps. 2013-04-16 23:52:26 +00:00
Isis Lovecruft f325e735f9
Add a missing underscore to a call to gpg.decode_errors in Sign(). 2013-04-16 23:44:36 +00:00
Isis Lovecruft 1d0853f023
Remove excess whitespace. 2013-04-16 23:44:20 +00:00
Isis Lovecruft 59b7e99465
Fix another bug which was raising UnicodeDecodeErrors due to no encoding found. 2013-04-16 23:13:52 +00:00