mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
gpg: Add build and runtime support for larger RSA keys
* configure.ac: Added --enable-large-secmem option.
* g10/options.h: Add opt.flags.large_rsa.
* g10/gpg.c: Contingent on configure option: adjust secmem size,
add gpg --enable-large-rsa, bound to opt.flags.large_rsa.
* g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa
* doc/gpg.texi: Document --enable-large-rsa.
--
This is a cherry-pick of 534e2876ac
from
STABLE-BRANCH-1-4 against STABLE-BRANCH-2-0
Some older implementations built and used RSA keys up to 16Kib, but
the larger secret keys now fail when used by more recent GnuPG, due to
secure memory limitations.
Building with ./configure --enable-large-secmem will make gpg
capable of working with those secret keys, as well as permitting the
use of a new gpg option --enable-large-rsa, which let gpg generate RSA
keys up to 8Kib when used with --batch --gen-key.
Debian-bug-id: 739424
Minor edits by wk.
GnuPG-bug-id: 1732
This commit is contained in:
parent
39c5d991a8
commit
f952fe8c6d
5 changed files with 51 additions and 3 deletions
17
configure.ac
17
configure.ac
|
@ -83,6 +83,7 @@ use_exec=yes
|
|||
disable_keyserver_path=no
|
||||
use_ccid_driver=yes
|
||||
use_standard_socket=no
|
||||
large_secmem=no
|
||||
|
||||
GNUPG_BUILD_PROGRAM(gpg, yes)
|
||||
GNUPG_BUILD_PROGRAM(gpgsm, yes)
|
||||
|
@ -174,6 +175,22 @@ AC_ARG_ENABLE(selinux-support,
|
|||
selinux_support=$enableval, selinux_support=no)
|
||||
AC_MSG_RESULT($selinux_support)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether to allocate extra secure memory])
|
||||
AC_ARG_ENABLE(large-secmem,
|
||||
AC_HELP_STRING([--enable-large-secmem],
|
||||
[allocate extra secure memory]),
|
||||
large_secmem=$enableval, large_secmem=no)
|
||||
AC_MSG_RESULT($large_secmem)
|
||||
if test "$large_secmem" = yes ; then
|
||||
SECMEM_BUFFER_SIZE=65536
|
||||
else
|
||||
SECMEM_BUFFER_SIZE=32768
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(SECMEM_BUFFER_SIZE,$SECMEM_BUFFER_SIZE,
|
||||
[Size of secure memory buffer])
|
||||
|
||||
|
||||
# Allow disabling of bzib2 support.
|
||||
# It is defined only after we confirm the library is available later
|
||||
AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue