Commit graph

165 commits

Author SHA1 Message Date
Paul Kehrer
0b2435940e
remove keywords with side effects hack in setup.py (#5426) 2020-08-25 11:28:08 -04:00
Paul Kehrer
ace8a92be9
remove idna support finally (#5351)
* remove idna support finally

* remove unused import
2020-07-26 13:07:31 -04:00
Alex Gaynor
60aa04481f
Paint it Black by the Rolling Stones (#5324) 2020-07-20 13:06:29 -05:00
Alex Gaynor
907ec96ee8
Disable parallel docs builds to fix spellcheck (#5287) 2020-06-26 09:01:52 -05:00
Alex Gaynor
33c2e55930
ban a sphinxcontrib-spelling version that breaks things (#5284)
* ban a sphinxcontrib-spelling version that breaks things

* try bumping the pypy3 version
2020-06-24 20:16:01 -05:00
Marko Kreen
0f8626093c
Support OpenSSH private key serialization format (#5146)
* ssh.py contains load/serialize code.
* Add PrivateFormat.OpenSSH to .private_bytes() format.
* Add load_ssh_private_key().
* Use new code for PublicFormat.OpenSSH too.
* load_ssh_public_key() now supports reading signed public keys.
* Supported algorithms: rsa, dsa, ec, ed25519.
* Optional dependency on 'bcrypt' package via [ssh] extra
2020-06-20 19:06:26 -05:00
Paul Kehrer
170599b87c
block another broken sphinx version (#5277) 2020-06-14 13:11:07 -04:00
Alex Gaynor
9dd4e1f2ce
Block a sphinx version that's broken (#5272) 2020-06-12 08:50:55 -05:00
Alex Gaynor
7dcd284c6e
Remove dead constant time code (#5239) 2020-04-26 17:19:57 -05:00
Paul Kehrer
d75335a7de drop python 3.4 support (#5087)
* drop python 3.4 support

Our dependencies have started dropping support so it is becoming
difficult to test. Additionally, Python 3.4 represents <2% of our
downloads, so taking on a large maintenance burden to maintain support
isn't a good use of limited time. Accordingly, we're dropping testing
infrastructure and migrating our abi3 wheels to py35+.

* use removed instead of dropped
2019-12-08 23:42:55 -05:00
Alex Gaynor
ae13fec7fc Fixes #5010 -- test and build 3.8 wheels (#5013)
* Fixes #5010 -- test and build 3.8 wheels

* try using isolated_build = True to work around a failure
2019-10-17 08:32:04 +08:00
David Benjamin
2d3b420383 Remove asn1crypto dependency (#4941)
* Remove non-test dependencies on asn1crypto.

cryptography.io actually contains two OpenSSL bindings right now, the
expected cffi one, and an optional one hidden in asn1crypto. asn1crypto
contains a lot of things that cryptography.io doesn't use, including a
BER parser and a hand-rolled and not constant-time EC implementation.

Instead, check in a much small DER-only parser in cryptography/hazmat. A
quick benchmark suggests this parser is also faster than asn1crypto:

  from __future__ import absolute_import, division, print_function
  import timeit

  print(timeit.timeit(
      "decode_dss_signature(sig)",
      setup=r"""
  from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature
  sig=b"\x30\x2d\x02\x15\x00\xb5\xaf\x30\x78\x67\xfb\x8b\x54\x39\x00\x13\xcc\x67\x02\x0d\xdf\x1f\x2c\x0b\x81\x02\x14\x62\x0d\x3b\x22\xab\x50\x31\x44\x0c\x3e\x35\xea\xb6\xf4\x81\x29\x8f\x9e\x9f\x08"
  """,
      number=10000))

Python 2.7:
  asn1crypto: 0.25
  _der.py: 0.098

Python 3.5:
  asn1crypto: 0.17
  _der.py: 0.10

* Remove test dependencies on asn1crypto.

The remaining use of asn1crypto was some sanity-checking of
Certificates. Add a minimal X.509 parser to extract the relevant fields.

* Add a read_single_element helper function.

The outermost read is a little tedious.

* Address flake8 warnings

* Fix test for long-form vs short-form lengths.

Testing a zero length trips both this check and the non-minimal long
form check. Use a one-byte length to cover the missing branch.

* Remove support for negative integers.

These never come up in valid signatures. Note, however, this does
change public API.

* Update src/cryptography/hazmat/primitives/asymmetric/utils.py

Co-Authored-By: Alex Gaynor <alex.gaynor@gmail.com>

* Review comments

* Avoid hardcoding the serialization of NULL in decode_asn1.py too.
2019-07-28 12:06:40 -05:00
Alex Gaynor
ab115a9d19 Drop setup.py test support. (#4879)
* Drop setup.py test support.

It's fragile and relies on eggs. While our downstream redistributors don't love this (sorry!), it seems like the right tradeoff.

* Remove unused

* Added a changelog entry

* typo

* line length
2019-05-07 15:52:49 -04:00
Alex Gaynor
5fbc54ec05 Added an explicit content type for long_description (#4826)
It already defaults to x-rst, but this silences a warning
2019-04-01 13:04:04 +13:00
Paul Kehrer
3c68250ad9 allow bytes-like for key/iv/data for symmetric encryption (#4621)
* allow bytearrays for key/iv for symmetric encryption

* bump pypy/cffi requirements

* update docs, fix some tests

* old openssl is naught but pain

* revert a typo

* use trusty for old pypy

* better error msg again

* restore match
2018-12-09 23:13:31 -05:00
Paul Kehrer
7e422821b9 remove idna as a primary dependency (#4624)
* remove idna as a primary dependency

* empty commit

* dynamodb test fix (thanks to Matt Bullock)

* review feedback
2018-12-06 22:43:38 -05:00
Paul Kehrer
6d7b70e8f2 switch to twine check for verifying our readme renders on pypi (#4623) 2018-12-02 10:50:54 -05:00
Paul Kehrer
71e4251d83 blacklist latest hypothesis and pytest (#4510)
* ci is suffering again, is it the new pytest or hypothesis?

* now try 3.79.2 hypothesis

* it's a blacklist party
2018-10-23 07:34:01 -04:00
Paul Kehrer
d2df398bcd blacklist some pytests (#4502) 2018-10-19 09:29:42 -04:00
Paul Kehrer
7700251f26 block sphinx 1.8.0 since it fails our docs job (#4469) 2018-09-14 13:01:12 -04:00
Paul Kehrer
0322962e14 update pytest config (#4463)
* update pytest config

pytest 3.8.0 was just released and officially deprecates some of the way
we do pytest marks. They introduced a new way to do this in 3.6 so this
PR switches to that mechanism and updates our minimum pytest requirement

* update the stubs

* also update wycheproof test config to remove deprecated paths

* don't need this any more
2018-09-06 23:56:46 -04:00
Alex Gaynor
2af3d4c51b Fixes #3548 - add a pyproject.toml (#4363) 2018-07-23 13:10:13 -04:00
Paul Kehrer
4ee1cb9497 Add py37 (#4298)
* test against python 3.7 for windows

* update docs to say we test on 3.7

* more succinct

* maybe make this actually work.

* link properly

* moar changes
2018-06-27 23:07:14 -04:00
Jon Dufresne
95820b4e4f Document project as stable and ready for use in production (#4284) 2018-06-16 18:33:33 -07:00
Alex Gaynor
ca2055f982 Remove cffi branch for pypy that's not needed (#4209)
* Remove cffi branch for pypy that's not needed

* simplify further
2018-04-28 09:31:02 -10:00
Alex Gaynor
e49bb15656 Remove setup.py branch (#4203) 2018-04-22 09:20:54 -05:00
Alex Gaynor
ba45d28fc3 Remove version number from an error message so that it makes sense (#4188) 2018-04-09 04:39:08 +08:00
Paul Kehrer
e3d2fc1727 install only the minimum required to build our docs for rtd (#4133)
* install only the minimum required to build our docs for rtd

We don't need to install sphinxcontrib-spelling or doc8 in rtd.

* move another package
2018-03-05 19:50:10 -05:00
Paul Kehrer
ba6798161c temporarily pin cffi to avoid bug related to virtualenv (#4083)
* temporarily pin cffi to avoid bug related to virtualenv

* right, don't duplicate the name
2018-01-12 14:16:46 -05:00
Alex Gaynor
0ed80b467d Fixed #4039 -- added a python_requires to setup.py (#4064) 2017-12-26 12:04:31 -06:00
Paul Kehrer
9b086fdb07 pytest 3.3.0 has an issue with parametrized null bytes again (#4026) 2017-11-28 07:49:32 -06:00
Alex Gaynor
4941fc5c01 clearly error out on older setuptools (#4000)
* clearly error out on older setuptools

* use the right thing
2017-10-28 10:28:53 -05:00
Alex Gaynor
30d35aef4a Fixes #3947 -- remove the docutils.conf (#3995)
* Fixes #3947 -- remove the docutils.conf

* include minimum versions
2017-10-23 18:09:27 -05:00
Alex Gaynor
b0aa8476d7 random hack to maybe support older pips (#3970) 2017-10-12 11:00:29 +08:00
Paul Kehrer
4cf6e785ca expunge python 2.6 (#3962)
* expunge python 2.6

* how did THAT happen

* remove another unsupported python from the tox envlist

* hypothesis can now be unconditionally imported
2017-10-11 18:06:01 -04:00
Paul Kehrer
fce63a57b4 disable smart quotes in sphinx to workaround a spellchecker issue (#3946)
This makes it so we don't have to pin sphinx while we wait for
sphinxcontrib-spelling to properly handle smart quotes
2017-10-03 21:16:50 -04:00
Alex Gaynor
7bb0210ef9 blacklist yet another version of sphinx (#3940) 2017-09-26 09:52:04 +08:00
Alex Gaynor
4c41ab087d Switch to using the other style of environment markers (#3796)
* Switch to using the other style of environment markers

* We don't do py3.3 any more!

* changelog
2017-08-24 08:33:01 +08:00
Alex Gaynor
ca941bd00b bump pytest version (#3860) 2017-08-10 21:30:07 -05:00
Alex Gaynor
7f40239ea2 Blacklist pytest 3.2.0 because it breaks us (#3835)
See upstream: https://github.com/pytest-dev/pytest/issues/2644
2017-08-01 18:54:35 -05:00
Alex Gaynor
bacff94f5b simplify setup.py branches (#3806) 2017-07-22 16:12:54 +03:00
Alex Gaynor
0a8bdff513 simplify pyenchant requirement (#3805) 2017-07-21 20:57:50 +03:00
Alex Gaynor
d3c4ba3a79 Blacklist some pyenchant versions (#3799) 2017-07-20 06:57:59 +02:00
Alex Gaynor
bb31501f41 sphinx 1.6.3 is also no good (#3748) 2017-07-02 17:32:21 -05:00
Paul Kehrer
e3a2fb209b remove python 3.3 from CI (#3729)
* remove python 3.3 from CI

* remove 3.3 everywhere, not just from CI
2017-06-26 21:08:33 -04:00
Alex Gaynor
fe2b17407b Remove entry_points from setup.py (#3723) 2017-06-25 08:09:11 -10:00
Alex Gaynor
9bf8174367 Sphinx 1.6.2 is also broken (#3627) 2017-05-28 13:15:42 -05:00
Alex Gaynor
6091e11cae Bump the minimum PyPy/cffi version and simplify as a result (#3585)
* Bump the minimum PyPy/cffi version and simplify as a result

* unused imports

* grumble, fix
2017-05-23 20:31:03 -07:00
Alex Gaynor
e748b39339 Remove dependency on setuptools (#3567) 2017-05-22 20:54:34 -07:00
Paul Kehrer
5103235129 time to remove commoncrypto, fare thee well (#3551)
* time to remove commoncrypto, fare thee well

* remove even more

* update the changelog

* remove more things

* don't need this function

* remove CAST5 CTR tests since that was only supported in commoncrypto

* assert a thing
2017-05-20 10:09:02 -07:00