aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* support bytes-like keys in CMAC and HMAC contexts (#4701)Paul Kehrer2019-01-162-2/+4
|
* add support for byteslike password/data to load_{pem,der}_private_key (#4693)Paul Kehrer2019-01-161-3/+1
| | | | | | * add support for byteslike password/data to load_{pem,der}_private_key * pypy 5.4 can't do memoryview from_buffer
* support byteslike in aead for key and nonce (#4695)Paul Kehrer2019-01-152-8/+10
|
* support byteslike in X448PrivateKey.from_private_bytes (#4694)Paul Kehrer2019-01-151-1/+2
|
* add support for byteslike on password and data for pkcs12 loading (#4690)Paul Kehrer2019-01-151-13/+37
| | | | | | | | | | | | * add support for byteslike on password and data for pkcs12 loading * use a contextmanager to yield a null terminated buffer we can zero * review feedback * updated text * one last change
* Remove a dead assignment (#4692)Alex Gaynor2019-01-151-1/+0
|
* Serialization x25519 (#4688)Paul Kehrer2019-01-145-8/+111
| | | | | | | | | | | | | | | | | * modify x25519 serialization to match x448 supports raw and pkcs8 encoding on private_bytes supports raw and subjectpublickeyinfo on public_bytes deprecates zero argument call to public_bytes * add docs * this is public now * don't need that * review feedback
* support x448 public/private serialization both raw and pkcs8 (#4653)Paul Kehrer2019-01-134-4/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * support x448 public/private serialization both raw and pkcs8 * add tests for all other asym key types to prevent Raw * more tests * better tests * fix a test * funny story, I'm actually illiterate. * pep8 * require PrivateFormat.Raw or PublicFormat.Raw with Encoding.Raw * missing docs * parametrize * docs fixes * remove dupe line * assert something
* Fixes #4683 -- fixed linux kernel version that has getrandom (#4684)Alex Gaynor2019-01-122-2/+2
|
* Add bindings to get SRTP protection profile (#4679)Jeremy Lainé2019-01-111-0/+6
| | | | | 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.
* add signature_hash_algorithm to OCSPResponse (#4681)Paul Kehrer2019-01-102-0/+17
| | | | | | * add signature_hash_algorithm to OCSPResponse * fix pointless asserts
* HTTPS a bunch of links in random places (#4666)Alex Gaynor2018-12-311-1/+1
| | | | | | * HTTPS a bunch of links in random places * What the heck happened here?
* Fixes #4645 -- poll() on /dev/random before reading from /dev/urandom on ↵Alex Gaynor2018-12-291-17/+55
| | | | | | | | | | | | | | | | | | 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
* Improve error message for unsupported ciphers (#4650)Alex Gaynor2018-12-181-6/+8
| | | | | | | | | | | | * Improve error message for unsupported ciphers * fix spacing * include the openssl version number in the message * backwards * pep8
* handle empty byte string in from_encoded_point (#4649)Paul Kehrer2018-12-171-0/+4
| | | | | | * handle empty byte string in from_encoded_point * move the error
* Remove spaces from RFC 4514 strings for better compliance (#4643) (#4646)Marti Raudsepp2018-12-181-1/+1
| | | | | | RFC 4514 does not explicitly allow whitespace between separators: https://tools.ietf.org/html/rfc4514 Reported-by: David Arnold <dar@xoe.solutions>
* deprecate old from_encoded_point (#4640)Paul Kehrer2018-12-112-0/+10
|
* Compressed point support (#4629)Paul Kehrer2018-12-113-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | * compressed point support * refactor to use oct2point directly * small docs change * remove deprecation for the moment and a bit of review feedback * no backend arg, implicitly import it * missed a spot * double oops * remove superfluous call * use refactored method * use vector file * one last item
* convert some asserts to function calls (#4636)Paul Kehrer2018-12-101-10/+14
|
* ec key creation by curve name refactored into a method (#4634)Paul Kehrer2018-12-101-21/+10
| | | | | | * ec key creation by curve name refactored into a method * typo
* allow bytes-like for key/iv/data for symmetric encryption (#4621)Paul Kehrer2018-12-094-17/+29
| | | | | | | | | | | | | | | | | | * allow bytearrays for key/iv for symmetric encryption * bump pypy/cffi requirements * update docs, fix some tests * old openssl is naught but pain * revert a typo * use trusty for old pypy * better error msg again * restore match
* Adds a more descriptive error msg for wrong wrapping (#4504)André Almeida2018-12-081-3/+12
| | | | | | | | | | | | | | | | | | | | * PoC code for check PEM wrap * Remove PoC check wrap code * Add PEM file info to FAQ * Add FAQ/PEM link in exception message * Fix flake8 style issues * refactor, update language * it's really amazing how bad the spell checker is * review feedback * change to etc
* Updated BLAKE2s and BLAKE2b error messages from unsupportedalgorithm … (#4519)Colin Metcalf2018-12-081-14/+6
| | | | | | | | | | | | | | | | | * Updated BLAKE2s and BLAKE2b error messages from unsupportedalgorithm exception to an explicit error. The error is now "ValueError: Digest size must be 32" (or 64 for BLAKE2b) This was done to give a more contextual error message and should be in place until OpenSSL supports variable lengths. * Updated if statements in hashes.py so that they no longer wrap to separate line. Updated test_hashes.py to unclude a test for non 32 or 64 digest_sizes that fall between 0-32/64. * Removed the new tests in test_hashes.py as the old ones were satisfactory. This also solved misaligned tabs and spaces. * Removed dead code in hashes.py that could no longer be reached after error message updates. * pep8 fix * remove superfluous parens
* Raise MemoryError when backend.derive_scrypt can't malloc enough (#4592)Tux2018-12-082-1/+20
| | | | | | | | | | | | * 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
* Add RFC 4514 Distinguished Name formatting for Name, RDN and NameAttribute ↵Marti Raudsepp2018-12-082-4/+70
| | | | (#4304)
* remove idna as a primary dependency (#4624)Paul Kehrer2018-12-061-12/+17
| | | | | | | | | | * remove idna as a primary dependency * empty commit * dynamodb test fix (thanks to Matt Bullock) * review feedback
* encode IssuingDistributionPoint (#4618)Paul Kehrer2018-12-021-0/+23
|
* centralize our bytes check (#4622)Paul Kehrer2018-12-0217-92/+50
| | | this will make life a bit easier when we support bytearrays
* switch osrandom engine to blocking mode when getting entropy (#4620)Paul Kehrer2018-12-022-15/+3
| | | | | | | | * switch osrandom engine to blocking mode when getting entropy * review feedback * we can remove this too
* reuse the libressl branch for OpenSSL built with OPENSSL_NO_PSK (#4619)Paul Kehrer2018-12-011-1/+1
|
* refactor some code into separate functions in asn1 encode (#4617)Paul Kehrer2018-12-011-20/+31
| | | | | | | | * refactor some code into separate functions in asn1 encode this will be useful in IDP encoding * review feedback
* allow multi-valued RDNs (#4616)Paul Kehrer2018-11-301-1/+1
| | | | RDNs can have multiple values. This allows them in FreshestCRL and upcoming IssuingDistributionPoint encoding support.
* IssuingDistributionPoint support (parse only) (#4552)Paul Kehrer2018-11-303-3/+159
| | | | | | | | | | | | | | | | | | | | | | * IssuingDistributionPoint support h/t to Irina Renteria for the initial work here * python 2 unfortunately still exists * py2 repr * typo caught by flake8 * add docs * review feedback * reorder args, other fixes * use the alex name * add changelog
* PKCS12 Basic Parsing (#4553)Paul Kehrer2018-11-282-0/+55
| | | | | | | | | | | | | | | | | | * PKCS12 parsing support * running all the tests is so gauche * rename func * various significant fixes * dangerous idiot here * move pkcs12 * docs updates * a bit more prose
* Move SSH serialization to it's own file (#4607)Alex Gaynor2018-11-244-148/+158
| | | | | | * Move SSH serialization to it's own file * flake8
* refactor serialization module into package (#4606)Paul Kehrer2018-11-233-11/+35
| | | | | | * refactor serialization into a package so we can add a pkcs12 module * oops
* Added comments reminding us to improve this code when we go 1.1.1+ only (#4605)Alex Gaynor2018-11-231-0/+4
|
* X448 support (#4580)Paul Kehrer2018-11-223-0/+145
| | | | | | | | | | | | | | | | | | | | * x448 support This work was originally authored by derwolfe * update docs to have a more useful derived key length * error if key is not a valid length in from_public_bytes * one more * switch to using evp_pkey_keygen_gc for x448 keygen * review feedback * switch to using evp_pkey_derive * nit fix
* refactor x25519 exchange into utils (#4603)Paul Kehrer2018-11-222-24/+27
|
* Import idna lazily to reduce our memory consumption (#4601)Alex Gaynor2018-11-231-2/+12
| | | We only use idna in deprecated paths at this point, so we shouldn't make people pay for it.
* add sha3 support (#4573)Paul Kehrer2018-11-221-0/+24
| | | | | | | | * add sha3 support * missed versionadded * add prose, remove block_size
* Adjust DTLS check (#4593)Rosen Penev2018-11-191-1/+1
| | | OpenSSL defines these even with OPENSSL_NO_DTLS.
* add EVPDigestFinalXOF for extendable output functions (#4589)Paul Kehrer2018-11-132-0/+14
|
* refactor x25519 keygen into evp_pkey_keygen (#4587)Paul Kehrer2018-11-131-7/+7
| | | this allows us to use the same code for ed25519, x448, and ed448
* Ed bindings (#4586)Paul Kehrer2018-11-133-0/+30
| | | | | | * add evp_pkey_ed25519 * ed448 bindings
* error if the key length for x25519 isn't 32 bytes (#4584)Paul Kehrer2018-11-121-0/+4
| | | | | | * error if the key length for x25519 isn't 32 bytes * also test 33
* add SHA512/224 and SHA512/256 support (#4575)Paul Kehrer2018-11-121-0/+14
| | | | | | * add SHA512/224 and SHA512/256 support * add missing docs
* add bindings for early data (#4582)Paul Kehrer2018-11-122-0/+13
| | | | | | * add bindings for early data * remove final var name
* add a little bit of x25519 interface docs we missed (#4574)Paul Kehrer2018-11-121-3/+9
|
* x448 bindings (#4577)Paul Kehrer2018-11-123-0/+24
|