Commit Graph

29 Commits (b76bf502c9227194fd1a204aaa1b1f8d8e9ad6bf)

Author SHA1 Message Date
Isis Lovecruft b76bf502c9
Add better unittests for homedir and keyring creation. 2013-05-11 18:19:59 +00:00
Isis Lovecruft f06c2d7396
Cleanup docstring for GPGTestCase.setUpClass(). 2013-05-11 18:19:04 +00:00
Isis Lovecruft 2a92e3f10b
Since we use '--no-emit-version', we don't need this anymore. 2013-05-11 18:18:18 +00:00
Isis Lovecruft d38efaffbc
Use proper tempfile isolation of GnuPG homedirs in unittests. 2013-05-11 18:17:22 +00:00
Isis Lovecruft 14ffe14569
Add a unittest and a fix for hexidecimal inputs with lowercase. 2013-05-11 18:16:18 +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 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 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 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 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 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 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 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 07310a860e
Move _make_binary_stream() to util module and update unittests. 2013-04-15 01:42:55 +00:00
Isis Lovecruft 998a9b8f88
Update and add new uniitests. 2013-04-15 01:29:44 +00:00
Isis Lovecruft aaa492b75b
Update assertions and docstrings for unittests. 2013-04-15 01:28:25 +00:00
Isis Lovecruft d97ae0b356
Relayout module structure. 2013-04-11 23:45:22 +00:00