summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* don't use a set (#8931)Paul Kehrer2023-05-161-0/+41
| | | | | | | | * don't use a set We don't need one here and it creates ordering instability when iterating over an RDN * add a test
* support PSS signatures in verify_directly_issued_by (#8908)Paul Kehrer2023-05-141-0/+44
|
* support X.509 certificate PSS signing (#8888)Paul Kehrer2023-05-101-0/+163
| | | | | | | | | | | | | * support X.509 certificate PSS signing no CSR, CRL, etc * handle PSS.(MAX_LENGTH, DIGEST_LENGTH), review feedback * name the kwarg * test improvements * skip if sha3 isn't supported
* certificate: add a `get_extension` helper (#8892)William Woodruff2023-05-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * certificate: add a `get_extension` helper Signed-off-by: William Woodruff <william@trailofbits.com> * certificate: OID by ref Signed-off-by: William Woodruff <william@trailofbits.com> * certificate: syntax Signed-off-by: William Woodruff <william@trailofbits.com> * x509, src: `check_duplicate_extensions` Signed-off-by: William Woodruff <william@trailofbits.com> * src: simplify Signed-off-by: William Woodruff <william@trailofbits.com> * src: everyone loves newtypes Signed-off-by: William Woodruff <william@trailofbits.com> * rust: refactor-o-rama Signed-off-by: William Woodruff <william@trailofbits.com> * src: look upon my works Signed-off-by: William Woodruff <william@trailofbits.com> * src: continue blasting the code Signed-off-by: William Woodruff <william@trailofbits.com> * src/rust: actually commit my changes Signed-off-by: William Woodruff <william@trailofbits.com> * src: clippage Signed-off-by: William Woodruff <william@trailofbits.com> * relocate Signed-off-by: William Woodruff <william@trailofbits.com> * src: dedupe Signed-off-by: William Woodruff <william@trailofbits.com> * src: cleanup Signed-off-by: William Woodruff <william@trailofbits.com> * clippage Signed-off-by: William Woodruff <william@trailofbits.com> * src: dedupe Signed-off-by: William Woodruff <william@trailofbits.com> * common: cleanup Signed-off-by: William Woodruff <william@trailofbits.com> * src: unused impls Signed-off-by: William Woodruff <william@trailofbits.com> * more deletion Signed-off-by: William Woodruff <william@trailofbits.com> * clippage Signed-off-by: William Woodruff <william@trailofbits.com> * extensions: add a `get_extension` test Signed-off-by: William Woodruff <william@trailofbits.com> * extensions: unused derives Signed-off-by: William Woodruff <william@trailofbits.com> * tests/x509: dup ext check for tbs_precertificate_bytes Signed-off-by: William Woodruff <william@trailofbits.com> * certificate: remove `extensions()` Signed-off-by: William Woodruff <william@trailofbits.com> * extensions: docs Signed-off-by: William Woodruff <william@trailofbits.com> * extensions: newtype Signed-off-by: William Woodruff <william@trailofbits.com> * rust: better error types, dedupe Signed-off-by: William Woodruff <william@trailofbits.com> extensions: unwrap -> expect Signed-off-by: William Woodruff <william@trailofbits.com> * Revert "rust: better error types, dedupe" This reverts commit 212b75ff2f69a3b3cfc9d6a55949f23877f8f618. --------- Signed-off-by: William Woodruff <william@trailofbits.com>
* add signature_algorithm_parameters to certificate (#8795)Paul Kehrer2023-05-071-9/+83
| | | | this allows easier verification of cert signatures, but more specifically allows PSS signature verification
* invalid visible string support (#8884)Paul Kehrer2023-05-071-0/+19
| | | | | | | | | | | | * invalid visible string support this allows utf8 in visiblestring, which is not valid DER. we raise a warning when this happens, but allow it since belgian eIDs, among others, have encoding errors. Belgium fixed this by 2021 (and possibly earlier), but their eID certificates have 10 year validity. * review comments * clippy
* Migrate DH to Rust (#8768)Alex Gaynor2023-04-247-41/+49
|
* Use pyo3's facilities for exceptions (#8785)Alex Gaynor2023-04-221-1/+1
|
* Convert HMAC to Rust (#8781)Alex Gaynor2023-04-222-1/+5
|
* Added a benchmark for hmac (#8776)Alex Gaynor2023-04-211-0/+14
|
* Convert hashes to Rust (#8775)Alex Gaynor2023-04-211-1/+0
|
* Added a benchmark for hashing (#8774)Alex Gaynor2023-04-211-0/+14
|
* drop libressl 3.5.x support (#8741)Paul Kehrer2023-04-161-2/+1
| | | OpenBSD 7.1 is no longer supported so neither is LibreSSL 3.5.x
* add support for aes256-gcm@openssh.com decryption for SSH keys (#8738)Paul Kehrer2023-04-151-1/+44
| | | | | | | * add support for aes256-gcm@openssh.com decryption for SSH keys * review feedback * skip when bcrypt isn't present
* Remove unused parameter (#8707)Alex Gaynor2023-04-111-10/+0
|
* Convert ed448 to Rust (#8705)Alex Gaynor2023-04-111-0/+3
|
* Convert ed25519 to Rust (#8697)Alex Gaynor2023-04-101-0/+3
|
* Added extra test cases for Ed25519 serialization (#8703)Alex Gaynor2023-04-101-0/+12
|
* support equality checks on all public asymmetric key types (#8700)Paul Kehrer2023-04-108-1/+136
| | | | | * support equality checks on all public asymmetric key types * review feedback
* Support msCertificateTemplate extension (#8695)Paul Kehrer2023-04-102-0/+99
| | | | | | | * support ms certificate template * contortions for rust coverage * review feedback
* Remove coverage workaround that might not be required anymore (#8690)Alex Gaynor2023-04-101-3/+0
|
* Switch from pytest-subtests to a mini-version that's faster (#8613)Alex Gaynor2023-03-291-0/+19
|
* Added support for OCSP AcceptableResponses extension (#8617)Alex Gaynor2023-03-272-0/+79
| | | fixes #8589
* Add benchmark for loading DER certificates (#8597)Alex Gaynor2023-03-241-0/+10
|
* Upgrade to pyo3 0.18 (#6935)Alex Gaynor2023-03-241-1/+1
| | | | | | | * Upgrade to pyo3 0.16 * Upgrade to pyo3 0.17 * Upgrade to pyo3 0.18
* remove a test dep (#8446)Paul Kehrer2023-03-241-5/+4
|
* drop python 3.6 support (#8448)Paul Kehrer2023-03-241-6/+0
| | | | | | | | | | | * drop python 3.6 support * Update tests/hazmat/bindings/test_openssl.py Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> --------- Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* drop support for openssl < 1.1.1d (#8449)Paul Kehrer2023-03-243-175/+1
| | | | | This removes the OS random engine, which contained the only CPython PSF licensed code in the repository. Accordingly, that license has now been removed.
* Migrate x25519 to use rust-openssl (#7933)Alex Gaynor2023-03-241-1/+46
|
* remove hypothesis from our test suite (#8560)Paul Kehrer2023-03-214-75/+0
| | | | we weren't really getting any value from it and we haven't expanded our use in numerous years
* Added support for handling python buffers in Rust code (#8556)Alex Gaynor2023-03-211-0/+25
| | | This is extra mega cursed, and strictly speaking unsound. It does, however, match the status quo ante, where someone mutating a buffer while its being used in cffi code will basically always be UB.
* Simplify/unify Rust and Python OpenSSL error handling (#8552)Alex Gaynor2023-03-202-4/+3
|
* fix logic for this skip (#8542)Alex Gaynor2023-03-181-1/+1
|
* skip memleak tests on pypy (#8540)Alex Gaynor2023-03-181-2/+4
| | | See: https://github.com/pyca/cryptography/pull/7933#issuecomment-1471865194 + https://foss.heptapod.net/pypy/pypy/-/issues/3905#note_290457 to understand why
* Support handling OpenSSL errors from Rust code (#8530)Alex Gaynor2023-03-161-1/+25
|
* Ressurect the PoC of OpenSSL from Rust (#7164)Alex Gaynor2023-03-151-22/+32
|
* Stop validating keys in ECDH exchange (#8490)Alex Gaynor2023-03-111-7/+1
| | | | | The theory here is that we're already doing sufficient validation key loading, and this is purely duplicative. Note that there's at least _some_ validationg that was previously occurring only ECDH, the LowOrderPublic check that can be seen in wycheproof.
* cache ECDH values in wycheproof too (#8487)Paul Kehrer2023-03-104-25/+32
| | | | | this alters and renames the caching function a bit since it caches *to the group* object but the actual values (in ECDH) come from the testcase itself
* speed up RSA key loading in tests a bit more (#8486)Paul Kehrer2023-03-093-20/+38
|
* Cache some keys that are reused in wycheproof tests (#8479)Alex Gaynor2023-03-103-25/+50
|
* Small cleanups: (#8476)Alex Gaynor2023-03-091-10/+4
| | | | - Avoid typing.cast - Consolidate bn_ctx allocations
* add EC key load benchmark (#8473)Paul Kehrer2023-03-081-0/+13
|
* Make Union type aliases a documented public API (#8168)Marti Raudsepp2023-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename Union type aliases to CamelCase Many `typing.Union` type aliases were previously using `UPPER_SNAKE_CASE`, but Python's convention is `CamelCase` for these (e.g. https://docs.python.org/3/library/typing.html#type-aliases) * Add utils.deprecated for the old non-underscore type aliases * Added documentation for new type aliases & minor tweaks * Use 'versionadded:: 40.0.0' * Fix CertificatePublicKeyTypes vs CertificateIssuerPublicKeyTypes. Rename CertificatePrivateKeyTypes to CertificateIssuerPrivateKeyTypes * Fix imports (ruff) * Fix one more versionadded * Tweak docs & Reorder: CertificateIssuerPublicKeyTypes before CertificateIssuerPrivateKeyTypes * Fix test mypy errors using cast() * Fix black, oops * Revert "Fix black, oops" This reverts commit 85344e231d697bdc0940e105f7aed729445f9743. * Revert "Fix test mypy errors using cast()" This reverts commit b272d8ca95fbbbc62060663f9e8930a139a7a43e. * Revert type of SubjectKeyIdentifier.from_public_key arg * Changelog tweak
* refactor PBKDF2HMAC test vectors and skip one test (#8467)Paul Kehrer2023-03-062-32/+20
| | | | The test in question has 2**24 iterations and doesn't represent an interesting edge case in the algorithm, just a high iteration count.
* Remove a zillion pointless backenda args in x509 tests (#8466)Alex Gaynor2023-03-073-272/+12
|
* remove memleak tests for x509 paths that no longer use openssl (#8461)Paul Kehrer2023-03-061-162/+0
|
* use the rsa fixtures in x509 too (#8460)Paul Kehrer2023-03-063-150/+271
| | | | | * use the rsa fixtures in x509 too * use strings in __all__
* double the speed of our rsa tests (#8458)Paul Kehrer2023-03-061-121/+243
| | | | | | | | | | | | | | * double the speed of our rsa tests this both creates a reusable fixture for our most commonly used private keys as well as disables key validation. as always, disabling key validation should not be done unless you never parse untrusted key input. unsurprisingly, our tests are trusted and understood input (and we also continue to have tests where we run check key to verify that it catches corrupt things) * fix typing * explain why we don't use the rsa_key_2048 fixture in the blinding test
* remove pytz test dependency (#8447)Paul Kehrer2023-03-053-18/+10
|
* Update to the new wycheproof (#8403)Alex Gaynor2023-02-282-1/+25
|