Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/invalid
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos found by codespellArthur de Jong2021-08-101-1/+1
|
* Allow MAC over plaintext or ciphertextArthur de Jong2016-12-203-50/+7
| | | | | | | | | | | | | | | | | | RFC 6030 implies that the MAC should be performed over the ciphertext but some earlier drafts implied that the MAC should be performed on the plaintext. This change accpets the MAC if either the plaintext or ciphertext match. Note that this change allows for a padding oracle attack when CBC encryption modes are used because decryption (and unpadding) needs to be done before MAC checking. However, this module is not expected to be available to users to process arbitrary PSKC files repeatedly. This removes the tests for a missing MAC key (and replaces it for tests of missing EncryptionMethod) because falling back to using the encryption key (implemented in a444f78) in combination with this change means that decryption is performed before MAC checking and is no longer possible to trigger a missing MAC key error.
* Some minor improvements to the testsArthur de Jong2016-09-141-1/+1
|
* Improve branch coverageArthur de Jong2016-09-143-1/+80
| | | | This enables branch coverage testing and adds tests to improve coverage.
* Fall back to encryption key for MACArthur de Jong2016-04-231-0/+42
| | | | | | This uses the encryption key also as MAC key if no MAC key has been specified in the PSKC file. Earlier versions of the PSKC draft specified this behaviour.
* Improve tests and test coverageArthur de Jong2016-03-195-17/+77
| | | | | | | | | | This adds tests to ensure that incorrect attribute and value types in the PSKC file raise a ValueError exception and extends the tests for invalid encryption options. This removes some code or adds no cover directives to a few places that have unreachable code or are Python version specific and places doctest directives inside the doctests where needed.
* Re-organise test filesArthur de Jong2016-01-307-0/+202
This puts the test PSKC files in subdirectories so they can be organised more cleanly.