mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
gpgv: Init Libgcrypt to avoid syslog warning.
* g10/gpgv.c (main): Check libgcrypt version and disable secure
memory.
--
GnuPG-bug-id: 1376
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 3966eb2445
)
Resolved conflicts:
g10/gpgv.c
This commit is contained in:
parent
5ca482d5f9
commit
7c4bfa599f
10
g10/gpgv.c
10
g10/gpgv.c
@ -151,11 +151,18 @@ main( int argc, char **argv )
|
|||||||
i18n_init();
|
i18n_init();
|
||||||
init_common_subsystems (&argc, &argv);
|
init_common_subsystems (&argc, &argv);
|
||||||
|
|
||||||
|
if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
|
||||||
|
{
|
||||||
|
log_fatal ( _("%s is too old (need %s, have %s)\n"), "libgcrypt",
|
||||||
|
NEED_LIBGCRYPT_VERSION, gcry_check_version (NULL) );
|
||||||
|
}
|
||||||
|
gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
|
||||||
|
|
||||||
gnupg_init_signals (0, NULL);
|
gnupg_init_signals (0, NULL);
|
||||||
|
|
||||||
opt.command_fd = -1; /* no command fd */
|
opt.command_fd = -1; /* no command fd */
|
||||||
opt.pgp2_workarounds = 1;
|
opt.pgp2_workarounds = 1;
|
||||||
opt.keyserver_options.options|=KEYSERVER_AUTO_KEY_RETRIEVE;
|
opt.keyserver_options.options |= KEYSERVER_AUTO_KEY_RETRIEVE;
|
||||||
opt.trust_model = TM_ALWAYS;
|
opt.trust_model = TM_ALWAYS;
|
||||||
opt.batch = 1;
|
opt.batch = 1;
|
||||||
|
|
||||||
@ -164,6 +171,7 @@ main( int argc, char **argv )
|
|||||||
tty_no_terminal(1);
|
tty_no_terminal(1);
|
||||||
tty_batchmode(1);
|
tty_batchmode(1);
|
||||||
dotlock_disable ();
|
dotlock_disable ();
|
||||||
|
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
|
||||||
|
|
||||||
pargs.argc = &argc;
|
pargs.argc = &argc;
|
||||||
pargs.argv = &argv;
|
pargs.argv = &argv;
|
||||||
|
Loading…
Reference in New Issue
Block a user