diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-08-18 14:46:33 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-08-18 14:46:33 +0200 |
commit | bb0b38f2869b46e1e2edabdbcca8817540e4602c (patch) | |
tree | 7c48de096d2e39a8aa399067db4cceeb005ee227 /lib/gnutls_global.c | |
parent | 1f288c78dff0b673da9d0ad95ea848c233f27fd8 (diff) | |
download | gnutls-bb0b38f2869b46e1e2edabdbcca8817540e4602c.tar.gz |
Fix secure memory initialization of libgcrypt.
Reported by Joe Orton <joe@manyfish.co.uk> in
<http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/2992>.
Diffstat (limited to 'lib/gnutls_global.c')
-rw-r--r-- | lib/gnutls_global.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index ad0dde6c62..d94b926677 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -250,11 +250,6 @@ gnutls_global_init (void) return GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY; } - /* for gcrypt in order to be able to allocate memory */ - gcry_set_allocation_handler (gnutls_malloc, gnutls_secure_malloc, - _gnutls_is_secure_memory, gnutls_realloc, - gnutls_free); - /* gcry_control (GCRYCTL_DISABLE_INTERNAL_LOCKING, NULL, 0); */ gcry_control (GCRYCTL_INITIALIZATION_FINISHED, NULL, 0); @@ -267,6 +262,11 @@ gnutls_global_init (void) #endif } + /* for gcrypt in order to be able to allocate memory */ + gcry_set_allocation_handler (gnutls_malloc, gnutls_secure_malloc, + _gnutls_is_secure_memory, gnutls_realloc, + gnutls_free); + #ifdef DEBUG gnutls_global_set_log_function (dlog); #endif |