[PATCH] gpg: Actually allow generation of 8192-bit rsa keys

Luis Ressel aranea at aixah.de
Tue Jan 24 17:45:50 CET 2017


Currently, get_keysize_range() returns 4096 as an upper bound for the
size of RSA keys even if the option --enable-large-rsa is in use.
Therefore, interactive generation of 8192-bit RSA keys is currently
impossible.

Signed-off-by: Luis Ressel <aranea at aixah.de>
---
 g10/keygen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/g10/keygen.c b/g10/keygen.c
index 98ef29efb..ecbf80578 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -2104,7 +2104,7 @@ get_keysize_range (int algo, unsigned int *min, unsigned int *max)
 
     default:
       *min = opt.compliance == CO_DE_VS ? 2048: 1024;
-      *max = 4096;
+      *max = opt.flags.large_rsa ? 8192 : 4096;
       def = 2048;
       break;
     }
-- 
2.11.0




More information about the Gnupg-devel mailing list