From 17097bf9577e4b9ef0989202918a74ebb46fdd69 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 27 Jun 2016 22:29:38 -0400 Subject: Fixed #3008 -- expose calculate max pss salt length (#3014) * 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 --- tests/hazmat/primitives/test_rsa.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/hazmat') diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index 9f3008e3..e4e43780 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1081,6 +1081,10 @@ class TestRSAPKCS1Verification(object): class TestPSS(object): + def test_calculate_max_pss_salt_length(self): + with pytest.raises(TypeError): + padding.calculate_max_pss_salt_length(object(), hashes.SHA256()) + def test_invalid_salt_length_not_integer(self): with pytest.raises(TypeError): padding.PSS( -- cgit v1.2.3