diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-01 11:42:50 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-01 11:42:50 +0100 |
commit | b447ac3a6d1bb09ddb6a5686620670e223b37642 (patch) | |
tree | 4d6d1ca6d418b0dc7c50e0e94cef5038f5fb2483 /dev-python/tpm2-pytss/files | |
parent | 9a92076d428b51966bd8d699427341e5500b3a8a (diff) |
gentoo auto-resync : 01:10:2023 - 11:42:49
Diffstat (limited to 'dev-python/tpm2-pytss/files')
-rw-r--r-- | dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch b/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch new file mode 100644 index 000000000000..c1aeaee4dcd1 --- /dev/null +++ b/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-add-check-for-renamed-cryptography-types.patch @@ -0,0 +1,45 @@ +From e4006e6066c015d9ed55befa9b98247fbdcafd7d Mon Sep 17 00:00:00 2001 +From: Erik Larsson <who+github@cnackers.org> +Date: Mon, 26 Jun 2023 12:15:41 +0200 +Subject: [PATCH] test: add check for renamed cryptography types + +Some types have changed their names in newer cryptography release, so add them to the tests + +Signed-off-by: Erik Larsson <who+github@cnackers.org> +--- + test/test_crypto.py | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/test/test_crypto.py b/test/test_crypto.py +index 92cda00..7d7466e 100644 +--- a/test/test_crypto.py ++++ b/test/test_crypto.py +@@ -596,11 +596,23 @@ class CryptoTest(TSS2_EsapiTest): + + with self.assertRaises(ValueError) as e: + TPMT_SENSITIVE.from_pem(der) +- self.assertEqual(str(e.exception), "unsupported key type: _DSAPrivateKey") ++ self.assertIn( ++ str(e.exception), ++ ( ++ "unsupported key type: _DSAPrivateKey", ++ "unsupported key type: DSAPrivateKey", ++ ), ++ ) + + with self.assertRaises(ValueError) as e: + TPMT_PUBLIC.from_pem(dsa_public_key) +- self.assertEqual(str(e.exception), "unsupported key type: _DSAPublicKey") ++ self.assertIn( ++ str(e.exception), ++ ( ++ "unsupported key type: _DSAPublicKey", ++ "unsupported key type: DSAPublicKey", ++ ), ++ ) + + def test_from_pem_with_symmetric(self): + sym = TPMT_SYM_DEF_OBJECT(algorithm=TPM2_ALG.AES) +-- +2.41.0 + |