aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Future proofing use of the six python version constants (#4238)Eric Brown2018-05-143-27/+27
| | | | | | | | | | | | | | | * Future proofing use of the six python version constants After reading [1], noticed that cryptography uses a lot of if six.PY3 blocks. The issue with this is that whenever Python 4 is released, this code in the else block will be executed even though it was only intended for Python 2. [1] http://astrofrog.github.io/blog/2016/01/12/stop-writing-python-4-incompatible-code/ Signed-off-by: Eric Brown <browne@vmware.com> * Use not PY2 instead
* Remove some unused RSA bindings. (#4243)David Benjamin2018-05-141-11/+0
| | | | | | RSA_blinding_off is a silly function. RSA_SSLV23_PADDING and RSA_X931_PADDING are obsolete. The low-level padding functions appear unused and the EVP_PKEY stuff is probably a bit nicer than expecting callers to RSA_NO_PADDING and do the padding by hand.
* Validate the public/private halves of EC keys on import. (#4241)David Benjamin2018-05-142-6/+7
| | | | | | | | | | | | | | | | | | * Validate the public/private halves of EC keys on import. OpenSSL's API is a little finicky. If one sets the public key before the private key, it does not validate that they match. If set in the other order, it does validate this. In particular, KASValidityTest_ECCStaticUnified_NOKC_ZZOnly_init.fax describes error code 7 as: Result = F (7 - IUT's Static private key d changed-prikey validity) Reordering the two operations makes those tests to fail on key import, which is what CAVP appears to have intended. * Wrap to 79 rather than 80 columns
* Fix some stuttering. (#4240)David Benjamin2018-05-141-3/+0
| | | | This is a remnant of the function code checking when this logic looked at both encrypt/decrypt versions of this error code.
* Remove some unused RAND bindings. (#4239)David Benjamin2018-05-141-4/+0
| | | These are unused. (And not especially useful.)
* Clean up unused EC bindings. (#4225)David Benjamin2018-05-142-83/+0
| | | | | | | | | | | | | | | | | | | | | | | * Clean up unused EC bindings. A lot of these are really OpenSSL internals, like the EC_METHOD business, support for custom curves which are a bad idea, and weird non-standard serializations like taking the usual point serialization and treating it as a single BIGNUM. I also didn't remove things when they're arguably part of a set. E.g. EC_POINT_add is used, but EC_POINT_dbl isn't. However, they both set at the same abstraction level (basic point operations), so it's strange to have one without the other. I also kept EC_POINT_is_on_curve because, although it is not used, OpenSSL prior to 1.1.0 doesn't perform this important check in EC_POINT_set_affine_coordinates_GFp (though it does in some of the functions which ultimately call it, like EC_KEY_set_public_key_affine_coordinates, what cryptography.io actually uses), so one should not expose the latter without the former. * Fix build issue.
* Remove unused BIO bindings. (#4220)David Benjamin2018-05-141-107/+3
| | | | | | | | | | | | | * Remove unused BIO bindings. This also folds in the const bits from 1.1.0, on the assumption that, now that the function pointer check is gone, it will just cause cffi to generate more conservative pointer types that work for 1.0.2 as well. * Restore some functions used externally. Datagram BIO_CTRL_* constants are intentionally omitted per discussion on the PR.
* Add SHA512/224 and SHA512/256 test vectors from NIST CAVP (#4237)Paul Kehrer2018-05-149-1/+7121
|
* Use pytest instead of py.test per upstream recommendation, #dropthedot (#4236)Ville Skyttä2018-05-132-2/+2
| | | | http://blog.pytest.org/2016/whats-new-in-pytest-30/ https://twitter.com/hashtag/dropthedot
* Run no longer used debugging output from travis (#4233)Alex Gaynor2018-05-121-4/+0
|
* switch to py3 on docs job (#4230)Paul Kehrer2018-05-1213-49/+50
| | | | | | * switch to py3 on docs job * somehow unicode isn't a word
* Check for CMAC_Init errors. (#4232)David Benjamin2018-05-121-1/+2
|
* Fixed some confusing type descriptions in docs (#4231)Alex Gaynor2018-05-121-4/+1
|
* Add support for extracting timestamp from a Fernet token (#4229)Paul Kehrer2018-05-124-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API for retrieving the seconds-to-expiry for the token, given a TTL. * Process PR feedback: * Do compute the TTL, but just the age of the token. The caller can decided what to do next. * Factored out the HMAC signature verification to a separate function. * Fixed a copy&paste mistake in the test cases * Tests cleanup. * `struct` no longer needed * Document `def age()` * typo in `age()` documentation * token, not data * remove test for TTL expiry that is already covered by the parameterized `test_invalid()`. * let's call this extract_timestamp and just return timestamp * review comments * it's UNIX I know this
* Fix some callback type signatures. (#4227)David Benjamin2018-05-121-3/+3
| | | | | | | | | | | | | | | | * Fix some callback type signatures. SSL_CTX_set_psk_server_callback: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_psk_server_callback.html https://github.com/openssl/openssl/blob/OpenSSL_1_0_2/ssl/ssl.h#L1355 https://github.com/openssl/openssl/blob/OpenSSL_1_1_0/include/openssl/ssl.h#L734 SSL_CTX_set_tlsext_servername_callback: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_tlsext_servername_callback.html https://github.com/openssl/openssl/blob/OpenSSL_1_0_2/ssl/s3_lib.c#L3964 https://github.com/openssl/openssl/blob/OpenSSL_1_1_0/ssl/s3_lib.c#L3499 * Missed a spot
* fixed variable name to be correct (#4226)Alex Gaynor2018-05-111-3/+3
|
* Use a checklist for bumping openssl version (#4221)Alex Gaynor2018-05-092-19/+16
| | | | | | | | * Use a checklist for bumping openssl version * words * empty commit to retrigger jenkins
* add SHA3 and SHAKE vectors (#4213)Paul Kehrer2018-05-0921-0/+20714
| | | These can be used when OpenSSL 1.1.1 is released
* Remove unused BN bindings. (#4219)David Benjamin2018-05-091-28/+2
| | | | | | | | | | * Remove unused BN bindings. These appear to be unused in both cryptography.io and PyOpenSSL. * Restore symbols used by pyUmbral. Along the way, fix some mistranscribed consts.
* adding name so that 1.3.6.1.4.1.11129.2.4.2 is no longer and 'Unknown OID' ↵Joshua Crowgey2018-05-071-0/+3
| | | | (#4218)
* update link to draft rfc (#4214)Alex Gaynor2018-05-021-1/+1
|
* Updated pip wheel option in installation script. (#4212)Justin Holmes2018-04-301-1/+1
|
* Remove cffi branch for pypy that's not needed (#4209)Alex Gaynor2018-04-281-2/+1
| | | | | | * Remove cffi branch for pypy that's not needed * simplify further
* Expose OpenSSL constant time bignum arithmetic (#4200)Tux2018-04-242-0/+15
| | | | | | | | | | | | | | | | | | | * Expose BIGNUM constant time operations This commit exposes the following functions: BN_set_flags BN_get_flags BN_MONT_CTX_new BN_MONT_CTX_set BN_MONT_CTX_free BN_mod_exp_mont BN_mod_exp_mont_consttime This commit also exposes the BN_FLG_CONSTTIME flag. * Add myself to AUTHORS
* Add Session functions, necessary to implement new features in Python 3.6. ↵Amaury Forgeot d'Arc2018-04-241-0/+14
| | | | (#4205)
* bump openssl version in travis (#4204)Alex Gaynor2018-04-221-3/+3
|
* Remove setup.py branch (#4203)Alex Gaynor2018-04-221-3/+1
|
* add custom extensions functions for openssl >=1.0.2 (#4202)Denis Lila2018-04-212-0/+77
| | | | | | * add custom extensions functions for openssl >=1.0.2 * Fix style problems
* Revert #4195 (#4201)Alex Gaynor2018-04-201-3/+1
| | | Fixes #4196
* Remove CDN purging, the new PyPI does the right thing (#4198)Alex Gaynor2018-04-171-12/+0
|
* Update URLs for new pypi! (#4194)Alex Gaynor2018-04-164-7/+11
| | | | | | | | * Update URLs for new pypi! * trailing slash * grump
* temporarily fix tests (#4195)Alex Gaynor2018-04-151-1/+3
|
* update the NIST keywrap vectors (#4191)Paul Kehrer2018-04-1212-17974/+17974
| | | | NIST has updated the vectors to cover the bug we had. Let's use those vectors. Thanks NIST!
* Remove version number from an error message so that it makes sense (#4188)Alex Gaynor2018-04-091-2/+2
|
* simplify Jenkins test run taking advantage of ↵Matt Bullock2018-04-071-2/+2
| | | | https://github.com/awslabs/aws-encryption-sdk-python/pull/46 (#4185)
* OpenSSL 1.0.2o has switched to winsock2 (#4184)Thierry Bastian2018-04-052-0/+6
| | | So here we need to make sure we don't simply include windows but only the parts that we want
* add X509_NAME_print_ex (#4174)Joshua Crowgey2018-04-041-0/+1
| | | | | | | | * add X509_NAME_print_ex * Addressing code review + removed comment from bindings regarding deprecation of _print_oneline
* Raise ve on bad gt (#4180)Joshua Crowgey2018-04-032-1/+19
| | | | | | | | | | | | | | | * Raise a ValueError when conversion to generalizedtime fails * added test for badasn1time value error * pep8 compliance * Addressing code review + VE now raises with ```{!r}``` formatting + Test now checks that the bad string made it into the VE message * using ValueError.match
* Fixed links to sphinx docs (#4182)Alex Gaynor2018-04-011-1/+1
|
* updated link to sphinx docs (#4181)Alex Gaynor2018-04-011-1/+1
|
* Added badtime.pem vector (#4179)Joshua Crowgey2018-03-302-0/+20
| | | | | | | | * Added badtime.pem vector In connection with forthcoming PR to fix #4158 * shortened line, corrected and->and
* Fix typo (#4178)Tim D. Smith2018-03-291-1/+1
|
* port changelog for 2.2.2 (#4172)Paul Kehrer2018-03-271-0/+8
|
* Add urllib3 to downstream tests (#4165)Paul Kehrer2018-03-201-0/+15
| | | | | | | | * Add urllib3 to downstream tests * empty commit * remove a suffix
* forward port 2.2.1 changelog (#4167)Alex Gaynor2018-03-201-0/+13
|
* fix bug with n % 8 length wrapping on AESKWP (#4160)Paul Kehrer2018-03-202-2/+31
| | | | | | * fix bug with n % 8 length wrapping on AESKWP * review feedback
* Revert "don't allow GeneralNames to be an empty list (#4128)" (#4161)Alex Gaynor2018-03-202-7/+0
| | | | | This breaks the urllib3 tests, as well as several in-the-wild certs This reverts commit 388d1bd3e9cd953fcc948edbc152d5d140c87eb8.
* add botan's AESKWP vectors reformatted for our NIST loader (#4159)Paul Kehrer2018-03-202-0/+652
|
* open master for 2.3 (#4151)Paul Kehrer2018-03-183-2/+9
|
* 2.2 release! (#4150)Paul Kehrer2018-03-183-6/+5
| | | | | | * 2.2 release! * also change versions