]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
some need gcry_ functions added. (for malloc etc)
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 31 Oct 2000 23:52:38 +0000 (23:52 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 31 Oct 2000 23:52:38 +0000 (23:52 +0000)
lib/gnutls.c

index f8408ba815d10d96bf1469a0dad92a5e54d64e98..46e0fc29e94bd203e8fcb9dab319ea5b795a39ae 100644 (file)
@@ -41,9 +41,15 @@ int _gnutls_valid_version(GNUTLS_STATE state, int major, int minor)
        return 1;
 }
 
+int gnutls_is_secure_memory(const void* mem) {
+       return 0;
+}
+
 /* This function initializes the state to null (null encryption etc...) */
 int gnutls_init(GNUTLS_STATE * state, ConnectionEnd con_end)
 {
+       gcry_set_allocation_handler(gnutls_malloc, secure_malloc,  gnutls_is_secure_memory, gnutls_realloc, free);
+
        *state = gnutls_calloc(1, sizeof(GNUTLS_STATE_INT));
        memset(*state, 0, sizeof(GNUTLS_STATE));
        (*state)->security_parameters.entity = con_end;