Commit Graph

984 Commits (d66b23b896851ebd0682d2f2f4627b075262f962)

Author SHA1 Message Date
Isis Lovecruft ffb1aeace5
Merge branch 'master' into develop 2013-12-03 11:36:59 +00:00
Isis Lovecruft 7b2c5dc9db
Merge branch 'release/1.2.4' 2013-12-03 11:36:33 +00:00
Isis Lovecruft 5006cd95e5
Merge branch 'hotfix/pin-psutil-version' into develop 2013-12-03 11:22:53 +00:00
Isis Lovecruft b032399705
Add additional setup.cfg [upload_docs] parameters. 2013-12-03 11:22:10 +00:00
Isis Lovecruft ce30d9a1ae
Update setup.py to use dependency links from requirements.txt. 2013-12-03 11:21:37 +00:00
Isis Lovecruft aa3ff37a2b
Add Makefile commands for creating zipped doc builds. 2013-12-03 11:20:32 +00:00
Isis Lovecruft 96c3ee97f9
Fix Sphinx build failing due to missing psutil import. 2013-12-03 10:54:13 +00:00
Isis Lovecruft c01bd9556e
Merge branch 'hotfix/pin-psutil-version' into develop 2013-12-03 06:48:58 +00:00
Isis Lovecruft 83f37272b3
Pin psutil==1.2.1 and add a SHA-256 hash for peep.
See https://pypi.python.org/pypi/peep/ for a pip wrapper which pins packages
by hash digest in a requirements.txt file.
2013-12-03 06:43:03 +00:00
Isis Lovecruft b1bc36e718
Merge remote-tracking branch 'drebs/bug/fix-os.getresuid-not-supported-on-os-x' into develop 2013-12-02 23:30:02 +00:00
Isis Lovecruft bece5d92d1
Merge branch 'hotfix/GPGBase-homedirsetter-docstring' into develop 2013-12-02 08:47:07 +00:00
Isis Lovecruft 98dd681300
Merge branch 'hotfix/inheritable-property-whitespace' into develop 2013-12-02 08:46:32 +00:00
Isis Lovecruft 33c905ed0f
Fix whitespace indentation levels in _util.InheritableProperty class. 2013-12-02 08:44:31 +00:00
Isis Lovecruft 15f83fe508
Fix GPGBase._homedir_setting docstring parameter name. 2013-12-02 07:45:59 +00:00
Les Aker 4dccc94d24 If given an absolute path, use it 2013-11-21 21:02:35 -05:00
Chris Ward a1c104541c py2.6 compatability; fallback to trying ordereddict.OrderedDict if collections.OrderedDict is not available 2013-11-21 15:06:36 +01:00
Thomas Tanner b0dc01b608 remove print statements in logger 2013-11-17 14:45:22 +01:00
Thomas Tanner fa8216e1f7 bugfix: find default_key in sign 2013-11-12 12:14:56 +01:00
Thomas Tanner 580a5429f9 allow symlinks for the binary and resolve them 2013-11-12 09:42:46 +01:00
drebs 2f60144ad9 Fix validation of --verify argument using detached sig. 2013-10-24 18:05:18 -02:00
drebs 2c0c826c0f Fix gpg binary path validation. 2013-10-24 18:04:30 -02:00
drebs 678d36ea62 Fix path creation. 2013-10-14 17:09:09 -03:00
drebs e6944488fb Replace os.getresuid() so it works on Mac OS X. 2013-10-14 14:35:01 -03:00
Kali Kaneko e5351cfe95 remove docs/_static folder.
It was giving troubles with debian dh_sphinxdoc, due
to an old, unrecognized version of jquery being there that
could not be symlinked to the js-sphinxdoc version.
2013-10-14 02:49:30 -03:00
Kali Kaneko 91febabd32 add docs/_build to gitignore 2013-10-14 01:24:23 -03:00
Kali Kaneko 15caea75b3 fix sphinx errors&warnings; some pep8 2013-10-14 01:24:17 -03:00
Kali Kaneko a115eec9ff workaround for sphinx assertion error
We were hitting sphinx bug documented at
https://bitbucket.org/birkenfeld/sphinx/issue/1160

This workaround makes those assertion error dissapear and
sphinx to finish happily.
2013-10-14 01:24:10 -03:00
Isis Lovecruft 07acdd10e4
Merge branch 'master' into develop 2013-10-08 14:21:34 +00:00
Isis Lovecruft 287f188340
Merge branch 'release/1.2.3' 2013-10-08 14:20:17 +00:00
Isis Lovecruft 33fd778137
Remove old comments from setup.py on bootstrapping to newer setuptools. 2013-10-08 13:56:02 +00:00
Isis Lovecruft c1dd4e9627
Remove superfluous setup.py documentation link. 2013-10-08 13:54:32 +00:00
Isis Lovecruft 86d02879a9
Merge remote-tracking branch 'garrettr/fix-verbose-True' into develop 2013-10-08 13:51:17 +00:00
Isis Lovecruft 156bfb6514
Add documentation on turning a primary key into a subkey and vice versa. 2013-10-08 12:38:57 +00:00
Isis Lovecruft 88e5bd7827
Rewrite unittest test_encryption_multi_recipient().
It's still failing. Oddly, test_encryption_decryption_multi_recipient() is not
failing...
2013-10-08 12:26:42 +00:00
Isis Lovecruft 47ddca4c03
Clean up a log.debug() statement in gnupg.GPGBase._encrypt(). 2013-10-08 11:53:02 +00:00
Isis Lovecruft 4780f4443d
Add clearer logging to gnupg.GPGBase._read_data(). 2013-10-08 11:44:45 +00:00
Isis Lovecruft 78400df41c
Use type(data)().join() trick regardless of running py3k.
This is a rather elegant trick from upstream to deal with the differences
between bytesarrays, strings, and unicode literals between Python2.x and
Py3k. However, it doesn't actually make a difference if we're running Py3k or
not to use the trick, since it dynamically calls the builtin type for the
native string in any Python version. It works like so:

  >>> import sys
  >>> data = '{}\n2 + 2 ≠ 5'.format(sys.version[:5])
  >>> print(data)
  3.3.2
  2 + 2 ≠ 5
  >>> type(data)
  <class 'str'>
  >>> type(data)()
  ''
  >>> unicodedata = u'Mon corps et moi étions un, á cause de cette corde maudite.'
  >>> type(unicodedata)
  <class 'str'>

