summaryrefslogtreecommitdiff
path: root/tests/hazmat/bindings
Commit message (Collapse)AuthorAgeFilesLines
* drop support for openssl < 1.1.1d (#8449)Paul Kehrer2023-03-241-17/+0
| | | | | This removes the OS random engine, which contained the only CPython PSF licensed code in the repository. Accordingly, that license has now been removed.
* Simplify/unify Rust and Python OpenSSL error handling (#8552)Alex Gaynor2023-03-201-2/+1
|
* Support handling OpenSSL errors from Rust code (#8530)Alex Gaynor2023-03-161-1/+25
|
* fix some binding declarations (#8273)Paul Kehrer2023-02-121-17/+0
| | | | | | | | * fix some binding declarations also adds a comment about why we deliberately incorrectly declare some of them, sigh * it's actually safe to do this since no high bit mode options exist
* Use the more modern OpenSSL incantation in tests (#8005)Alex Gaynor2023-01-081-3/+3
|
* support compilation against openssl 3 with no legacy provider (#7650)Paul Kehrer2022-09-261-1/+7
| | | | | You must pass CRYPTOGRAPHY_OPENSSL_NO_LEGACY for this to be allowed. Downstreams can easily patch this check out if they want to default to this behavior.
* fixes #6917 -- simplify assertions to in a test to make more portable (#7004)Alex Gaynor2022-03-271-9/+2
|
* Remove explicit subclassing of object now that all classes are new-style (#6830)Alex Gaynor2022-01-301-1/+1
| | | As someone who first with Python in 2.4 or so, this habit is going to be hard to break.
* Run tests/hazmat/bindings/test_openssl.py on BoringSSL (#6592)Alex Gaynor2021-11-121-9/+20
| | | Refs #6576
* 3.0.0 deprecated func and it isn't useful to us in general (#6148)Paul Kehrer2021-06-301-3/+2
| | | remove it everywhere and assert on the code/lib/reason
* [WIP] 3.0.0 support (#5250)Paul Kehrer2021-04-221-1/+3
| | | | | | | * 3.0.0 support * almost...there... * make mypy happy
* Remove __future__ import from our code (#5610)Alex Gaynor2020-12-091-1/+0
|
* Always rely on OpenSSL's builtin locking callbacks (#5561)Alex Gaynor2020-11-111-12/+0
|
* Delete all the 1.0.2 code (#5511)Alex Gaynor2020-10-251-14/+2
|
* Break users on OpenSSL 1.0.2 (#5438)Alex Gaynor2020-08-281-0/+12
| | | fixes #5432
* Paint it Black by the Rolling Stones (#5324)Alex Gaynor2020-07-201-3/+6
|
* Drop support for OpenSSL 1.0.1 (#5178)Alex Gaynor2020-04-041-13/+1
|
* Fixes #5018 -- break users on OpenSSL 1.0.1 (#5022)Alex Gaynor2019-10-181-1/+13
| | | | | | | | | | | | * Fixes #5018 -- break users on OpenSSL 1.0.1 * Grammar * Syntax error * Missing import * Missing import
* encode the package version in the shared object (#4756)Paul Kehrer2019-02-201-1/+5
| | | | | | | | | | * encode the package version in the shared object * review feedback * move into build_ffi so the symbol is in all shared objects * review feedback
* 1.1.0 locks (#4420)Paul Kehrer2018-08-291-3/+6
| | | | | | | | | | | | * Do conditional compiling of Cryptography_setup_ssl_threads * Check Cryptography_HAS_LOCKING_CALLBACKS before initing static locks Check if compiling and initing locking callbacks is necessary PEP8 fix * Make test_crypto_lock_init more complete
* sigh, missed one TLSv1 (#4392)Alex Gaynor2018-08-121-1/+2
|
* Fixed #4380 -- do not assume TLSv1 is available in OpenSSL (#4389)Alex Gaynor2018-08-121-2/+4
| | | | | | | | * Fixed #4380 -- do not assume TLSv1 is available in OpenSSL Hallelujah! It's starting to become the case that some OpenSSLs are disabling it. * cover this file as well
* fix libressl error/refactor some error handling (#3609)Paul Kehrer2017-05-261-11/+7
| | | | | | | | | | | | | | | | | | | | | | | * add libre so I can see the error * add the libre error needed and refactor error handling a bit We were historically matching on lib + func + reason, but func is somewhat unstable so now we match on lib + reason only. Of course, in this case libressl changed both lib and reason so it wouldn't have mattered. All error handling from the error queue in openssl is an illusion * fix a typo, probably an unneeded branch * review feedback * refactor tests to support libressl insert additional rant about libre here, although admittedly these tests were assuming stability where openssl itself guarantees none * better assert, fix flake8
* time to remove commoncrypto, fare thee well (#3551)Paul Kehrer2017-05-201-26/+0
| | | | | | | | | | | | | | | | * 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
* Attempt to simplify the libressl checing (#3482)Alex Gaynor2017-03-261-8/+2
| | | | | | | | | | * Attempt to simplify the libressl checing * SHENANGINS * Attempted fix * More simplification
* Refactor binding initialization to allow specified errors (#3278)Paul Kehrer2017-02-131-1/+13
| | | | | | | | | If pyca/cryptography sees any errors on the error stack during its own initialization it immediately raises InternalError and refuses to proceed. This was a safety measure since we weren't sure if it was safe to proceed. However, reality has intervened and we have to bow to the god of pragmatism and just clear the error queue. In practice this is safe since we religiously check the error queue in operation.
* Drop 1.0.0 (#3312)Alex Gaynor2016-12-131-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * delete the 1.0.0 support * drop the version check * drop the AES-CTR stuff * Update the example * openssl truncates for us now * delete unused test * unused imports * Remove a bunch of conditional bindings for NPN * no more 1.0.0 builders * libressl fix * update the docs * remove dead branches * oops * this is a word, damnit * spelling * try removing this * this test is not needed * unused import
* Error out on OpenSSL 1.0.0 by default (#3276)Alex Gaynor2016-11-221-1/+7
| | | | | | * Error out on OpenSSL 1.0.0 by default * what the heck
* C locking callback (#3226)Alex Gaynor2016-11-131-65/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove Python OpenSSL locking callback and replace it with one in C The Python OpenSSL locking callback is unsafe; if GC is triggered during the callback's invocation, it can result in the callback being invoked reentrantly, which can lead to deadlocks. This patch replaces it with one in C that gets built at compile time via cffi along with the rest of the OpenSSL binding. * fixes for some issues * unused * revert these changes * these two for good measure * missing param * sigh, syntax * delete tests that assumed an ability to mess with locks * style fixes * licensing stuff * utf8 * Unicode. Huh. What it isn't good for, absolutely nothing.
* OpenSSL 1.1.0 support (#2826)Paul Kehrer2016-08-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Use a series of constants for OpenSSL version checks (#3037)Alex Gaynor2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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?
* Drop OpenSSL 0.9.8 (#2978)Alex Gaynor2016-06-181-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Drop OpenSSL 0.9.8 * Drop this test, it's not relevant any longer * unused import * Remove CRYPTOGRAPHY_ALLOW_OPENSSL_098=1 from our tox * removed unused code for Cryptography_HAS_PKEY_CTX * return unused code for _AESCTRCipherContext * syntax :-( * remove some unused tests and skips * remove unused code for Cryptography_HAS_PBKDF2_HMAC * Revert "return unused code for _AESCTRCipherContext" This reverts commit 7d149729205aa4c9735eb322414b167a75b302df. * Remove unused RSA code * Remove unused test code for conditional bindings * Remove unused dsa code * unused import * Remove unused x509 extension code * Remove unused EC code * Attempt to remove unused DER key loading code * document this * grammar * Added back this paragraph * Update docs
* Use runtimeerror for thisAlex Gaynor2016-03-191-2/+1
|
* test for verify_openssl_versionAlex Gaynor2016-03-191-1/+8
|
* use an error that's likely to be in all openssls we supportPaul Kehrer2016-03-081-12/+9
|
* review feedback + make the test actually test a thingPaul Kehrer2016-03-071-6/+15
|
* only call ERR_error_string if we're going to raise InternalErrorPaul Kehrer2016-03-071-1/+21
|
* make engine addition idempotentPaul Kehrer2015-10-211-2/+2
| | | | | | | | | | | Threading issues keep cropping up. ENGINE_add already acquires a lock at the C layer via CRYPTO_w_lock (provided you have registered the locking callbacks) so let's try to use that. As part of this we'll try to init the openssl locks, but of course there's potentially a race there as well. Clearly this isn't the real fix but it might improve the situation while we try to determine what to do.
* Merge pull request #2180 from reaperhulk/easy-conditional-fixDonald Stufft2015-08-041-0/+18
|\ | | | | create a ConditionalLibrary and remove unsupported items
| * add test for conditional removalPaul Kehrer2015-08-011-0/+18
| |
* | move urandom engine testPaul Kehrer2015-08-011-30/+0
|/ | | | | | | | | | This test was in the bindings dir, which is incorrect. We do not set the urandom engine to default unless the openssl backend is loaded. The reason the test wasn't failing (even in the random test case) is that the backends are loaded during pytest_generate_tests by a call to _available_backends. So no matter what order it occurred in the engine was already set to default. I discovered this when I tried to run the test_openssl.py bindings tests directly via pytest. Hooray global state.
* test libressl when there is no libresslGlyph2015-06-301-2/+15
|
* pep8Glyph2015-06-301-0/+1
|
* Detect and ignore LibreSSL.Glyph2015-06-301-1/+3
|
* the output of RAND_bytes is os.urandom's resultGlyph2015-06-291-0/+14
|
* handle previous registration by raising RuntimeErrorGlyph2015-06-271-2/+2
|
* remove remaining vestiges, make adding twice workGlyph2015-06-261-1/+1
|
* convert to cffi 1.0 precompile systemPaul Kehrer2015-06-073-56/+8
|
* use setenv so we don't have to import osPaul Kehrer2015-01-141-3/+1
|
* monkeypatch PYCA_WINDOWS_LINK_TYPE in the tests to fix #1624Paul Kehrer2015-01-141-1/+4
|