Commit Graph

179 Commits (c4cf7db682230d32777b5ea2e4313a3012c4fe29)

Author SHA1 Message Date
Isis Lovecruft 1a38d786a3
Fix unittest import_with_colons to use key dict. 2013-07-02 09:14:56 +00:00
Isis Lovecruft b3decd7b73
Add imports specific to running unittests after an installation. 2013-07-02 09:13:58 +00:00
Isis Lovecruft ab54c7b71e
Make detached binary sig unittest test what it's supposed to. 2013-07-02 07:17:51 +00:00
Isis Lovecruft 0ca6352457
Add check on recv-key size after writing it to a file. 2013-07-02 07:15:31 +00:00
Isis Lovecruft db4826f815
Fix an error in a unittest due to attempt to write class obj, not str form. 2013-07-02 07:14:48 +00:00
Isis Lovecruft ea8c2c5e1f
Ugh. Change the unittest paths again. 2013-07-02 07:14:21 +00:00
Isis Lovecruft f2cfd3f04b
Merge branch 'develop' into feature/module-layout
Conflicts:
	gnupg/_parsers.py
2013-07-02 01:26:35 +00:00
Isis Lovecruft e8062c95aa
Fix variable names in unittest: pubring→keyring. 2013-07-02 00:55:53 +00:00
Isis Lovecruft e18e10edd1
Add a debug statement to a unittest when we've downloaded a key. 2013-07-02 00:55:26 +00:00
Isis Lovecruft 3b7457ae74
Remove a print statement from a unittest. 2013-07-02 00:43:54 +00:00
Isis Lovecruft 6cf7640c5c
Fix whitespace formatting for a line in gnupg/tests/test_gnupg.py. 2013-07-02 00:43:12 +00:00
Isis Lovecruft 12b1de719a
Update paths in unittests to disregard the installed directory. 2013-07-02 00:42:17 +00:00
Isis Lovecruft d7a0ffb395
Move tests/* → gnupg/test/* 2013-06-28 13:13:27 +00:00
Isis Lovecruft f11ea6901c
Set gpg.temp_[key|sec]ring to None after setting key.[key|sec]ring.
* Change the returned _parsers.GenKey from gnupg.GPG.gen_key() to store the
   location of the renamed temporary keyrings as attributes. This way, one can
   do something like:

   >>> key = gpg.gen_key(key_input)
   >>> key.keyring
   './generated-keys/328A5C6C1B2F0891125ECBE4624276B5A2296478.pubring.gpg'
2013-06-28 07:09:35 +00:00
Isis Lovecruft 8232f14f2a
Remove commented out code from GPG.gen_key() for import after generation.
* Generated keys in separate keyring would not be available after switching
   back to the normal keyrings (not the ones set up for key generation), so at
   first in the unittests I imported them back into the main keyrings… this,
   however, is would be stupid, as in nullifies half the reasons for using
   separate keyrings in the first place, thus the code was commented out. Now
   that the temporary keyrings are placed in the gnupg.GPG._generated_keys
   directory, it would be nice to eventually either extend GPG.import_keys()
   or add a new helper function for doing:

       $ gpg --no-default-keyring --keyring pubring.gpg \
            --keyring ./generated-keys/<some_fingerprint>.gpg
2013-06-28 06:44:52 +00:00
Isis Lovecruft 9008faa0db
Fix a misnamed variable in gnupg.py; self._key_dir→self._keys_dir 2013-06-28 06:42:42 +00:00
Isis Lovecruft 603379eb37
Change _copy_data() error handling to explain errors not due to broken pipes. 2013-06-28 06:40:09 +00:00
Isis Lovecruft 328e8fcbe0
Add a 'generated-keys' subdirectory to gnupg.GPG.homedir.
* Add GPG._generated_keys as an _utils.InheritableProperty class for storing
   a configurable (even by subclasses of GPGBase, without property overrides)
   subdirectory of whichever directory gnupg.GPG.homedir is set to. This
   subdirectory can be used via the 'separate_keyring=True' option to
   gnupg.GPG.gen_key_input(), which will switch temporarily to new pubring.gpg
   and secring.gpg keyrings during key creation, and upon finishing creation
   of the new key, will ask for the new key's fingerprint, and move the
   keyrings into this GPG._generated_keys directory, renamed in the format
   "<GPG.homedir>/<GPG._generated_keys>/<fingerprint>.[pub|sec]ring.gpg".
2013-06-28 06:29:38 +00:00
Isis Lovecruft 9d5cdb8854
Fix upstream issue #62, handle expired keys.
* see https://code.google.com/p/python-gnupg/issues/detail?id=62
2013-06-28 02:31:37 +00:00
Isis Lovecruft d129ed5b17
Add _parsers.GenKey.secring and _parsers.GenKey.keyring attributes and docs. 2013-06-28 02:30:57 +00:00
Isis Lovecruft f996bf9e31
Update _parsers._sanitise_list() documentation. 2013-06-28 02:30:20 +00:00
Isis Lovecruft 4fcfef1bde
Add _parsers._is_string() function, and change _sanitise() to use it. 2013-06-28 02:29:36 +00:00
Isis Lovecruft 4871e9e038
Move allowed_options into separate groups in their own functions. 2013-06-28 02:28:29 +00:00
Isis Lovecruft 9b9e441dd7
Update function docs for _parsers._is_allowed() function. 2013-06-28 01:44:04 +00:00
Isis Lovecruft 1e03011296
Remove unnecessary comment, there is now a unittest for this condition. 2013-06-28 01:42:05 +00:00
Isis Lovecruft e1139c7e37
Remove commented out code from _util._copy_data(). 2013-06-09 08:36:22 +00:00
Isis Lovecruft bcaa26685b
Change several imports for installed modules to be absolute in _meta.py. 2013-06-09 08:35:17 +00:00
Isis Lovecruft a707a50c31
Update test directory shortcut in gnupg/_logger.py. 2013-06-09 08:34:15 +00:00
Isis Lovecruft ceb38fdefe
Change directory shortcuts in gnupg._util.py module. 2013-06-09 08:33:30 +00:00
Isis Lovecruft 1afcda8364
Fix a misnamed process thread variable. 2013-06-09 08:25:34 +00:00
Isis Lovecruft 295d98fbdc
GPG.encrypt_file()→GPGBase.encrypt() and fix doctests and documentation. 2013-06-04 01:42:07 +00:00
Isis Lovecruft 785b2760bb
Move GPG._sign_file() to GPGBase since it's never called directly. 2013-06-03 21:34:39 +00:00
Isis Lovecruft 042d52a75f
Move source files to directory named for top-level package. 2013-06-03 21:16:19 +00:00
Isis Lovecruft c97b51fec5
Add versioneer and restructure the repo into a src/ dir. 2013-05-12 09:32:46 +00:00
Isis Lovecruft 25637ef50e
PEP-8ify a couple lines that were running off the screen.
* Also, change a logger string to say 'GnuPG' instead of the binary's name
   'gpg'.
2013-05-11 18:34:28 +00:00
Isis Lovecruft e3eb7eea0c
Fix an old-style class. 2013-05-11 18:33:39 +00:00
Isis Lovecruft 2700b3c338
Return the result of a encryption or decryption operation without *.data 2013-05-11 18:32:18 +00:00
Isis Lovecruft e5ac938486
Add hastily written check_preferences().
* TODO I sleepily realised two lines before the end of bashing this out that
   it should just be a set difference.
2013-05-11 18:30:22 +00:00
Isis Lovecruft 4258900368
Fix a bug which caused result_map['crypt'] to expect a Verify(). 2013-05-11 18:28:47 +00:00
Isis Lovecruft 0785d7dd3b
Various docstring and whitespace fixes in parsers.py. 2013-05-11 18:28:04 +00:00
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 ae0ab0a7c7
WHO PUTS UNITTESTS IN A TRY/EXCEPT BLOCK WHICH CATCHES ALL EXCEPTIONS?!
* WHAT WAS THE POINT OF WRITING THE UNITTEST IF IT ALWAYS PASSES?
2013-05-11 18:22:50 +00:00
Isis Lovecruft 347cecb9f2
Add unittests for multiparty file en/decryption and symmetric en/decryption. 2013-05-11 18:22:07 +00:00
Isis Lovecruft 23b3315c45
Remove old logger statements and comments. 2013-05-11 18:20:49 +00:00
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