aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src/openssl
Commit message (Collapse)AuthorAgeFilesLines
...
* remove egd (#3771)Paul Kehrer2017-07-081-11/+0
| | | | | | | | | | | * remove egd * oops * keep Cryptography_HAS_EGD for compat just in case This shouldn't really be necessary but maybe we can fully remove it in 2018 or 2019...
* remove cryptodev (#3770)Paul Kehrer2017-07-081-10/+0
| | | | | | * remove cryptodev * oops
* Remove conditionals we never use. (#3766)Alex Gaynor2017-07-081-6/+0
| | | | | | | | * Remove conditionals we never use. Refs #3763 * put this back
* Funcs macros gone (#3695)Paul Kehrer2017-06-2735-104/+0
| | | | | | | | * No more FUNCS/MACROS distinction * change the docs to not talk about MACROS since they're gone * remove out of date comment
* enable wconversion and finish fixes (#3728)Paul Kehrer2017-06-263-5/+5
| | | | | | * enable wconversion and finish fixes * don't pass -Wconversion if it's win32
* bind DTLS 1.2 methods (#3725)Paul Kehrer2017-06-261-0/+15
| | | | | | * bind DTLS 1.2 methods * remove version specific dtls bindings, rename sentinel value
* some wconversion fixes (#3727)Paul Kehrer2017-06-263-7/+8
|
* pypy3 compilation fix for locking callback (#3716)Paul Kehrer2017-06-241-20/+60
| | | | | | | | | | | | | | | | | | * pypy3 fix on macos using work from the pypy project https://bitbucket.org/pypy/pypy/commits/198dc138680f96c391802fa1e77b8b6d2e0134e6?at=py3.5 * change abort error msg and fix wrong type * oh windows * remove an unused variable * rename mutex1_t, use calloc, small style fixes * calloc correctly * (call)
* bind even more evp (#3684)Paul Kehrer2017-06-061-3/+8
| | | | | | * bind even more evp * oops
* bind EVP_PKEY_get1_tls_encodedpoint because X25519 (#3682)Paul Kehrer2017-06-051-0/+11
|
* add EVP_PKEY_keygen and EVP_PKEY_keygen_init for x25519/ed25519 (#3681)Paul Kehrer2017-06-051-0/+6
| | | | | | * add EVP_PKEY_keygen and EVP_PKEY_keygen_init for x25519/ed25519 * add a few more bindings we'll need for X25519
* bind EVP_CTRL_AEAD even when on < 1.1.0 (#3679)Paul Kehrer2017-06-041-3/+14
|
* runtime detection of getentropy for macOS via weak-linking (#3650)Paul Kehrer2017-05-302-22/+55
| | | | | | | | | | | | | | | | | | | | | | | | | * runtime detection of getentropy for macOS via weak-linking In the before time, in the long long ago, there was a desire to use getentropy on macOS. So some code was written and it detected getentropy support by seeing if SYS_getentropy was available in the headers. But lo, it turns out Apple ships headers for different SDK versions and users on < 10.12 were getting headers that had SYS_getentropy even though their OS did not support it. There was much wailing and gnashing of teeth, but the frustrated developers remembered that Apple wants their developers to use weak linking. With weak linking the mighty developer can specify a minimum version and any symbol that was added after that version will be weakly linked. Then, at runtime, the dynamic linker will make unavailable symbols thus marked into NULLs. So, the developer need only alter their code to do runtime detection of weakly linked symbols and then a single binary may be compiled that will correctly select getentropy or /dev/urandom at runtime. Hallelujah! * oops * separate the enum * okay just apple
* move files to make the next PR easier to read (#3651)Paul Kehrer2017-05-301-43/+43
|
* Remove a binding that hasn't been used for a while (#3643)Alex Gaynor2017-05-301-7/+0
|
* jurisdictionCountryName also must be PrintableString (#3516)Alex Gaynor2017-05-251-1/+6
| | | | | | | | | | | | | | * jurisdictionCountryName also must be PrintableString * flake8 + citation * Write a test, which fails. If my analysis is correct, this is blocked on: https://github.com/openssl/openssl/pull/3284 * This is only true on 1.1.0 * clearly express the version requirement
* fix compilation on 1.1.0f (#3603)Paul Kehrer2017-05-251-2/+4
|
* add the x25519 NID (#3560)Paul Kehrer2017-05-201-0/+9
|
* More accurate LibreSSL detection (#3530)Moriyoshi Koizumi2017-05-201-0/+8
| | | | | | | | * More accurate LibreSSL detection * Update x509_vfy.py change approach to use ifndef
* Add PEM_write_bio_DHxparams, d2i_DHxparams_bio, i2d_DHxparams_bio (#3485)Aviv Palivoda2017-05-192-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add PEM_write_bio_DHxparams * Define PEM_write_bio_DHxparams only if EVP_PKEY_DHX defined. Both added in commit afb14cda in openssl * Add d2i_DHxparams_bio and i2d_DHxparams_bio bindings * Fix bindings addition * change condtional bindings to be after 1.1.0f * Change i2d_DHxparams_bio return type * define Cryptography_d2i_DHxparams_bio and Cryptography_i2d_DHxparams_bio * Remove d2i_DHxparams_bio, i2d_DHxparams_bio bindings * Add declarations for Cryptography_d2i_DHxparams_bio and Cryptography_i2d_DHxparams_bio * Move Cryptography_d2i_DHxparams_bio and Cryptography_i2d_DHxparams_bio declaration to MACROS * Add Cryptography_d2i_DHxparams_bio, Cryptography_i2d_DHxparams_bio and PEM_write_bio_DHxparams to _coditionals.py * Make sure we did not define EVP_PKEY_DHX
* Added a binding that will be useful for AIA chasing (#3546)Alex Gaynor2017-05-181-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | * Added a binding that will be useful for AIA chasing * another function * This is required * void arguments are morally complex * These are macros * fixes * This has existed for a while * long line * typo * Cory wants this as well * This is conditional
* use openssl constants (#3534)Paul Kehrer2017-05-031-0/+2
|
* Delete dead code and update a comment (#3529)Alex Gaynor2017-04-301-2/+0
|
* Additional SCT bindings (#3510)Alex Gaynor2017-04-211-0/+21
| | | | | | * Additional SCT bindings * forgot to conditional these
* Another simplification of freeing (#3498)Alex Gaynor2017-04-091-0/+1
|
* Fixed #3492 -- use a better API (#3497)Alex Gaynor2017-04-091-0/+1
| | | | | | | | | | * Fixed #3492 -- use a better API * More correct types * Revert "More correct types" This reverts commit e7412927eccf2b983bbcab2d2864ae1e4e83b56f.
* Add some ASN1_TIME related functions for the relevant PyOpenSSL patch. (#3491)Moriyoshi Koizumi2017-04-061-0/+2
| | | | | | * Add ASN1_TIME related functions for the relevant PyOpenSSL patch. * Move ASN1_TIME_check() to MACROS as the argument's constness varies between 1.0.x and 1.1.0~.
* Style nit in C code (#3486)Alex Gaynor2017-04-031-1/+1
|
* Attempt to simplify the libressl checing (#3482)Alex Gaynor2017-03-2616-60/+54
| | | | | | | | | | * Attempt to simplify the libressl checing * SHENANGINS * Attempted fix * More simplification
* Two additional bindings for CT (#3478)Alex Gaynor2017-03-231-0/+7
| | | | | | * Two additional bindings for CT * Grumble
* First pass at adding SCT bindings (#3471)Alex Gaynor2017-03-221-0/+68
| | | | | | | | | | | | | | * First pass at adding bindings for CT functions. No conditionals yet. * add a stack typedef as well * Don't try to include this header if we're on an older OpenSSL * wire up the conditional stuff * bunch o' nonsense to get it to compile on old openssl * I hate libressl
* Remove workaround for weird NetBSD bug (#3458)Alex Gaynor2017-03-171-21/+0
|
* Ec is a thing (#3453)Alex Gaynor2017-03-158-240/+3
| | | | | | | | | | | | | | | | * We always have EC * We always have ECDH * We always have ECDSA * We always have EC codes * This can go as well * And this * unused import
* add X509_STORE_CTX_get0_cert binding (#3455)Paul Kehrer2017-03-141-0/+9
|
* More ifdef death (#3450)Alex Gaynor2017-03-142-34/+0
| | | | | | | | | | * CMAC is always supported * TLSv1.2 is always supported * Releasing buffers is always supported * Nonsense IE SSLv2 nonsens is always supported
* Memleak tests (#3140)Alex Gaynor2017-03-141-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bind a pair of mem functions. * make these conditional * do the conditional correctly * move to the right section * I'm not saying libressl should be illegal, but it is annoying * sigh, typo * first cut at memleak tests. doesn't work * hack around the previous error, onto the next one * drop the pointless restoration of the original functions * Don't try to use the previous malloc functions. The default malloc is CRYPTO_malloc which calls the custom ptr you provided, so it just recurses forever. * flake8 * Get the code basically working * flake8 * say the correct incantation * Don't try to run on old OpenSSL * Flushing this is a good idea * Fixed a py2.7+ism * GRRRRR * WOrkaround for hilarity * Revert "WOrkaround for hilarity" This reverts commit 37b9f3b4ed4063eef5add3bb5d5dd592a007d439. * Swap out these functions for the originals * py3k fix * flake8 * nonsense for windows * py3k * seperate stdout and stderr because py26 has a warning on stderr * try writing this all out for windows * useful error messages * Debugging utility * Avoid this mess, don't dlopen anything * consistency * Throw away this FFI entirely * some useful comments
* Removed some unused ifdefs from openssl bindings (#3448)Alex Gaynor2017-03-142-26/+0
|
* Refs #3430 -- fixed a memory leak in extension parsing for CRL dp (#3431)Alex Gaynor2017-03-091-0/+6
| | | | | | | | | | * Refs #3430 -- fixed a memory leak in extension parsing for CRL dp * same fix for policy info * make this private * consistency cleanup
* Add ASN1_F_ASN1_CHECK_TLEN (#3414)Aviv Palivoda2017-02-211-0/+1
|
* use official API for unreachable C code (#3404)Alex Gaynor2017-02-181-3/+3
|
* switch the PEM password callback to a C implementation (#3382)Paul Kehrer2017-02-131-31/+35
| | | | | | | | | | | | | | | * switch the PEM password callback to a C implementation Calling from C to Python is fraught with edge cases, especially in subinterpreter land. This commit moves the PEM password callback logic into a small C function and then removes all the infrastructure for the cffi callbacks (as we no longer have any) * review feedback and update tests * rename the struct * aaand one more fix
* Add EVP_PKEY_DHX (#3388)Aviv Palivoda2017-02-131-0/+9
| | | | | | * Add EVP_PKEY_DHX * Add Cryptography_HAS_EVP_PKEY_DHX to _conditional.py
* Backport DH_check from OpenSSL 1.1.0. (#3375)Mark Williams2017-02-031-1/+114
| | | | | | | | | | | | | | | | | | | * Backport DH_check from OpenSSL 1.1.0. OpenSSL 1.0.2's DH_check considers the q parameter, allowing it validate more generators and primes; however, OpenSSL 1.1.0's DH_check includes code to handle errors in BN functions, so it's preferred. * Wrap DH_Check when using OpenSSL 1.1.0 or higher. * Adding DH_CHECK_* values missing from older OpenSSLs * Defensively guard DH_CHECK_* definitions with ifndef. This will prevent duplicate definitions when LibreSSL supports a version of DH_check that can return these. * Document the OpenSSL of origin for the DH_check code
* make cryptography fallback to /dev/urandom on mac on macOS < 10.12 (#3354)Paul Kehrer2017-01-311-2/+6
|
* Use static callbacks with Python 3.x again (#3350)Christian Heimes2017-01-181-4/+1
| | | | | | | | | | | | | | | | * Use static callbacks with Python 3.x again Static callbacks were disabled for Python 3.5+ to work around an issue with subinterpreters, locking callbacks and osrandom engine. Locking callback and osrandom engine were replaced with a C implementations in version 1.6 and 1.7. https://github.com/pyca/cryptography/issues/2970 Closes: #3348 Signed-off-by: Christian Heimes <christian@python.org> * remove unused import
* DTLS bindings (#3309)Paul Kehrer2016-12-191-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add DTLSv1_2 methods * add binding to DTLSv1_get_timeout() and DTLSv1_handle_timeout() * fix: PEP8 failed fix the following error: ./src/_cffi_src/openssl/ssl.py:728:80: E501 line too long (80 > 79 characters) see https://jenkins.cryptography.io/job/cryptography-pr-pep8/1954/ * Revert "add DTLSv1_2 methods" This reverts commit e4a9150b12ddb4790159a5835f1d1136cb1b996e. * replace 'long int' by 'long' To be more consistent with the naming convention cf https://github.com/pyca/cryptography/pull/3286/files/8dde92aad5db97fa176bf164783bdf9ba242edf4#r90153970 * wrap with braces cf https://github.com/pyca/cryptography/pull/3286/files/8dde92aad5db97fa176bf164783bdf9ba242edf4#r90154057 * conditionally bind all DTLS * rebase error * rename wrapped function
* Add d2i_DHparams_bio, i2d_DHparams_bio bindings (#3322)Aviv Palivoda2016-12-181-0/+2
|
* restore this constant, pyopenssl needs it (#3321)Alex Gaynor2016-12-141-0/+3
|
* Drop 1.0.0 (#3312)Alex Gaynor2016-12-136-110/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* New osrandom_engine in C (#3229)Christian Heimes2016-12-093-0/+693
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New osrandom_engine in C Inspired by Python/random.c and the old implementation. Signed-off-by: Christian Heimes <christian@python.org> * osrandom_engine * Fix naming bug caused by search 'n replace mistake * Make it easier to override osrandom auto-detection * Add engine ctrl and backend API to get implementation from ENGINE Signed-off-by: Christian Heimes <christian@python.org> * Better test coverage, documentation, LICENSE Signed-off-by: Christian Heimes <christian@python.org> * Coverage is hard. Signed-off-by: Christian Heimes <christian@python.org> * * enable win32 check * read() returns size_t Signed-off-by: Christian Heimes <christian@python.org> * Add macOS to spelling list. Remove dead code from header file. Signed-off-by: Christian Heimes <christian@python.org> * remove CCRandomGenerateBytes path and update getentropy to work on macOS This change allows us to test all the engines in our CI: * getentropy (tested by macOS sierra) * getrandom (tested on several linux builders) * /dev/urandom (tested on FreeBSD, OS X 10.11 and below, & older linux) * CryptGenRandom (tested on windows builders) I also fixed bugs preventing compilation in the getentropy code * getentropy() returns int and is restricted to 256 bytes on macOS, too. Signed-off-by: Christian Heimes <christian@python.org> * add versionadded * Re-add import of os module * Fixes related to Alex's recent review. Signed-off-by: Christian Heimes <christian@python.org> * Add error reporting and fail for EAGAIN Add error reporting strings for various error cases. This gives us much nicer and understandable error messages. SYS_getrandom() EAGAIN is now an error. Cryptography refuses to initialize its osrandom engine when the Kernel's CPRNG hasn't been seeded yet. Signed-off-by: Christian Heimes <christian@python.org>