summarylogtreecommitdiffstats
path: root/gnupg2-large-keys.patch
blob: 631761597d96166435a128320309b0e867300e3a (plain)
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
39
40
41
42
43
44
diff --git a/g10/gpg.c b/g10/gpg.c
index 1a8e6e7..0d1e15e 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2059,7 +2059,7 @@ main (int argc, char **argv)
 #endif
 
     /* Initialize the secure memory. */
-    if (!gcry_control (GCRYCTL_INIT_SECMEM, 32768, 0))
+    if (!gcry_control (GCRYCTL_INIT_SECMEM, 131072, 0))
       got_secmem = 1;
 #if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
     /* There should be no way to get to this spot while still carrying
diff --git a/g10/keygen.c b/g10/keygen.c
index 6d3dfa6..6d362c0 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1175,7 +1175,7 @@ gen_elg (int algo, unsigned int nbits,
       nbits = 2048;
       log_info (_("keysize invalid; using %u bits\n"), nbits );
     }
-  else if (nbits > 4096)
+  else if (nbits > 65535)
     {
       nbits = 4096;
       log_info (_("keysize invalid; using %u bits\n"), nbits );
@@ -1442,7 +1442,7 @@ gen_rsa (int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
       nbits = 2048;
       log_info (_("keysize invalid; using %u bits\n"), nbits );
     }
-  else if (nbits > 4096)
+  else if (nbits > 65535)
     {
       nbits = 4096;
       log_info (_("keysize invalid; using %u bits\n"), nbits );
@@ -1781,7 +1781,7 @@ ask_algo (int addmode, int *r_subkey_algo, unsigned int *r_usage)
 static unsigned
 ask_keysize (int algo, unsigned int primary_keysize)
 {
-  unsigned int nbits, min, def = DEFAULT_STD_KEYSIZE, max=4096;
+  unsigned int nbits, min, def = DEFAULT_STD_KEYSIZE, max=65535;
   int for_subkey = !!primary_keysize;
   int autocomp = 0;