Commit Graph

362 Commits (a9154b25d55a451925d2604e29980ac2da71fcf0)

Author SHA1 Message Date
Isis Lovecruft 2e6d34385b
Add checks to utils.py, update docstrings.
* Add _create_gpghome()
 * Add _is_file()
 * Add _is_stream()
 * Add _is_list_or_tuple()
 * Add _today()
 * Add _which()
 * Update docstrings for methods in ListPackets.
2013-04-15 00:33:17 +00:00
Isis Lovecruft 425ca28a48
Update docstring for ListPackets class. 2013-04-15 00:31:21 +00:00
Isis Lovecruft a92490af2e
Remove checks from gnupg.py and add utility functions to util.py.
* Remove _has_readwrite()
 * Remove _is_file()
 * Remove _is_stream()
 * Remove _is_sequence()
 * Add _create_gpghome()
 * Add _find_gpgbinary()
2013-04-15 00:28:22 +00:00
Isis Lovecruft 484ab3b442
Update docstring for _copy_data(). 2013-04-15 00:25:28 +00:00
Isis Lovecruft f6cd904708
Add note on android locale hack. 2013-04-15 00:23:48 +00:00
Isis Lovecruft 4cf1c698c1
Fix import statements in gnupg.py and util.py. 2013-04-15 00:22:41 +00:00
Isis Lovecruft 5a6414074b
Change __module__ level attributes. 2013-04-15 00:20:07 +00:00
Isis Lovecruft 12a2a8fe35
Add --no-site-files to virtualenv setup lne in Makefile. 2013-04-15 00:19:08 +00:00
Isis Lovecruft c323935000
Append genkey and sign tests to Makefile command. 2013-04-15 00:18:30 +00:00
Isis Lovecruft 7a688327e9
Add __init__ files for module directories. 2013-04-15 00:16:59 +00:00
Isis Lovecruft 5b0e8bc407
Add documentation for gnupg.parsers module. 2013-04-14 09:33:11 +00:00
Isis Lovecruft c99a8cb53e
Remove autoclassing gnupg.GPG twice in the documentation. 2013-04-14 09:31:31 +00:00
Isis Lovecruft 799845c760
Remove the dash from "clean-docs" in the Makefile for tab completion. 2013-04-14 09:29:35 +00:00
Isis Lovecruft d2786b9283
Merge branch 'fix/update-packaging' into develop 2013-04-12 17:11:32 +00:00
Isis Lovecruft 85fc2692a5
Change how we create the pubring.gpg and secring.gpg. 2013-04-12 00:02:49 +00:00
Isis Lovecruft a4b8c7823f
Update Sphinx config due to directory layout change. 2013-04-12 00:02:06 +00:00
Isis Lovecruft 6f9e0b4a30
Update top-level Makefile with new directory structure. 2013-04-11 23:46:49 +00:00
Isis Lovecruft d97ae0b356
Relayout module structure. 2013-04-11 23:45:22 +00:00
Isis Lovecruft f318573e84
Removing the TODO list because we killed it. 2013-04-11 23:43:02 +00:00
Isis Lovecruft e02cfc4946
Update setup.py with new directory structure and updated tags. 2013-04-11 23:42:15 +00:00
Isis Lovecruft 22c59246b3
Merge branch 'fix/1924-mro-conflict' into develop 2013-04-11 19:12:10 +00:00
Isis Lovecruft 59951c7486
Fix potential MRO conflict in Crypt class. 2013-04-11 19:11:12 +00:00
Isis Lovecruft bd6960b123
Merge branch 'fix/2131-unittests' into develop 2013-04-11 18:42:48 +00:00
Isis Lovecruft 7ae48bdfdf
Merge branch 'feature/docs' into develop 2013-04-11 18:40:32 +00:00
Isis Lovecruft 7a48142449
Merge remote-tracking branch 'isislovecruft/develop' into develop 2013-04-11 18:40:05 +00:00
Isis Lovecruft 64fd83bf85
Add bug reporter. 2013-04-11 18:39:03 +00:00
Isis Lovecruft f68d01b9f2
Update the README. 2013-04-11 18:21:32 +00:00
Isis Lovecruft f01668fe48
Add NOTES file to docs/ directory. 2013-04-11 18:16:05 +00:00
Isis Lovecruft 134f52f523 Merge remote-tracking branch 'soledad/master' into develop
* Drebs wrote a patch to add '--list-packets' functionality to python-gnupg,
   and I would like to include it without deleting its history. This is a
   rather strange merge, however, because not only does it merge an entirely
   different repo, but also an entirely different repo of an entirely different
   project, Soledad.
 * The file we wanted was src/leap/soledad/util.py, and the commands taken to
   complete this merge were as follows:

   git clone git@github.com:isislovecruft/soledad.git soledad-copy
   cd soledad-copy
   git remote rm origin
   ## Remove the files and any history which mentions those files which are
   ## not in the src/leap/soledad directory:
   git filter-branch --subdirectory-filter src/leap/soledad -- --all
   ## Then do the same for every file and subdirectory which is not util.py:
   git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch \
       src/leap/soledad/__init__.py' HEAD
   git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch \
       src/leap/soledad/server.py' HEAD
   git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch \
       src/leap/soledad/shared_db' HEAD
   git filter-branch -f --index-filter 'git rm -r --cached --ignore-unmatch \
       src/leap/soledad/tests' HEAD
   git filter-branch -f --index-filter 'git rm -r --cached --ignore-unmatch \
       src/leap/soledad/backends' HEAD
   cd ..
   git clone git@github.com:isislovecruft/python-gnupg.git python-gnupg-copy
   cd python-gnupg-copy
   git remote add soledad ../soledad-copy
   git fetch soledad
   git checkout develop
   git merge -S --no-ff soledad/master
2013-04-11 06:50:34 +00:00
Isis Lovecruft f65618bd83
Remove unused function _underscore(). 2013-04-10 22:44:10 +00:00
Isis Lovecruft 3152784ada
Merge branch 'fix/2162-stream-check' into develop 2013-04-10 22:00:09 +00:00
Isis Lovecruft 58de4c6c21
Make a logger statement more explicit. 2013-04-10 21:58:56 +00:00
Isis Lovecruft 0ae817e3b8
Update _sanitise() docstring with information on return object. 2013-04-10 21:56:55 +00:00
Isis Lovecruft 32c6c1b3ed Lower key length and fix expiry date in test_invalid_key_type(). 2013-04-10 21:49:44 +00:00
Isis Lovecruft 0fcf9676b3 Add checks to test_gen_key_input(). 2013-04-10 21:49:44 +00:00
Isis Lovecruft a873c1172a Default the key length for batch files to 4096. 2013-04-10 21:49:44 +00:00
Isis Lovecruft c47968c47a Fix unittest to check for secret keyring. 2013-04-10 21:49:44 +00:00
Isis Lovecruft febabccbda Pep8'ing the docstrings again. 2013-04-10 21:49:44 +00:00
Isis Lovecruft 38cc813412 Rearrange the logic on checking safe_values so that None is skipped. 2013-04-10 21:49:44 +00:00
Isis Lovecruft dd25c3742a Remove some extraneous log statements, make others more explicit. 2013-04-10 21:49:44 +00:00
Isis Lovecruft 582a17beb8 Remove a comment about pre-Python2.6 compatibility, since we don't care. 2013-04-10 21:49:44 +00:00
Isis Lovecruft 0ce277a367 Add options '--list-secret-keys' and '--fixed-list-mode' to _is_allowed(). 2013-04-10 21:49:44 +00:00
Isis Lovecruft d861b36305 Fix #2162 add stream check. 2013-04-10 21:49:44 +00:00
Isis Lovecruft 00e94d6b34
Hack around the nasty ctb=%d.02 GnuPG bug that keeps resurfacing.
* https://bugs.g10code.com/gnupg/issue1179

 * This bug has resurfaced several times in GnuPG's history, and as far as I've
   understood it, it is due to a generation or an attempt at parsing a .gpg
   file (a message/file, or one of the keyrings) which is generated/formatted
   such that the GnuPG data packets comprise a certain number of bytes (562
   bytes precisely) and/or the demarcation signal (two equal signs, '==') of
   the trailing ctb (I assume 'ctb' stands for cipher text bytes; it's
   everywhere in GnuPG's sourcecode) CRC checksum ends up on its own line, like
   so:

        -----BEGIN PGP MESSAGE-----

        hQIMA1DJjYe0ARAPAQ/6A7PWiyfiBIpbJ7+XbaptYPB0muoi3rXF4cuIXU37uDug
        04Cck+8u9hcMjhYd0pN6zJMJLO8CUOdUKJblpxPSYc7yanJDc33n1jsdkr7XNbbz
        Xjh1z3EJZPhhp3YE7lqgnTTXQsGUihnhwiQqsuNgCVZfSwXpVFa+IHC+/AXhAPLl
        /BoY6+YOupD8G4bOUCU/XBvQp8uH9kh9n9101+6SopJ94H354X0PtZJs5BISCW7g
        /tUxAqxLesDaZkHF91HL7AJE8+/pheTc8vHGP+Zu8/Q5Lr+GW2cUrCXXxUV/xRIh
        P7t7WDdU5V1BXyughEBP7Jwr8G3llKr42ZRVgvOyFIe+sMVibq2dEhxJr/sjR0j6
        lYws+tZVWbmuxOnMDCjgIaEverU0nnd1SqQ/tS7yFh8lpBfMay2IdVVh+Bi3zDeT
        Kb/h3tCjG0++h5FuG8UBWv13LRlfcF817ShnwoG80y4cESgCXxZGkd9DRExH8wy8
        VJpIaVKiaZs5jlHLHX4JWy2IVmEvk/6xwZZwrNV4sGYzDGkxHLyTUUQu/NOkCtAb
        2Zs9mGrtsSGSoP6lfKDk9hh8fJtPGxGzIezVR9WXYKeYAfGZOzMI1Ji1jF1fO21G
        KqTaF2WnWfaWmsuICTiBntgNntZRsXwmMNkcBt5LVK8uRpWQqIQmAkN4vl6SgovS
        QAHrC6D9mUmoNvKcS71aH4uZjkfYtNmgp8i5cmTP6UaGouVeqzDCtK/vIy1V/iaX
        89vcdsILlMMVB/10Rtscyus
        ==suET
        -----END PGP MESSAGE-----

    When this happens, GnuPG *stops* parsing entirely before the CRC checksum
    following the '==', and thus the next time it starts parsing again the
    first thing it gets is the end header '-----END PGP MESSAGE-----'.

 * My solution for hacking around this is to export directly to a keyring,
   which can either be one we create for this purpose, or the keyring set as
   self.pubring. I do not know yet if this will affect --list-keys.
2013-04-10 21:49:35 +00:00
Isis Lovecruft dc0d9cf70b
Update docstring for GPG.gen_key_input() with details on batch file syntax. 2013-04-10 19:16:58 +00:00
Isis Lovecruft 24da4d186c
Factor out unnecessary parsing for the presence of the passphrase fd. 2013-04-10 19:15:43 +00:00
Isis Lovecruft c96aed31ed
Add function for getting a string of today's date in %Y-%m-%d format. 2013-04-10 19:14:48 +00:00
Isis Lovecruft 8c6821ea0e
Remove log statement entirely because otherwise it's triplicate. 2013-04-10 18:03:52 +00:00
Isis Lovecruft b8ce529638
Remove duplicate log statement of the GnuPG command we're running. 2013-04-10 18:00:00 +00:00
Isis Lovecruft 525ebf71ef
Merge branch 'fix/update-packaging' into develop 2013-04-10 17:52:05 +00:00