| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This adds the ability to retrieve the selected SRTP protection profile
after the DTLS handshake completes. This is needed to perform the
correct key derivation if multiple profiles were offered.
|
|
|
|
|
|
| |
* HTTPS a bunch of links in random places
* What the heck happened here?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux (#4656)
* Fixes #4645 -- select() on /dev/random before reading from /dev/urandom on linux
* whoops
* Missing header
* whoops
* Review notes
* Potential uninitialized fix
* Signals are literally impossible
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Raise MemoryError when backend.derive_scrypt can't malloc enough
* Expose ERR_R_MALLOC_FAILURE and use the reason_match pattern to catch it
* Add test_scrypt_malloc_failure in test_scrypt
* let's see if this passes
* add comment to filippo's blog post about scrypt's params
|
|
|
|
|
|
|
|
| |
* switch osrandom engine to blocking mode when getting entropy
* review feedback
* we can remove this too
|
| |
|
|
|
| |
OpenSSL defines these even with OPENSSL_NO_DTLS.
|
| |
|
|
|
|
|
|
| |
* add evp_pkey_ed25519
* ed448 bindings
|
|
|
|
|
|
| |
* add bindings for early data
* remove final var name
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* add SSL_OP_NO_TLSv1_3
* compiling now
* bind SSL_CTX_set_ciphersuites as well
* add some more
|
| |
|
| |
|
| |
|
|
|
| |
I hate it when we have to do this.
|
|
|
|
|
|
|
|
| |
(#4507)
* Fixes #4500 -- use O_CLOEXEC when opening the /dev/urandom file descriptor
* Unused variable
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add definitions for SSL_get0_param and X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS
* remove unnecessary parameter name
* Add version conditionals and more flags
* extend cryptography_has_102_verification_params
* X509_CHECK_FLAG_NEVER_CHECK_SUBJECT only available with openssl 1.1.0+
* add missing declaration
|
|
|
|
|
|
| |
* additional OCSP bindings for the response builder
* use the OCSP extension funcs that match the rest of x509
|
|
|
|
|
|
| |
* add ed25519 bindings
* var name
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* add OCSP request parsing support with OCSPNonce
* add docs
* reprs man
* make extensions a cached property
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* try something a bit different.
* newer compiler plz
* permute
* fix some warnings
* fix getters on OpenSSL < 1.1.0
* this is getting involved
* given our compiler flags we can't have SSL_CTX_set_cookie_verify_cb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add many OCSP bindings
Much of OCSP was opaqued in 1.1.0 so this also adds a bunch of getters
for older OpenSSL. However, 1.1.0 itself made it impossible to access
certain fields in the opaque struct, so we're forced to de-opaque them
for 1.1.0 through 1.1.0i as well as 1.1.1-pre1 through 1.1.1-pre9. There
is a patch (openssl/openssl#7082) that fixes this and should be in
1.1.0j and 1.1.1-pre10 (or 1.1.1 final, whichever they choose to issue)
* backslashes are sometimes useful
* comments
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed a memory leak in x.509 OCSP no check
* Fix the _actual_ leak
* Speed up symbolizations
* Disable backtrace by default, because it doesn't work on Windows
* line length
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* make an ocsp request
* update test, add docs
* make it an OCSPRequestBuilder
* review feedback and more tests
* make it a class
* empty commit to retrigger
* type check
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyPy (#4364)
* Add more SSL_CIPHER_* functions, necessary to implement ctx.get_ciphers() added by Python 3.6.1.
* Add placeholders for other versions
* Remove parameter names
* LibreSSL 2.7 has the new functions
* Add entries in _conditional.py
* SSL_CIPHER_get_id returns int, not char*
|
|
|
|
|
|
|
|
| |
* add crl.get_revoked_certificate method
* lexicographic is the best ographic
* rename
|
|
|
| |
And not expose an unprefixed name to anyone who dlopens us.
|
|
|
|
|
|
|
|
|
| |
* set an OPENSSL_API_COMPAT level
this helps prevent adding deprecated functions and will let us see what
we need to/can prune in the distant future when we support only 1.1.0+
* raise the api compat to 1.0.1 (which doesn't matter but is less confusing)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #4220, I switched BIO_new to take a const pointer (true in 1.1.0, but
not 1.0.2) on grounds that:
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.
But I got this backwards. If the bindings say BIO_METHOD*, cffi will
pass a BIO_METHOD* to BIO_new, which works in both OpenSSL versions. If
it says const BIO_METHOD*, cffi will pass const BIO_METHD* to BIO_new,
which does not work in 1.0.2.
(Although cryptography.io's build ignores all these warnings anyway, so
it's kind of moot.)
|
|
|
| |
These are required by the Tribler project.
|
|
|
|
|
|
|
|
|
|
| |
* Perform an OPENSSL_cleanup before checking the heap in our memleak tests
* Make this binding conditional
* typo
* need to put this call before we reset the function ptrs
|
|
|
|
|
|
|
|
| |
* libre 2.7.3 compatibility
* add a changelog
* actually build against 2.7.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove defines for openssl 1.1.0 pre
* Update bio.py
* Update dh.py
* Update dsa.py
* Update rsa.py
* Update x509_vfy.py
* Compress branches
|
|
|
|
|
|
|
|
|
|
| |
* Fixed build errors on HP-UX.
* PEP 8 style fix.
* No return for void function.
* PEP 8 style fix, take 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes:
- ERR_get_state which really shouldn't be public API.
- A bunch of functions that are really mostly useful within the library
to add new errors. NB: I say mostly because they are also useful when
trying to register a new error library, as osrandom does, but osrandom
is written in C. Python code is more likely to be consuming errors.
- All function codes but EVP_F_EVP_ENCRYPTFINAL_EX because tests still
reference it. Per PR #3609, function codes are kind of unstable. This
finishes that up and cleans up the bindings.
- The "line" versions of querying the error queue, just because no one
seems to be using them and there's a lot.
- Error-printing functions, which make less sense in Python since you'd
probably wrap in an exception.
Error codes probably could also do with cleaning, but I've left them
alone for now.
|
|
|
|
|
|
|
|
|
|
|
| |
They are unused.
These functions have two purposes. They can be used to pass your own
value of k, or to amoritize the cost of generating k. Messing up k is
catastrophic to ECDSA, so best not to expose that one. ECDSA signing is
also quite fast, so there isn't much point in the latter. (The API comes
from DSA, which is a bit slower.) Moreover, ECDSA_sign is not the same
as ECDSA_sign_setup + ECDSA_sign_ex. OpenSSL has some nonce hardening
features that have to get skipped when doing this.
|
|
|
|
|
|
| |
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.
|
|
|
| |
These are unused. (And not especially useful.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|