aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
Commit message (Collapse)AuthorAgeFilesLines
* blake2b/blake2s support (#3116)Paul Kehrer2016-08-282-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | * blake2b/blake2s support Doesn't support keying, personalization, salting, or tree hashes so the API is pretty simple right now. * implement digest_size via utils.read_only_property * un-keyed for spelling's sake * test copying + digest_size checks * unkeyed is too a word * line wrap * reword the docs * use the evp algorithm name in the error This will make BLAKE2 alternate digest size errors a bit less confusing * add changelog entry and docs about supported digest_size
* OpenSSL 1.1.0 support (#2826)Paul Kehrer2016-08-262-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * make pre5 work * add a blank line to make the diff happier * 1.1.0-pre6 working * support the changes since 1.1.0-pre6 * fixes * add 1.1.0 to travis * expose the symbol * better testing for numericstring * handle libre... * actually use the 1.1.0 we compile * cache the ossl-110 dir on travis * add some newlines * changelog entry for 1.1.0 support * note that we test on 1.1.0 * proper skip on this test * reorder
* Enforce that p > q to improve OpenSSL compatibility (fixes #2990) (#3010)Dirkjan Ochtman2016-07-191-1/+2
|
* Add flag to toggle key length check for HOTP and TOTP. (#3012)Terry Chia2016-07-161-0/+4
| | | | | | | | | | * Add an enforce_key_length parameter to HOTP and TOTP. * Document changes in docs. * Add some words to the wordlist. * Add versionadded to docs.
* Use a series of constants for OpenSSL version checks (#3037)Alex Gaynor2016-07-112-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | * Use a series of constants for OpenSSL version checks. N.B. I removed several qualifiers that were being used to express beta vs. release in OpenSSL version numbers. Reviewers please look closely! * Convert some python as well, also add the file * flake8 * Simplify code, remove functionality that can be expressed more simply * clean up the tests as well * more constants * wrap long lines * reflect feedback * unused * add this back?
* disable blowfish in commoncrypto backend for key lengths under 64-bit (#3040)Paul Kehrer2016-07-101-0/+5
| | | | This is due to a bug in CommonCrypto present in 10.11.x. Filed as radar://26636600
* One shot sign/verification ECDSA (#3029)Aviv Palivoda2016-07-021-0/+22
| | | | | | | | | | | | | | * Add sign and verify methods to ECDSA * Documented ECDSA sign/verify methods * Added CHANGELOG entry * Skipping test verify and sign if curve is not supported * Fixed typo in documentation return type * Removed provider language from EllipticCurvePrivateKey and EllipticCurvePublicKey
* One shot sign/verify DSA (#3003)Aviv Palivoda2016-06-301-0/+20
| | | | | | | | * Add sign and verify methods to DSA * Documented DSA sign/verify methods * Added CHANGELOG entry
* Fixed #3008 -- expose calculate max pss salt length (#3014)Alex Gaynor2016-06-271-0/+4
| | | | | | | | | | | | | | * Fixed #3008 -- expose calculate max pss salt length * Fixed a few mistakes in the docs * move all the code around * oops * write a unit test * versionadded + changelog
* Complete the removal of the string '0.9.8' (#3005)Alex Gaynor2016-06-201-1/+1
| | | We have always been at war with OpenSSL 0.9.8
* Remove a binding and comments that reference 0.9.8 (#2984)Alex Gaynor2016-06-181-1/+1
|
* Drop OpenSSL 0.9.8 (#2978)Alex Gaynor2016-06-182-41/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Drop OpenSSL 0.9.8 * Drop this test, it's not relevant any longer * unused import * Remove CRYPTOGRAPHY_ALLOW_OPENSSL_098=1 from our tox * removed unused code for Cryptography_HAS_PKEY_CTX * return unused code for _AESCTRCipherContext * syntax :-( * remove some unused tests and skips * remove unused code for Cryptography_HAS_PBKDF2_HMAC * Revert "return unused code for _AESCTRCipherContext" This reverts commit 7d149729205aa4c9735eb322414b167a75b302df. * Remove unused RSA code * Remove unused test code for conditional bindings * Remove unused dsa code * unused import * Remove unused x509 extension code * Remove unused EC code * Attempt to remove unused DER key loading code * document this * grammar * Added back this paragraph * Update docs
* Add convenience methods to sign and verify w/ RSA (#2945)Colleen Murphy2016-06-041-0/+22
| | | | | | | | | This patch adds wrapper methods to allow the user to sign and verify a single message block without having to go through the multi-step process of creating a signer or verifier, updating it with the one message, and finalizing the result. This will make signing and verifying data more user-friendly when only using small messages. Partial bug #1529
* RSA OAEP SHA2 Support (#2956)Paul Kehrer2016-06-042-2/+189
| | | | | | | | | | | | | | | | | | | | * some rsa oaep sha2 support * various improvements * fix a thing * simplify * update the test * styyyyyle * more styyyyle * fix libre, remove a skip that should never be hit * OAEP version check fixes
* added a repr to the dsa numbers classes (#2961)Alex Gaynor2016-06-031-0/+15
| | | | | | | | * added a repr to the dsa numbers classes * fix * another test
* SSH serialization for public keys (#2957)Alex Gaynor2016-06-033-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SSH serialization for public keys * name errors ahoy! * id, ego, superego * dsa support * EC support * Don't keyerror * Documentation OpenSSH * flake8 * fix * bytes bytes bytes * skip curve unsupported * bytes! * Move a function * reorganize code for coverage
* Random grammar stuff (#2955)Alex Gaynor2016-06-021-1/+1
|
* Use teardown since we ignore the method arg anyways (#2928)Alex Gaynor2016-05-301-2/+1
|
* KBKDF cleanup (#2929)Paul Kehrer2016-05-291-5/+7
| | | | | | | | * unicode characters make everything angry * changelog entry and make skip msgs more informative * typo fix
* NIST SP 800-108 Counter Mode KDF (#2748)Jared2016-05-293-0/+226
| | | | | | | | | | | | | | | | | | * NIST SP 800-108 Counter Mode and Feedback Mode KDF * CounterKDF unit tests * Refactor to support multiple key based KDF modes. * Extracting supported algorithms for KBKDF Counter Mode test vectors * Adding support for different rlen and counter location in KBKDF * support for multiple L lengths and 24 bit counter length. * Adding KBKDF Documentation. * Refactoring KBKDF to KBKDFHMAC to describe hash algorithm used.
* Replacing test_osrandom_engine_is_default. (#2905)Andreas Moser2016-05-291-0/+12
| | | | | | | | | | | | | | | | | | | * Removing test_osrandom_engine_is_default. test_osrandom_engine_is_default depends on having a valid sys.executable. This attribute is not always set (see https://docs.python.org/2/library/sys.html#sys.executable ) so, in some environments, this test fails. I moved the functionality of the test into the setup and teardown methods so the correct behavior is still tested. * Fixing some style issues. * Removing an unnecessary newline. * Putting back the test. * Moving the assert from teardown to setup.
* Fixed #2887 -- implement __hash__ on EC numbers classes (#2888)Alex Gaynor2016-04-301-0/+24
|
* Handle two more error conditions correctlyAlex Gaynor2016-04-021-0/+11
| | | | | | * Handle two more error conditions correctly * fixed test case
* Use runtimeerror for thisAlex Gaynor2016-03-191-2/+1
|
* test for verify_openssl_versionAlex Gaynor2016-03-191-1/+8
|
* Merge pull request #2736 from cedk/ANSI_X.923Paul Kehrer2016-03-161-0/+92
|\ | | | | Added support for padding ANSI X.923
| * Add more tests since there is no more sub-classingCédric Krier2016-03-161-0/+29
| |
| * Add padding check for ANSI X.923Cédric Krier2016-02-271-0/+15
| | | | | | | | All padding bytes must be 0.
| * Added support for padding ANSI X.923Cédric Krier2016-02-271-0/+48
| |
* | Merge pull request #2815 from reaperhulk/error-on-unusual-encodingsAlex Gaynor2016-03-121-0/+21
|\ \ | | | | | | Error on unusual encodings
| * | py3 is a thingPaul Kehrer2016-03-121-1/+1
| | |
| * | move NUMERICSTRING certificate test to test_openssl & make it more specificPaul Kehrer2016-03-121-0/+21
| | |
* | | make multibackend error with an empty list. fixes #2717Paul Kehrer2016-03-111-5/+15
|/ /
* | use an error that's likely to be in all openssls we supportPaul Kehrer2016-03-081-12/+9
| |
* | review feedback + make the test actually test a thingPaul Kehrer2016-03-071-6/+15
| |
* | only call ERR_error_string if we're going to raise InternalErrorPaul Kehrer2016-03-071-1/+21
| |
* | require mode nonce/iv/tag data to be bytesPaul Kehrer2016-03-071-0/+30
| |
* | pass bytes to modes/algorithms like we shouldPaul Kehrer2016-03-0710-38/+38
| |
* | Merge pull request #2762 from alex/dedupe-doublesPaul Kehrer2016-03-0610-145/+42
|\ \ | | | | | | Un-double the test doubles
| * | Un-double the test doublesAlex Gaynor2016-03-0510-145/+42
| | |
* | | make the test function name make senseAlex Gaynor2016-03-051-1/+1
| | |
* | | move keyAlex Gaynor2016-03-052-73/+75
| | |
* | | wrap some very long linesAlex Gaynor2016-03-051-8/+80
| | |
* | | Added a failing test case for #2760Alex Gaynor2016-03-051-0/+36
|/ /
* / Send stderr someplaceAlex Gaynor2016-02-271-1/+2
|/ | | | Otherwise there's noise in the test output on python 2.6
* Actually allocate a buffer that is the correct size.Tristan Seligmann2016-02-081-2/+3
|
* support rsa key generation testing when key is not serializablePaul Kehrer2016-01-301-1/+10
|
* Write some tests for skip conditions in tests.Alex Gaynor2016-01-103-25/+63
| | | | Without this these branches aren't excersised without 0.9.8, but conceptually they are needed.
* give a real EVP_PKEY with an invalid default key type to the testPaul Kehrer2016-01-071-2/+0
|
* opaque EVP_PKEY since EVP_PKEY_id existsPaul Kehrer2016-01-071-1/+1
|