File: tests-key-size.patch

package info (click to toggle)
python-pgpy 0.6.0-1.5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,220 kB
  • sloc: python: 8,453; makefile: 155; sh: 10
file content (38 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: Increase key sizes from 512 to 1024 as required by cryptography 43.
Bug-Debian: https://bugs.debian.org/1081366
Author: Andrey Rakhmatullin <wrar@debian.org>
Last-Update: 2024-09-16

Index: python-pgpy-0.6.0/tests/test_10_exceptions.py
===================================================================
--- python-pgpy-0.6.0.orig/tests/test_10_exceptions.py
+++ python-pgpy-0.6.0/tests/test_10_exceptions.py
@@ -57,16 +57,16 @@ def targette_pub():
 
 @pytest.fixture(scope='module')
 def temp_subkey():
-    return PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 512)
+    return PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 1024)
 
 
 @pytest.fixture(scope='module')
 def temp_key():
     u = PGPUID.new('User')
-    k = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 512)
+    k = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 1024)
     k.add_uid(u, usage={KeyFlags.Certify, KeyFlags.Sign}, hashes=[HashAlgorithm.SHA1])
 
-    sk = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 512)
+    sk = PGPKey.new(PubKeyAlgorithm.RSAEncryptOrSign, 1024)
     k.add_subkey(sk, usage={KeyFlags.EncryptCommunications})
 
     return k
@@ -300,7 +300,7 @@ class TestPGPKey(object):
 
     @pytest.mark.parametrize('key_alg_rsa_depr', key_algs_rsa_depr, ids=[alg.name for alg in key_algs_rsa_depr])
     def test_new_key_deprecated_rsa_alg(self, key_alg_rsa_depr, recwarn):
-        k = PGPKey.new(key_alg_rsa_depr, 512)
+        k = PGPKey.new(key_alg_rsa_depr, 1024)
 
         w = recwarn.pop()
         assert str(w.message) == '{:s} is deprecated - generating key using RSAEncryptOrSign'.format(key_alg_rsa_depr.name)