aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Refs #3331 -- added initial wycheproof integration, starting with x25519, ↵Alex Gaynor2018-07-1611-5/+286
| | | | | rsa, and keywrap (#4310) * Refs #3331 -- added initial wycheproof integration, starting with x25519 tests
* Change the exception we raise in keywrap unwrapping on invalid length (#4337)Alex Gaynor2018-07-163-6/+12
| | | I believe this can reasonably be considered backwards compatible since other invalid inputs already lead to InvalidUnwrap, and clients shouldn't be distinguishing between these two conditions, and ValueError wasn't documented anyways.
* document one shot AEAD length restrictions (#4322)Paul Kehrer2018-07-143-0/+68
| | | | | | | | | | | | | | * document one shot AEAD length restrictions * write a test that won't consume infinity ram continue to raise OverflowError since that's what cffi did. * this applies to associated_data too * remove unneeded arg * review feedback on docs
* switch cryptography wheel builders back to pip wheel (#4334)Paul Kehrer2018-07-141-13/+4
|
* raise valueerror for null x25519 derived keys (#4332)Paul Kehrer2018-07-122-1/+22
| | | | | | | | | * raise valueerror for null x25519 derived keys OpenSSL errors when it hits this edge case and a null shared key is bad anyway so let's raise an error * empty commit
* bump to latest libressl versions (#4329)Alex Gaynor2018-07-111-2/+2
|
* try compiling with asm for our custom openssl (#4328)Paul Kehrer2018-07-103-6/+7
| | | | | | | | * try compiling with asm for our custom openssl * we also need to update the cache dir * try actually compiling it
* don't install docs when we build openssls...and do it parallel (#4327)Paul Kehrer2018-07-101-1/+3
|
* we don't actually care about the errstack here, it's an invalid signature ↵Paul Kehrer2018-07-102-2/+36
| | | | | | | | | | | | | | (#4325) * we don't actually care about the errstack here, it's an invalid signature We previously had no cases where we could error without getting errors on the error stack, but wycheproof contains test cases that can error without adding anything to the stack. Accordingly, we should clear the stack but raise InvalidSignature no matter what (rather than InternalError if we have no error msgs) * add a test
* fix a memory leak when calling X25519PrivateKey.public_key() (#4326)Paul Kehrer2018-07-102-0/+12
|
* fix encoding BMPString in x509 name entries (#4321)Paul Kehrer2018-07-092-2/+25
| | | | | | | | | | Previously we encoded them as UTF-8, but as best I can tell in reality a BMPString is fixed-width basic multilingual plane big endian encoding. This is basically UCS-2 (aka original Unicode). However, Python doesn't support UCS-2 encoding so we need to use utf_16_be. This means you can encode surrogate code points that are invalid in the context of what a BMPString is supposed to be, but in reality I strongly suspect the sane encoding ship has sailed and dozens if not hundreds of implementations both do this and expect other systems to handle their nonsense.
* document that an ECPublicNumbers object has some unexpected properties (#4319)Paul Kehrer2018-07-091-0/+8
| | | | | | | | | | | | | * document that an ECPublicNumbers object has some unexpected properties It is not guaranteed to be a valid point on the curve as that is not checked until you convert it to a PublicKey object. * different language * move the text, make it a warning, alter the language * new language
* Make RelativeDistinguishedName preserve attribtue order (#4306)Marti Raudsepp2018-07-094-11/+23
| | | | Duplicate attributes now raise an error instead of silently discarding duplicates.
* Convert a pair of asserts to use openssl_assert (#4318)Alex Gaynor2018-07-091-2/+2
| | | We have an existence proof that the latter assertion can be triggered, and I bet the former can too.
* Make our locking setup function compy with our style guide (#4316)Alex Gaynor2018-07-062-3/+3
| | | And not expose an unprefixed name to anyone who dlopens us.
* reduce number of deprecated signer/verifier calls in test_rsa (#4314)Paul Kehrer2018-07-061-113/+95
|
* set an OPENSSL_API_COMPAT level (#4313)Paul Kehrer2018-07-061-0/+5
| | | | | | | | | * 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)
* Make the docs clearer on why truncated tags are a bad idea (#4312)Alex Gaynor2018-07-061-4/+4
| | | | | | * Make the docs clearer on why truncated tags are a bad idea * clarify
* Don't change the cwd in travis scripts (#4309)Alex Gaynor2018-07-061-2/+4
|
* Fixes #4242 -- added an additional assert to make this test more resillient ↵Alex Gaynor2018-07-041-0/+2
| | | | (#4308)
* since the generator order is 570 bits this should be 570 (#4307)Paul Kehrer2018-07-041-1/+1
| | | but key_size is nonsense and we'll deprecate it next
* Add testing support of Python 3.7 (#4305)Eric Brown2018-07-041-0/+4
| | | | | | | | | | So pyca/cryptography's Python classifier already claims support of Python 3.7, but there is no testing matrix for it. This patch adds the recently released Python 3.7 to the matrix of testing. It requires sudo:true and xenial to pass. Fixes Issue #4301 Signed-off-by: Eric Brown <browne@vmware.com>
* Revert the const bits of #4220. (#4276)David Benjamin2018-06-291-1/+1
| | | | | | | | | | | | | | | | 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.)
* Add OID for RSASSA-PSS X.509 signature algorithm (RFC 4055) (#4294)Marti Raudsepp2018-06-293-0/+12
| | | | | | | | | | | | In 2005, IETF devised a more secure padding scheme to replace PKCS #1 v1.5. To make sure that nobody can easily support or use it, they mandated lots of complicated parameters in the certificate, unlike any other X.509 signature scheme. https://tools.ietf.org/html/rfc4055 `_SIG_OIDS_TO_HASH` and `Certificate.signature_hash_algorithm` cannot be supported as-is, because the hash algorithm is defined in the signature algorithm parameters, not by the OID itself.
* 6 and 7 are right next to each other (#4302)Paul Kehrer2018-06-281-1/+1
|
* Add py37 (#4298)Paul Kehrer2018-06-276-10/+14
| | | | | | | | | | | | | | * test against python 3.7 for windows * update docs to say we test on 3.7 * more succinct * maybe make this actually work. * link properly * moar changes
* Add serialisation output examples (#4286)Коренберг Марк2018-06-261-0/+24
|
* Exposed OpenSSL prime methods (#4292)Quinten Stokkink2018-06-221-0/+6
| | | These are required by the Tribler project.
* Perform an OPENSSL_cleanup before checking the heap in our memleak tests (#4293)Alex Gaynor2018-06-203-1/+18
| | | | | | | | | | * 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
* Add clearer message when key type is not bytes (#4289)Vladyslav Moisieienkov2018-06-203-0/+39
| | | | | | | | | | | | * Add clearer message in Cipher when key is not bytes * Change location of key type check to verify_key_size function * Replace formated error message with static * Add key type check tests to all ciphers constructors * Change key type error message to lowercase
* Correctly pass bytes; refs #4289 (#4290)Alex Gaynor2018-06-191-1/+1
|
* Correct pass bytes; refs #4289 (#4291)Alex Gaynor2018-06-191-1/+1
|
* Document project as stable and ready for use in production (#4284)Jon Dufresne2018-06-161-0/+1
|
* add downstream tests for awslabs/aws-dynamodb-encryption-python (#4280)Matt Bullock2018-06-122-0/+9
| | | | | | * add downstream tests for awslabs/aws-dynamodb-encryption-python * require recent OpenSSL for awslabs/dynamodb-encryption-python downstream tests
* Test certbot with OpenSSL 1.1.0 (#4278)Alex Gaynor2018-06-081-1/+1
| | | Their tests appear to require ALPN now, and the OpenSSL 1.0.1 that comes with the travis image doesn't have ALPN.
* LibreSSL 2.7.x support (#4270)Paul Kehrer2018-05-3010-17/+29
| | | | | | | | * libre 2.7.3 compatibility * add a changelog * actually build against 2.7.3
* Removes branches in bindings for various OpenSSL 1.1.0 prereleases (#4269)Alex Gaynor2018-05-316-18/+8
| | | | | | | | | | | | | | | | * 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
* simplify and parametrize DSA tests (#4267)Paul Kehrer2018-05-301-431/+239
|
* parametrize a few things in test_ec (#4268)Paul Kehrer2018-05-301-30/+13
|
* deprecate pythons without hmac.compare_digest (#4261)Paul Kehrer2018-05-243-0/+13
| | | | | | * deprecate the constant time bytes comparison path old python 2.7.x uses * pep8
* Fixed build errors on HP-UX. (#4259)dumol2018-05-222-2/+2
| | | | | | | | | | * Fixed build errors on HP-UX. * PEP 8 style fix. * No return for void function. * PEP 8 style fix, take 2.
* build and test libre on travis (#4256)Paul Kehrer2018-05-214-24/+27
| | | | | | * build and test libre on travis * remove libressl jenkinsfile data
* Make AuthorityKeyIdentifier docs reflect reality (#4252)Thom Dixon2018-05-181-1/+1
| | | The `AuthorityKeyIdentifier.authority_cert_issuer` docs state that it returns a `Name` instance, but it [actually returns a list of `GeneralName` instances or `None`](https://github.com/pyca/cryptography/blob/master/src/cryptography/x509/extensions.py#L157).
* Fixes #4228 -- move downstream builders to travis (#4250)Alex Gaynor2018-05-163-132/+76
| | | | | | * Fixes #4228 -- move downstream builders to travis * Use upstream twisted now that we've confirmed the problem
* remove block size as a required part of HashAlgorithm (#4249)Paul Kehrer2018-05-162-12/+0
| | | | | | Internal block size isn't a particularly useful piece of information and constructions like SHA3 make it even harder to determine what that really means. Accordingly, we're removing it from the interface (but leaving it on all existing hashes)
* Only send coverage for tox builds, in prep for #4228 (#4248)Alex Gaynor2018-05-161-10/+12
|
* satisfy shellcheck (#4247)Alex Gaynor2018-05-161-3/+3
|
* Cleanup unused err bindings. (#4246)David Benjamin2018-05-151-106/+0
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove ECDSA_sign_setup and *sign_ex bindings. (#4245)David Benjamin2018-05-151-5/+0
| | | | | | | | | | | 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.
* Remove macOS travis stuff, we don't intend to reenable it (#4244)Alex Gaynor2018-05-153-136/+27
|