summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix XTS less than one block length. fixes #5885 (#5925)Paul Kehrer2021-03-211-0/+8
| | | | | * fix XTS less than one block length. fixes #5885 * make XTS test key happy
* typehint x509.base (#5899)Mathias Ertl2021-03-151-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * start typing x509.base * statically type x509.base * typehint X509Backend interface * typehint at least the X509Backend interface * make _CertificateRevocationList/_CertificateSigningRequest actual subclasses of the interface (as done before for Certificate in f16bff2cb) * tell mypy to ignore lines with deliberately wrong types * signature_hash_algorithm always returns a hash algorithm (it's not optional) * Revert "signature_hash_algorithm always returns a hash algorithm (it's not optional)" This reverts commit f6a5b172b416f8ddea561203c0cf03b55e4ec50e. * hash algorithm is actually optional * fix import style * typehint parsed_version to int, which it de facto always is * minimize changes * break import cycle with conditional imports * ignore access to private members of openssl implementation * reformat code with Black * test check for missing public key
* Typehint x509.base (only) (#5904)Mathias Ertl2021-03-111-4/+11
| | | | | | | | | | | | | | | | | * typehint x509.base * cast extension class * don't use string in typecast * use lists as default argument values (see #5904) * restore import since this is now re-exported * ignore linting errors * empty commit to trigger github actions * fix formatting issue
* Generic extension value/typehint x509.Name (#5897)Mathias Ertl2021-03-061-1/+1
| | | | | | | * make value property return the generic value * typehint x509.Name * also ignore overloaded functions
* more typing (#5887)Paul Kehrer2021-03-0217-30/+122
| | | | | | | | | | | * backend typing for twofactor package and more otp work * even more typing * style fixes * no generic typing for _get_backend * remove unneeded typing
* Delete unused register_interface_if (#5883)Alex Gaynor2021-03-011-23/+0
|
* Remove requires_backend_interface from tests because it was useless (#5884)Alex Gaynor2021-03-0152-519/+0
|
* changes to support typing backend (#5882)Paul Kehrer2021-02-281-0/+4
| | | this gets rid of the conditional backend type registration
* fix pkcs12 parse ordering. fixes #5872 (#5879)Paul Kehrer2021-02-281-1/+57
| | | | | | | | | | | | | | | | | * fix pkcs12 parse ordering. fixes #5872 * remove an unneeded print * simplify the test a bit more * index * black * Update tests/hazmat/primitives/test_pkcs12.py Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* Add SM4 symmetric block cipher (#5834)tobyp2021-02-281-0/+99
| | | Co-authored-by: Tobias Peter <tobias.peter@infineon.com>
* Add SM3 hash algorithm (#5833)tobyp2021-02-282-0/+26
| | | Co-authored-by: Tobias Peter <tobias.peter@infineon.com>
* Update comment (#5876)Alex Gaynor2021-02-271-1/+1
|
* Add key_identifier property to SubjectKeyIdentifier (#5849)Arnaud Durand2021-02-211-0/+1
| | | Fix #5848
* Fix typo in error messages: can not => cannot (#5851)Robert Martin2021-02-201-1/+1
|
* add typehints for read only properties (#5826)Mathias Ertl2021-02-152-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * add typehints for read only properties * fix typing in test cases * fix last missing assertion * add typehints to all read_only_properties where type hints are already available * check for isnot None instead, as per PR suggestion * convert read_only_property to @property decorators * remove unused import * use List instead of Iterable for return values * use @property instead of read_only_property * fix type errors * remove last occurance of annotated read_only_property * use is not None check (works because we now return list) * fix unused import
* Start replacing read_only_property with dedicated functions (#5824)Alex Gaynor2021-02-131-0/+6
| | | read_only_property is basically impossible for mypy to check
* part 2 of typing x509 extensions (#5815)Alex Gaynor2021-02-111-32/+70
|
* Start typing a bunch of stuff from x509 extensions (#5812)masterAlex Gaynor2021-02-113-20/+65
|
* Added a unit test to protect against import cycles (#5804)Alex Gaynor2021-02-091-0/+38
|
* Interface: Make annotation check optional (#5775)Christian Heimes2021-02-081-0/+24
| | | | | | | | | | | | | * Interface: Make annotation check optional Fixes: https://github.com/pyca/cryptography/issues/5774 Signed-off-by: Christian Heimes <cheimes@redhat.com> * Use param.replace() Co-authored-by: Stanislav Levin <slev@altlinux.org> Signed-off-by: Christian Heimes <cheimes@redhat.com> Co-authored-by: Stanislav Levin <slev@altlinux.org>
* Added typing for a bunch of random stuff (#5743)Alex Gaynor2021-02-044-7/+23
|
* Added typing for more of ciphers (#5738)Alex Gaynor2021-02-013-3/+6
|
* Added typing for a bunch of methods (#5737)Alex Gaynor2021-02-013-9/+6
|
* rsa type hinting (#5733)Paul Kehrer2021-02-013-15/+36
| | | | | | | | | | | | | | | | | | | * rsa type hinting * remove unused import * missed return type * type fixes * ignores no longer required * black gets me every time * Update src/cryptography/hazmat/backends/openssl/rsa.py Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
* KDF type hinting (#5735)Paul Kehrer2021-02-016-36/+73
| | | | | | | * KDF type hinting * more types * less contortions
* type hints for asym utils (#5734)Paul Kehrer2021-02-011-6/+6
|
* x25519/x448 type hints (#5731)Paul Kehrer2021-01-312-8/+12
| | | | | * x25519 type hints * x448 type hints
* poly1305 type hints (#5732)Paul Kehrer2021-01-311-6/+6
|
* add type hinting for ed25519 (#5728)Paul Kehrer2021-01-312-5/+9
|
* add EC type hinting (#5729)Paul Kehrer2021-01-312-10/+14
|
* ed448 type hints (#5730)Paul Kehrer2021-01-311-4/+8
|
* dsa type hinting (#5726)Paul Kehrer2021-01-311-11/+29
|
* DH types (#5725)Paul Kehrer2021-01-311-6/+6
|
* enable mypy over tests (#5721)Paul Kehrer2021-01-3134-185/+308
| | | | | | | | | * clean mypy with tests dir * remove most no_type_check annotations * le sigh * remove unneeded comments
* make PrivateKeyWithSerialization an alias of PrivateKey (#5722)Paul Kehrer2021-01-312-11/+7
| | | | | * make PrivateKeyWithSerialization an alias of PrivateKey * black
* type hinting for symmetric ciphers (#5719)Paul Kehrer2021-01-301-1/+1
| | | | | * type hinting for symmetric ciphers * make our interface verifier happy
* Apply type annotations to fernet (#5708)Alex Gaynor2021-01-291-3/+3
|
* Remove last large usage of parametrize with vectors (#5652)Alex Gaynor2020-12-172-112/+106
|
* xdist experiment (#5621)Paul Kehrer2020-12-101-0/+8
| | | | | | | | | | * switch to xdist in tox for faster runs * not using auto to avoid too many processes on local laptops * we need to use pytest-cov to generate coverage properly now * these env vars aren't present on no coverage builds * tox changes
* Convert a few more high cardinality tests to use subtests (#5632)Alex Gaynor2020-12-105-134/+134
|
* we already do this check in other places (#5624)Paul Kehrer2020-12-091-5/+1
| | | | | | | | | | | | * we already do this check in other places This test is *incredibly* expensive and we already do roundtrips like this on other DH groups. To make this test less expensive and also more accurate to its name we now verify that the parameters on the generated key match * empty commit the most important CI feature
* More test speedups via subtest + removal rather than skipping (#5617)Paul Kehrer2020-12-091-145/+140
| | | | | | | * subtests ec * continue instead of return * indentation
* Remove AES GCM < 64-bit IV tests instead of skipping (#5620)Paul Kehrer2020-12-091-4/+4
| | | | | | | * remove AES tests we will always skip * constrain <64-bit IV vector removal to just GCM * apparently this is only used by GCM
* subtest-ify keywrap (#5619)Paul Kehrer2020-12-091-80/+82
|
* use subtests in aead (#5618)Paul Kehrer2020-12-091-92/+88
|
* fixes #5611 -- use subtests for wycheproof tests for speed (#5616)Alex Gaynor2020-12-0915-39/+65
|
* Complete removal of py2 (#5533)Alex Gaynor2020-12-094-24/+11
| | | | | * Drop Python 2 * Black everything
* Remove utils.int_from_bytes (#5609)Alex Gaynor2020-12-093-15/+7
|
* Remove __future__ import from our code (#5610)Alex Gaynor2020-12-0989-95/+0
|
* Write a bunch of primitives tests as subtests for performance (#5246)Alex Gaynor2020-12-091-32/+40
|