Commit graph

6632 commits

Author SHA1 Message Date
Alex Gaynor
4d5aa3923f fix memory leak reported in #3134 (#3135) (#3159) 2016-09-21 22:54:06 -05:00
Alex Gaynor
f21ed73a6c fix warnings in cffi 1.8.3 due to wrong buffer types (#3155) (#3158) 2016-09-21 22:24:18 -05:00
Alex Gaynor
6bef6b471a re-add setuptools resolve vs load workaround (#3150) (#3157)
* re-add setuptools resolve vs load workaround

* add deprecatedin tag so we can find this easier
2016-09-21 21:19:18 -05:00
Paul Kehrer
c0ee738a84 update changelog and bump version for 1.5 release (#3111) 2016-08-26 10:59:49 -04:00
Paul Kehrer
07ea3cd3ea OpenSSL 1.1.0 support (#2826)
* make pre5 work

* add a blank line to make the diff happier

* 1.1.0-pre6 working

* support the changes since 1.1.0-pre6

* fixes

* add 1.1.0 to travis

* expose the symbol

* better testing for numericstring

* handle libre...

* actually use the 1.1.0 we compile

* cache the ossl-110 dir on travis

* add some newlines

* changelog entry for 1.1.0 support

* note that we test on 1.1.0

* proper skip on this test

* reorder
2016-08-26 09:48:24 -04:00
Paul Kehrer
9736716017 be a bit more robust about detecting locking callback declarations (#3107) 2016-08-26 08:02:03 -04:00
Paul Kehrer
fea3b129b5 remove a few more unneeded and no longer extant functions for 1.1.0 (#3110) 2016-08-26 07:57:37 -04:00
Paul Kehrer
5f1e88debc opaque structs for 1.1.0 compatibility (#3109)
We're so close.
2016-08-26 07:54:08 -04:00
Marti
40f1999de7 Allow passing iterators where collections are expected (#3078)
Iterators can only be enumerated once, breaking code like this in
Python 3 for example:

    san = SubjectAlternativeName(map(DNSName, lst))

This is also a slight behavior change if the caller modifies the list
after passing it to the constructor, because input lists are now copied.
Which seems like a good thing.

Also:
* Name now checks that attributes elements are of type NameAttribute
* NoticeReference now allows notice_numbers to be any iterable
2016-08-26 09:26:31 +08:00
Paul Kehrer
eafc4ee77f remove two more constants that no longer exist and we don't use (#3101) 2016-08-25 13:58:59 -04:00
Paul Kehrer
0917d38a38 two more functions that became const, one removed that we don't use (#3102) 2016-08-25 13:58:37 -04:00
Paul Kehrer
c1c5ef16cd constify and reorder getter args (#3103)
* constify more things in x509 and reorder a few func args

Post pre6 they changed some function argument order...

* fix the function arg order where we call it

* still need arg names when implementing the function...whoops
2016-08-24 14:29:32 -04:00
Paul Kehrer
b6e72f8baa constify x509name functions (#3104) 2016-08-24 12:08:42 -04:00
Paul Kehrer
8b3a384e73 const some more ASN1 (#3100) 2016-08-24 09:32:09 -04:00
Terry Chia
9db255d031 Fix docs to clarify the less than 256 limit for Padding(). (#3099)
* Fix docs to clarify the less than 256 limit.

* Add "inclusive".
2016-08-24 21:02:11 +08: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
dcbd220ee6 There is no 0.9.8, only Zuul (#3094) 2016-08-17 08:17:40 +08:00
Paul Kehrer
54b145f2c3 ERR_load_RAND_strings changed function signature in 1.1.0 (#3093)
* ERR_load_RAND_strings changed function signature in 1.1.0

Here is a hack to avoid breaking pyOpenSSL.

* not sure how I managed that. I blame vim
2016-08-16 08:59:54 -04:00
Paul Kehrer
53da67090e move functions that were const-ified in 1.1.0-pre6 (#3090) 2016-08-16 07:17:49 -04:00
Paul Kehrer
8a74e9af96 OPENSSL_no_config is a macro in 1.1.0 (#3091) 2016-08-16 07:10:36 -04:00
Paul Kehrer
c8f2aa60d9 BIO_set has been removed in 1.1.0 (#3092)
Since we aren't using it bye bye
2016-08-16 07:08:30 -04:00
Dave Brondsema
c65fea9d54 Update example code to use recommended 160 bits (#3088)
I found the examples with `os.urandom(16)` generated URIs that Google Authenticator and Duo two-factor apps did not even recognize as supported.  This increases the key to the recommended 160 bits, and the URIs now work with both of those apps.
2016-08-16 08:13:18 +08:00
Akan Brown
60cd5a66c2 Update installation.rst (#3083) 2016-08-08 22:30:02 -04:00
Alex Gaynor
94af47ca52 Attempt to debug wacky failures on the docs build on OS X (#3085)
* empty commit

* only run this one build

* try pinning this

* why wasn't this installed?

* revert this

* english, how does it work?

* roll back these changes
2016-08-09 10:03:49 +08:00
Gabriel Orisaka
b6e0ba0fb7 Add recommendation about terminology (#3079) 2016-08-02 22:25:49 -04:00
Коренберг Марк
9e75830ad1 Disallow X509 certificate serial numbers bigger than 159 bits (#3064) (#3067) 2016-08-02 09:08:21 +08:00
Marti
4739cfca29 Add code style settings, new excludes, run 'test_x509_ext (Py3)' (#3041)
Fix DNSName wildcard encoding for NameConstraints

Previously '.example.com' would get normalised to 'example.com', making
it impossible to add wildcard NameConstraints.
2016-08-02 09:03:25 +08:00
Maximilian Hils
679a91484c Update CHANGELOG.rst with #3063 (#3070) 2016-07-31 19:43:19 -04:00
Gabriel Orisaka
617fe4b487 Remove provider language from docs (#3072) 2016-07-31 09:49:59 -04:00
Maximilian Hils
33c59a3b17 Add @mhils to AUTHORS.rst (#3071) 2016-07-31 08:48:06 +08:00
Loy
dacdbb9b1f Clarify what to pass to the sign-function (#3066)
Sign needs an ECDSA instance and from following the link to EllipticCurveSignatureAlgorithm, that wasn't clear directly.
2016-07-30 10:22:33 -04:00
Maximilian Hils
6e9e489fd8 disable static callbacks on Python 3.5 (refs #2970) (#3063) 2016-07-29 14:45:42 +08:00
Jeffery To
11997b1947 Fixed openssl binding if no-cmac (#3062) 2016-07-27 14:57:24 -04:00
Gabriel Orisaka
e035c50510 Removed provider language from asymmetric primitives docs (#3052)
* Removed provider language from asymmetric primitives docs

* Reverted changes to some examples
2016-07-26 20:26:29 -04:00
Cory Benfield
be7c5e55e4 Unconditional SecureTransport bindings, round 2. (#3059)
* Add the unconditional SecureTransport bindings

* Looks like the PSK cipher suites got removed in 10.8

* Line-length.

* Style.

* Remove further troublesome bindings.
2016-07-23 14:11:38 -04:00
Alex Gaynor
d3e90d3a3e Revert "Add the unconditional SecureTransport bindings" (#3058) 2016-07-23 10:08:11 -07:00
Cory Benfield
63f7d04844 Add the unconditional SecureTransport bindings (#3054)
* Add the unconditional SecureTransport bindings

* Line-length.

* Looks like the PSK cipher suites got removed in 10.8

* Style.
2016-07-23 10:49:02 -04:00
Dirkjan Ochtman
1025f5dacd Add myself to AUTHORS (#3048) 2016-07-19 16:28:20 -04:00
Dirkjan Ochtman
0edf7993c6 Enforce that p > q to improve OpenSSL compatibility (fixes #2990) (#3010) 2016-07-19 14:12:59 -05:00
Gabriel Orisaka
6868b1f019 Removed provider language from backend interfaces (#3047) 2016-07-18 20:54:23 -04:00
Alex Gaynor
05aac201fc A few small cleanups (#3046) 2016-07-18 12:23:01 -05:00
Terry Chia
69617caca7 Add flag to toggle key length check for HOTP and TOTP. (#3012)
* Add an enforce_key_length parameter to HOTP and TOTP.

* Document changes in docs.

* Add some words to the wordlist.

* Add versionadded to docs.
2016-07-16 08:22:32 -06:00
Anton
c0f5a82729 Add OPENSSL_config binding (#2972) (#2974)
>>> lib.EVP_get_digestbyname(b'md_gost94')
<cdata 'EVP_MD *' NULL>
>>> lib.OPENSSL_config(ffi.NULL)
>>> lib.EVP_get_digestbyname(b'md_gost94')
<cdata 'EVP_MD *' 0x10adc7440>
2016-07-13 19:41:07 -04:00
Alex Gaynor
3e3444fa96 Use a series of constants for OpenSSL version checks (#3037)
* Use a series of constants for OpenSSL version checks.

N.B. I removed several qualifiers that were being used to express beta vs. release in OpenSSL version numbers. Reviewers please look closely!

* Convert some python as well, also add the file

* flake8

* Simplify code, remove functionality that can be expressed more simply

* clean up the tests as well

* more constants

* wrap long lines

* reflect feedback

* unused

* add this back?
2016-07-11 21:03:13 +00:00
Paul Kehrer
dbb64bd2a4 disable blowfish in commoncrypto backend for key lengths under 64-bit (#3040)
This is due to a bug in CommonCrypto present in 10.11.x. Filed as
radar://26636600
2016-07-10 22:13:40 -04:00
Aviv Palivoda
2120a8e090 One shot sign/verification ECDSA (#3029)
* Add sign and verify methods to ECDSA

* Documented ECDSA sign/verify methods

* Added CHANGELOG entry

* Skipping test verify and sign if curve is not supported

* Fixed typo in documentation return type

* Removed provider language from EllipticCurvePrivateKey and EllipticCurvePublicKey
2016-07-02 12:43:06 -04:00
Alex Gaynor
14a9ad4c35 Mark the minimum pytest version in setup.py. (#3035)
Fixes #3034
2016-07-01 21:32:23 -05:00
Alex Gaynor
fd2a9dfa1c Remove a few SSL fields which are unused (#3032) 2016-06-30 16:57:05 -05:00
Aviv Palivoda
77d917b983 one shot verify documentation fix (#3031) 2016-06-30 17:43:41 -04:00
Aviv Palivoda
f67429b9d1 One shot sign/verify DSA (#3003)
* Add sign and verify methods to DSA

* Documented DSA sign/verify methods

* Added CHANGELOG entry
2016-06-30 13:42:46 -05:00