summaryrefslogtreecommitdiff
path: root/tests/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Use pyo3's facilities for exceptions (#8785)Alex Gaynor2023-04-221-1/+1
|
* Remove coverage workaround that might not be required anymore (#8690)Alex Gaynor2023-04-101-3/+0
|
* cache ECDH values in wycheproof too (#8487)Paul Kehrer2023-03-101-2/+2
| | | | | 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
* Cache some keys that are reused in wycheproof tests (#8479)Alex Gaynor2023-03-101-4/+11
|
* Use the ruff 'pyupgrade' checks (#8104)Alex Gaynor2023-01-201-10/+10
|
* Switch from flake8 to ruff (#7920)Alex Gaynor2022-12-211-3/+1
| | | It's more than 60x faster.
* KBKDF: add CounterLocation.MiddleFixed (#7489)Jean Paul Galea2022-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * KBKDF: add CounterLocation.MiddleFixed * tests_kbkdf: add new tests - Test CounterLocation.MiddleFixed and blocation= * test_kbkdf_vectors: make use of MIDDLE_FIXED * docs: document KBKDF CounterLocation.MiddleFixed * s/blocation/break_location/g * CHANGELOG: document KBKDF{HMAC,CMAC} CounterLocation.MiddleFixed #7489 * kbkdf: fixed is static across n iterations, only the counter changes * kbkdf: check break_location is 0..len(fixed) - Update tests to assert exception is raised when break_location < 0 or > len(fixed) - When asserting for "break_location is ignored when MiddleFixed", use break_location=0 instead of =10, to ensure we don't raise because of break_location > len(fixed) - Assert that the right error messages are returned to the user. * kbkdf: keyword-only break_location * docs: document kw-only KBKDF{HMAC,CMAC}
* Remove explicit subclassing of object now that all classes are new-style (#6830)Alex Gaynor2022-01-301-1/+1
| | | As someone who first with Python in 2.4 or so, this habit is going to be hard to break.
* Factor some regexps into constants (#6713)Alex Gaynor2021-12-181-15/+17
|
* Fix mypy (#6711)Alex Gaynor2021-12-171-1/+1
| | | | | * Fix mypy * Poke for GHA
* type some more things in the tests (#6614)Paul Kehrer2021-11-171-1/+6
|
* enable mypy over tests (#5721)Paul Kehrer2021-01-311-14/+20
| | | | | | | | | * clean mypy with tests dir * remove most no_type_check annotations * le sigh * remove unneeded comments
* Complete removal of py2 (#5533)Alex Gaynor2020-12-091-6/+4
| | | | | * Drop Python 2 * Black everything
* Remove __future__ import from our code (#5610)Alex Gaynor2020-12-091-1/+0
|
* Simplify wycheproof pytest code (#5579)Alex Gaynor2020-11-201-7/+0
|
* Paint it Black by the Rolling Stones (#5324)Alex Gaynor2020-07-201-85/+76
|
* Refs #5075 -- use hkdf_*.json from wycheproof (#5190)Alex Gaynor2020-04-121-5/+9
|
* Replace floating point arithmetic with integer arithmetic (#5181)Torin Carey2020-04-041-4/+3
|
* Use dict literals. (#5080)Mads Jensen2019-12-021-1/+1
|
* Simplify string formatting (#4757)Alex Gaynor2019-02-201-3/+3
|
* shake128/256 support (#4611)Paul Kehrer2019-01-191-1/+1
| | | | | | | | | | | | | | * shake128/256 support * remove block_size * doc an exception * change how we detect XOF by adding _xof attribute * interface! * review feedback
* 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?
* update pytest config (#4463)Paul Kehrer2018-09-061-7/+5
| | | | | | | | | | | | | | * update pytest config pytest 3.8.0 was just released and officially deprecates some of the way we do pytest marks. They introduced a new way to do this in 3.6 so this PR switches to that mechanism and updates our minimum pytest requirement * update the stubs * also update wycheproof test config to remove deprecated paths * don't need this any more
* Refs #3331 -- integrated wycheproof ECDH tests (#4354)Alex Gaynor2018-07-181-0/+4
| | | | | | | | | | | | * Refs #3331 -- integrated wycheproof ECDH tests * flake8 + missing assert * Handle this error case * skip on unsupported * shouldn't need to try here any more
* Refs #3331 -- added initial wycheproof integration, starting with x25519, ↵Alex Gaynor2018-07-161-0/+41
| | | | | rsa, and keywrap (#4310) * Refs #3331 -- added initial wycheproof integration, starting with x25519 tests
* Allow DSA q=224 (#4147)Paul Kehrer2018-03-181-44/+18
| | | | | | | | * load Q=224 vectors * DSA parameters should support 224 for q length * oxford comma
* Debian sid is python3.6 now (#3968)Alex Gaynor2017-10-121-0/+3
| | | | | | * Debian sid is python3.6 now * Workaround because apparently measuring coverage correctly isn't a legitimate use case
* implement CCM vector parser (#3699)Paul Kehrer2017-06-211-0/+73
|
* ed25519 vector loader (#3707)Paul Kehrer2017-06-201-0/+17
| | | | | | * ed25519 vector loader * refactor to use unpacking
* call check_backend_support directly from backend fixture (#3666)Alex Gaynor2017-06-031-7/+4
|
* Switched our backend to be a normal fixture in tests (#3665)Alex Gaynor2017-06-031-9/+0
|
* Delete some code (#3563)Alex Gaynor2017-05-201-17/+0
| | | | | | | | * Delete some code * removed import * delete more code
* Adding CAVP vector parsing for NIST SP 800-108 KDF vectors. (#2865)Jared2016-04-131-0/+37
|
* Fix load_kasvs_ecdh_vectors() COUNT sourcingSimo Sorce2015-10-131-1/+1
| | | | | | | | | COUNT is a decimal number in test files, but was erroneously read and converted as if the source was a hexadecimal number. Fix the loader and test the fix. Signed-off-by: Simo Sorce <simo@redhat.com>
* Some cleanupsAlex Gaynor2015-09-241-12/+12
|
* Add vector loader for X9.63 vectorsSimo Sorce2015-09-241-0/+49
| | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* remove some more branching in the vector loadersPaul Kehrer2015-08-011-7/+4
|
* fixed testsAlex Gaynor2015-07-021-7/+5
|
* Improved coverage for tests, handle multiple pytest.mark.supported ↵Alex Gaynor2015-07-021-1/+4
| | | | decorators on one function
* fixAlex Gaynor2015-06-271-1/+2
|
* Simplified code in the test loaders and improved branch coverage in the x509 ↵Alex Gaynor2015-06-271-4/+0
| | | | tests
* Modify ECDH Test vector loader for KDF vectorsSimo Sorce2015-05-061-0/+4
| | | | | | Also add tests for the new vectors Signed-off-by: Simo Sorce <simo@redhat.com>
* Merge pull request #1876 from simo5/ECDHPaul Kehrer2015-05-061-0/+104
|\ | | | | Add loader for ECDH test vectors
| * Add loader for ECDH test vectorsSimo Sorce2015-05-011-0/+104
| | | | | | | | | | | | | | Also fix test vector files, they had a truncated line for the EE set in both init and resp files. Signed-off-by: Simo Sorce <simo@redhat.com>
* | Support loading of SECP256K1 vectorsAlex Stapleton2015-05-031-0/+1
|/
* Fixed new flake8 warnings from teh latest versionAlex Gaynor2015-02-151-2/+2
|
* add encode_rfc6979_signature and refactor tests to use itPaul Kehrer2014-11-271-17/+0
|
* alter vector file loader to support passing read modePaul Kehrer2014-11-271-2/+2
|
* Update the license header for every source file, as well as the documentation.Alex Gaynor2014-11-161-12/+3
| | | | Fixes #1209
* move skip_if_empty to separate function for test coveragePaul Kehrer2014-10-251-0/+9
|