summarylogtreecommitdiffstats
path: root/gnupg-large-rsa.patch
blob: 53c806029d67d7a9ff84a7ed09ab64ae1a18fb57 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
diff -ru a/configure b/configure
--- a/configure	2016-01-26 13:54:50.000000000 +0100
+++ b/configure	2016-03-06 18:34:29.190228228 +0100
@@ -2861,7 +2861,7 @@
 
 ac_config_headers="$ac_config_headers config.h"
 
-am__api_version='1.14'
+am__api_version='1.15'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
diff -ru a/configure.ac b/configure.ac
--- a/configure.ac	2016-01-26 10:36:37.000000000 +0100
+++ b/configure.ac	2017-03-01 15:00:00.000000000 +0100
@@ -19,7 +19,7 @@
 
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.61)
-min_automake_version="1.14"
+min_automake_version="1.15"
 
 # To build a release you need to create a tag with the version number
 # (git tag -s gnupg-2.n.m) and run "./autogen.sh --force".  Please
@@ -242,7 +242,7 @@
               large_secmem=$enableval, large_secmem=no)
 AC_MSG_RESULT($large_secmem)
 if test "$large_secmem" = yes ; then
-   SECMEM_BUFFER_SIZE=65536
+   SECMEM_BUFFER_SIZE=67108864
 else
    SECMEM_BUFFER_SIZE=32768
 fi
diff -ru a/g10/keygen.c b/g10/keygen.c
--- a/g10/keygen.c	2016-01-26 10:36:37.000000000 +0100
+++ b/g10/keygen.c	2017-03-01 15:00:00.000000000 +0100
@@ -1611,7 +1611,7 @@
   int err;
   char *keyparms;
   char nbitsstr[35];
-  const unsigned maxsize = (opt.flags.large_rsa ? 8192 : 4096);
+  const unsigned maxsize = (opt.flags.large_rsa ? 16384 : 4096);
 
   log_assert (is_RSA(algo));
 
@@ -2101,6 +2101,12 @@
       *max=441;
       def=255;
       break;
+
+    case PUBKEY_ALGO_RSA:
+      *min = opt.compliance == CO_DE_VS ? 2048 : 1024;
+      *max = (opt.flags.large_rsa?16384:4096);
+      def = 2048;
+      break;
     }
 
   tty_printf(_("%s keys may be between %u and %u bits long.\n"),