Commit graph

112 commits

Author SHA1 Message Date
Alex Gaynor
8ad694c28c Fixes #3409 -- bump idna dep to a version with massively improved performance/memory usage (#3411) 2017-02-20 10:45:20 -06:00
Paul Kehrer
9b34ca92c3 add support for update_into on CipherContext (#3190)
* add support for update_into on CipherContext

This allows you to provide your own buffer (like recv_into) to improve
performance when repeatedly calling encrypt/decrypt on large payloads.

* another skip_if

* more skip_if complexity

* maybe do this right

* correct number of args

* coverage for the coverage gods

* add a cffi minimum test tox target and travis builder

This tests against macOS so we capture some commoncrypto branches

* extra arg

* need to actually install py35

* fix

* coverage for GCM decrypt in CC

* no longer relevant

* 1.8 now

* pep8

* dramatically simplify

* update docs

* remove unneeded test

* changelog entry

* test improvements

* coverage fix

* add some comments to example

* move the comments to their own line

* fix and move comment
2017-02-16 23:20:38 -05:00
Ofek Lev
0e6a129724 replace pyasn1 with asn1crypto (#3361)
* replace pyasn1 with asn1crypto

* allow trailing bytes

* fix x509 test

* update CHANGELOG.rst

* fix assert

* make asn1crypto code more idiomatic

* find tag

* final clean-up

* leave trailing byte logic unchanged

* document dependency change

* spelling

* fix spelling
2017-02-08 13:09:41 +08:00
Alex Gaynor
31b5d784e6 Fixed #3334 -- added Python 3.6 support (#3335)
* Fixed #3334 -- added Python 3.6 support

* install py36

* empty commit to retrigger travis

* this is an impressively dumb typo
2016-12-23 11:20:36 -06:00
Paul Kehrer
f2691895a2 older readme_renderer doesn't work with docutils 0.13 (#3300) 2016-12-09 17:31:15 -05:00
InvalidInterrupt
8e66ca6813 CertificateBuilder accepts aware datetimes for not_valid_after and not_valid_before (#2920)
* CertificateBuilder accepts aware datetimes for not_valid_after and not_valid_before
These functions now accept aware datetimes and convert them to UTC

* Added pytz to test requirements

* Correct pep8 error and improve Changelog wording

* Improve tests and clarify changelog message

* Trim Changelog line length

* Allow RevokedCertificateBuilder and CertificateRevocationListBuilder to accept aware datetimes

* Fix accidental changelog entry
2016-08-16 22:39:31 -04:00
Alex Gaynor
14a9ad4c35 Mark the minimum pytest version in setup.py. (#3035)
Fixes #3034
2016-07-01 21:32:23 -05:00
Paul Kehrer
c6c3b6d9d5 pip is prejudiced against dashes and underscores (#2922) 2016-05-29 01:17:08 -04:00
Frazer McLean
542ea8ebd2 Remove redundant excludes from find_packages
Resolves #2854.

tests don't need excluded because they're not within the "src" directory.
2016-03-26 23:11:03 +01:00
Alex Gaynor
de3aa05c45 Don't try to use hypothesis on Python 2.6, upstream dropped support 2016-02-19 07:33:56 -05:00
Alex Gaynor
30e199e0fb Require a newer setuptools.
This lets a long confusing comment.
2016-01-23 09:26:07 -05:00
Paul Kehrer
9244deaa07 Merge pull request #2676 from alex/docs-pep8-dedupe
Centralize declaration of docs and pep8 deps in setup.py
2016-01-18 09:08:24 -06:00
Alex Gaynor
b638dba24e Delete two out of date comments 2016-01-17 23:45:10 -05:00
Alex Gaynor
9417608c11 Centralize declaration of docs and pep8 deps in setup.py 2016-01-17 23:28:05 -05:00
Alex Gaynor
e74dc4ed86 add this back, we couldn't dedupe there 2016-01-17 11:46:25 -05:00
Alex Gaynor
22f7ec5fc0 syntax error 2016-01-17 11:41:40 -05:00
Christian Heimes
830af271de Port callbacks to new static callback
cffi 1.4.0 will introduce a new API to create static callbacks. Contrary
to the old callback API, static callbacks no longer depend on libffi's
dynamic code generation for closures. Static code has some benefits over
dynamic generation. For example the code is faster. Also it doesn't need
writeable and executable memory mappings, which makes it compatible with
SELinux's deny execmem policy.

The branch depends on PR #2488.

https://bitbucket.org/cffi/cffi/issues/232/static-callbacks

Closes: #2477
Signed-off-by: Christian Heimes <cheimes@redhat.com>
2016-01-07 11:38:34 -08:00
Alex Gaynor
9a0ad04393 Fixed #2605 -- require setuptools 1.0
Per @dstufft:

- 0.6.28 or something around there that supports wheels
- 0.7 is the version that introduced marker support in setuptools
- 1.0 is the version where setuptools started using and verifying tls
2015-12-30 16:56:34 -05:00
Paul Kehrer
1e555aa2aa Revert "pin pytest to disallow 2.8.4 which breaks tests"
This reverts commit ed48066a3f.
2015-12-11 22:24:36 -06:00
Alex Gaynor
ed48066a3f pin pytest to disallow 2.8.4 which breaks tests 2015-12-07 19:57:51 -05:00
Paul Kehrer
8b5d094ca3 switch to using pyasn1_modules for the test 2015-10-27 09:35:17 +09:00
Paul Kehrer
5a2bb54bbb encode countryName with PrintableString
This commit adds a dependency on asn1crypto for testing purposes to
parse the certificate and confirm that countryName is encoded with
PrintableString while other fields are UTF8String. This is a test
only dep.
2015-10-20 11:13:07 -05:00
Dominic Chen
9604d9e983 add shebang for setup.py scripts 2015-10-10 05:17:31 +00:00
Paul Kehrer
78f6b5106a unpin pytest now that 2.8.2 is released 2015-10-07 12:14:51 -05:00
Paul Kehrer
584d9d6084 hypothesis-pytest is no longer a required package 2015-10-02 11:13:52 -05:00
Terry Chia
36a787ff21 Address comments. 2015-09-30 19:13:14 +08:00
Terry Chia
6325d5c9bc == should be !=. 2015-09-26 22:31:53 +08:00
Terry Chia
5cec1bf1b6 Add plumbing for hypothesis. 2015-09-26 22:31:53 +08:00
Alex Gaynor
959403b6df Pin pytest to <2.8, there's a bug with deprecation warnings 2015-09-19 13:19:43 -04:00
Alex Gaynor
1d5805b6ec added a trove classifier 2015-09-17 20:57:44 -04:00
Paul Kehrer
7d17cbb8ec raise an error if trying to install on PyPy < 2.6 2015-08-20 13:30:23 -05:00
Alex Gaynor
02fe5a8d2d Remove our workarounds for pyasn.1 bugs, a new pyasn.1 is out! 2015-06-22 20:45:41 -04:00
Paul Kehrer
4c287d704f setup requires can be cffi only now 2015-06-08 00:05:53 -05:00
Paul Kehrer
68b3b1ea86 convert to cffi 1.0 precompile system 2015-06-07 23:27:54 -05:00
Paul Kehrer
71a16210c3 require idna 2.0 or better because it's better 2015-05-18 18:59:25 -07:00
Paul Kehrer
40f8338e98 Support Subject Alternative Name in the OpenSSL backend
Adds only DNS support first
2015-04-20 22:12:32 -05:00
Paul Kehrer
3621d70403 remove python 3.2 from the classifiers 2015-04-18 20:24:30 -05:00
Alex Gaynor
702ef6ac75 Merge pull request #1783 from reaperhulk/san-class
Add GeneralName and SubjectAlternativeName classes
2015-04-18 10:15:53 -04:00
Paul Kehrer
31bdf790fd Add GeneralName and SubjectAlternativeName classes 2015-04-14 13:30:59 -04:00
Alex Gaynor
2119f74595 Simplify setup.py slightly 2015-04-13 09:50:31 -04:00
Julian Berman
4cf3811376
Remove the setuptools and CFFI requirements, which break pip install -U
PyPy ships with CFFI, but pip install -U will upgrade it if a newer CFFI
is available, which will break the CFFI installation (and PyPy itself).
2015-03-08 18:27:29 -04:00
Alex Gaynor
8a58e6997b Tell py.test to only run the tests from the local tests dir.
Right now if you have a virtualenv or something in the same directory it will recurse into it to run tests.
2015-02-20 07:58:39 -08:00
Paul Kehrer
5bea5ca023 make enum34 installation conditional on python < 3.4 2014-12-18 07:47:34 -06:00
Paul Kehrer
a1426f0afc initial x509 version support
Adds enum34 as a dependency
2014-12-15 15:49:21 -06:00
Paul Kehrer
a98f95a14e add pyasn1 as a dependency 2014-11-27 09:55:17 -10:00
Alex Gaynor
5951f46be6 Update the license header for every source file, as well as the documentation.
Fixes #1209
2014-11-16 09:08:42 -08:00
Donald Stufft
c62a78c015 Move the cryptography package into a src/ subdirectory
Due to differences in how py.test determines which module to ``import``
the test suite actually runs against the cryptography which is in the
*current* directory instead of the cryptography which is installed. The
problem essentially boils down to when there is a tests/__init__.py then
py.test adds the current directory to the front of the sys.path, causing
it to take precedence over the installed location.

This means that running the tests relies on the implicit compile
that CFFI does instead of testing against what people will actually
be runnning, which is the module compiled by setup.py.
2014-11-13 07:56:31 -05:00
Donald Stufft
d1b70f31e7 Build FFI instance when class is created, load library when instantiated 2014-11-07 21:11:25 -05:00
Alex Gaynor
abe8bc966c Update the license in setup.py 2014-10-31 19:28:57 -07:00
Peter Odding
97f45302f1 Fix PEP-8 violations 2014-09-29 11:44:32 -05:00