summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-04-18 15:57:41 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-04-18 16:24:29 +0200
commita37f86629a75c527d2866569b75a01197733fd19 (patch)
tree9ebab9fc6adb0fd9a01be8d2a5eef83bf53c371e /lib
parent5bbd3cbf5fa469998debea7aa8b3096be52aeedc (diff)
downloadgnutls-a37f86629a75c527d2866569b75a01197733fd19.tar.gz
Removed the already unused secure alloc functions.
Diffstat (limited to 'lib')
-rw-r--r--lib/auth/rsa_psk.c2
-rw-r--r--lib/gnutls_mem.c11
-rw-r--r--lib/gnutls_mem.h6
3 files changed, 1 insertions, 18 deletions
diff --git a/lib/auth/rsa_psk.c b/lib/auth/rsa_psk.c
index 258a1a3500..296d719796 100644
--- a/lib/auth/rsa_psk.c
+++ b/lib/auth/rsa_psk.c
@@ -148,7 +148,7 @@ _gnutls_gen_rsa_psk_client_kx(gnutls_session_t session,
gnutls_datum_t premaster_secret;
premaster_secret.size = GNUTLS_MASTER_SIZE;
premaster_secret.data =
- gnutls_secure_malloc(premaster_secret.size);
+ gnutls_malloc(premaster_secret.size);
if (premaster_secret.data == NULL) {
gnutls_assert();
diff --git a/lib/gnutls_mem.c b/lib/gnutls_mem.c
index b82c392bbf..e3b64fe93a 100644
--- a/lib/gnutls_mem.c
+++ b/lib/gnutls_mem.c
@@ -25,7 +25,6 @@
#include <gnutls_num.h>
#include <xsize.h>
-gnutls_alloc_function gnutls_secure_malloc = malloc;
gnutls_alloc_function gnutls_malloc = malloc;
gnutls_free_function gnutls_free = free;
gnutls_realloc_function gnutls_realloc = realloc;
@@ -43,16 +42,6 @@ void *_gnutls_calloc(size_t nmemb, size_t size)
return ret;
}
-svoid *gnutls_secure_calloc(size_t nmemb, size_t size)
-{
- svoid *ret;
- size_t n = xtimes(nmemb, size);
- ret = (size_in_bounds_p(n) ? gnutls_secure_malloc(n) : NULL);
- if (ret != NULL)
- memset(ret, 0, size);
- return ret;
-}
-
/* This realloc will free ptr in case realloc
* fails.
*/
diff --git a/lib/gnutls_mem.h b/lib/gnutls_mem.h
index 1f1da609cd..6505f6d950 100644
--- a/lib/gnutls_mem.h
+++ b/lib/gnutls_mem.h
@@ -23,17 +23,11 @@
#ifndef GNUTLS_MEM_H
#define GNUTLS_MEM_H
-typedef void svoid; /* for functions that allocate using gnutls_secure_malloc */
-
-extern int (*_gnutls_is_secure_memory) (const void *);
-
/* this realloc function will return ptr if size==0, and
* will free the ptr if the new allocation failed.
*/
void *gnutls_realloc_fast(void *ptr, size_t size);
-svoid *gnutls_secure_calloc(size_t nmemb, size_t size);
-
void *_gnutls_calloc(size_t nmemb, size_t size);
char *_gnutls_strdup(const char *);