Also, in Python2.x:

  >>> import sys
  >>> data = '{}\n2 + 2 ≠ 5'.format(sys.version[:5])
  >>> print data
  2.7.5
  2 + 2 ≠ 5
  >>> type(data)
  <type 'str'>
  >>> type(data)()
  ''
  >>> unicodedata = u'Mon corps et moi étions un, á cause de cette corde maudite.'
  >>> type(unicodedata)
  <type 'unicode'>
  >>> type(unicodedata)()
  u''
2013-10-08 10:30:12 +00:00
Isis Lovecruft ade3ec97ee
Give gnupg.GPGBase._read_data() a better docstring. 2013-10-08 10:28:37 +00:00
Isis Lovecruft 10d7e61ee4
Delete output file created by test_copy_data_bytesio() unittest. 2013-10-08 10:27:04 +00:00
Isis Lovecruft 9164c8dc83
Add a fake status-fd command to create a trustdb.gpg if missing.
For some reason, in GnuPG>=2.x, a missing/corrupted trustdb is a fatal
error. This means that if the homedir was just changed, and any command which
utilizes keys is called (e.g. sign, encrypt, decrypt, etc.) GnuPG dies without
executing the command because we can't find a valid trustdb.

What's even more is that there is a new command in GnuPG>=2.x:
'--fix-trustdb'. You'd think it would, you know, *fix the trustdb*. Hah! Think
again! It prints out a series of shell commands (incorrect ones, at that, as
they don't respect the relevant env variables such as $GNUPGHOME) in a format
which is *not* exec'able (i.e. you can't do something similar to how

    $ exec `ssh-agent`

is used). Software engineering, motherfuckers. #FML.
2013-10-08 10:16:10 +00:00
Isis Lovecruft 70c029b2d8
Log stderr userland messages from GnuPG at their corresponding log levels. 2013-10-08 10:14:59 +00:00
Isis Lovecruft c26f4d57ac
Add the import/export ownertrust methods if GnuPG>=2.x is detected.
We should only add these methods (or rather, link them to their corresponding
functions in the gnupg._trust module) if using GnuPG>=2.x.

 * ADD --export-ownertrust and --import-ownertrust functionality.
2013-10-08 10:13:41 +00:00
Isis Lovecruft 1a38da7b2f
Add gnupg._trust module for functions dealing with trustdb.
* ADD function gnupg._trust._create_trustdb().
 * ADD function gnupg._trust.import_ownertrust().
 * ADD function gnupg._trust.export_ownertrust().
 * ADD function gnupg._trust.fix_trustdb().
2013-10-08 10:07:52 +00:00
Isis Lovecruft 4955fed865
Separate gnupg.GPGBase._read_response() into multiple functions.
* ADD function _util._deprefix() for stripping a given prefix from the
   beginning of another string.
 * ADD function _util._separate_keywork() for extracting the keyword from the
   beginning of status-fd output.
 * REMOVE excess EOL whitespace.
 * CLEANUP method gnupg.GPGBase._read_response().
2013-10-08 09:58:27 +00:00
Isis Lovecruft 47c891814f
Change function gnupg._util._find_binary() to also find gpg2.
* CHANGE _find_binary() utility function to look for a gpg2 binary on the
   users PATH if no binary is given and gpg is not found.
 * FIXES an error where only gpg=>1.4.x was found.
2013-10-08 08:53:54 +00:00
Isis Lovecruft 9f6908ffb0
Remove unused unittest.TestCase.setUpClass() method.
* REMOVE boilerplated unittest.TestCase.setUpClass() method, as it did
   nothing and was not being called anywhere.
2013-10-08 08:50:08 +00:00
Isis Lovecruft 903ffd3906
FIX unittest test_copy_data_bytesio().
* CHANGE unittest test_copy_data_bytesio() to actually check that the output
   data matches the original message string given to io.BytesIO().
 * REMOVE class test.test_gnupg.ResultStringIO, as it is now not used
   anywhere.
 * FIXES test_copy_data_bytesio() not actually testing what it was supposed
   to.
2013-10-08 08:46:19 +00:00
Isis Lovecruft 0166b4bc6a
Fix test failure due to static binary path arg in unittest.
* CHANGE unittest test_make_args_drop_protected_options() to discover the
   path to the GnuPG binary; the discovered path SHOULD be the same as that
   which was discovered upon class instantiation.
 * FIXES failure in unittest test_make_args_drop_protected_options() which was
   caused by the path to the GnuPG binary being hardcoded.
2013-10-08 08:27:22 +00:00
Isis Lovecruft 3d57d359bd
Merge remote-tracking branch 'drebs/feature/allow-choice-of-digest-algo-when-signing' into develop 2013-10-08 08:26:15 +00:00
drebs 93c87bcd88 Allow choice of digest algorithm when signing. 2013-10-05 13:10:03 -03:00