From f1792758b444803cf85cc14e3a96a00f03fd7421 Mon Sep 17 00:00:00 2001 From: Henrik Riomar Date: Thu, 6 Oct 2022 14:58:58 +0200 Subject: [PATCH] test_generate_params: use size 1024 Fixes: BotanDH.cpp(264): Failed to generate 512 bit DH parameters: DL_Group: prime size 512 is too small Neeed for botan 1.11.22 and later --- tests/test_dh.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_dh.py b/tests/test_dh.py index a95be94..c6b3f32 100644 --- a/tests/test_dh.py +++ b/tests/test_dh.py @@ -114,10 +114,10 @@ def test_load_params(self): @requires(Mechanism.DH_PKCS_PARAMETER_GEN, Mechanism.DH_PKCS_KEY_PAIR_GEN) def test_generate_params(self): - params = self.session.generate_domain_parameters(KeyType.DH, 512) + params = self.session.generate_domain_parameters(KeyType.DH, 1024) self.assertIsInstance(params, DomainParameters) - self.assertEqual(params[Attribute.PRIME_BITS], 512) - self.assertEqual(len(params[Attribute.PRIME]) * 8, 512) + self.assertEqual(params[Attribute.PRIME_BITS], 1024) + self.assertEqual(len(params[Attribute.PRIME]) * 8, 1024) encode_dh_domain_parameters(params) # Test encoding the public key