summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2014-05-22 21:57:25 +0000
committerbeck <beck@openbsd.org>2014-05-22 21:57:25 +0000
commit76d0b27586793d13ffc27d2a8e5041e1fe5fa49f (patch)
treea165fed77ee00b4c47ba0fc9d23c0ed59be0afe2
parentConvert OPENSSL_malloc stuff back to intrinsics, a few were missed (diff)
downloadwireguard-openbsd-76d0b27586793d13ffc27d2a8e5041e1fe5fa49f.tar.xz
wireguard-openbsd-76d0b27586793d13ffc27d2a8e5041e1fe5fa49f.zip
Mark the malloc wrapper functions as deprecated so warnings will
happen on their use. ok miod@
-rw-r--r--lib/libcrypto/crypto.h20
-rw-r--r--lib/libssl/src/crypto/crypto.h20
2 files changed, 24 insertions, 16 deletions
diff --git a/lib/libcrypto/crypto.h b/lib/libcrypto/crypto.h
index 00d3cc2aaed..df0701a02dc 100644
--- a/lib/libcrypto/crypto.h
+++ b/lib/libcrypto/crypto.h
@@ -471,20 +471,24 @@ void CRYPTO_get_mem_debug_functions(
void (**r)(void *, void *, int, const char *, int, int),
void (**f)(void *, int), void (**so)(long), long (**go)(void));
-void *CRYPTO_malloc_locked(int num, const char *file, int line);
-void CRYPTO_free_locked(void *ptr);
-void *CRYPTO_malloc(int num, const char *file, int line);
-char *CRYPTO_strdup(const char *str, const char *file, int line);
-void CRYPTO_free(void *ptr);
-void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
+void *CRYPTO_malloc_locked(int num, const char *file, int line)
+ __attribute__((deprecated));
+void CRYPTO_free_locked(void *ptr) __attribute__((deprecated));
+void *CRYPTO_malloc(int num, const char *file, int line)
+ __attribute__((deprecated));
+char *CRYPTO_strdup(const char *str, const char *file, int line)
+ __attribute__((deprecated));
+void CRYPTO_free(void *ptr) __attribute__((deprecated));
+void *CRYPTO_realloc(void *addr, int num, const char *file, int line)
+ __attribute__((deprecated));
void *CRYPTO_realloc_clean(void *addr, int old_num, int num,
const char *file, int line);
void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
void OPENSSL_cleanse(void *ptr, size_t len);
-void CRYPTO_set_mem_debug_options(long bits);
-long CRYPTO_get_mem_debug_options(void);
+void CRYPTO_set_mem_debug_options(long bits) __attribute__((deprecated));
+long CRYPTO_get_mem_debug_options(void) __attribute__((deprecated));
#define CRYPTO_push_info(info) \
CRYPTO_push_info_(info, __FILE__, __LINE__);
diff --git a/lib/libssl/src/crypto/crypto.h b/lib/libssl/src/crypto/crypto.h
index 00d3cc2aaed..df0701a02dc 100644
--- a/lib/libssl/src/crypto/crypto.h
+++ b/lib/libssl/src/crypto/crypto.h
@@ -471,20 +471,24 @@ void CRYPTO_get_mem_debug_functions(
void (**r)(void *, void *, int, const char *, int, int),
void (**f)(void *, int), void (**so)(long), long (**go)(void));
-void *CRYPTO_malloc_locked(int num, const char *file, int line);
-void CRYPTO_free_locked(void *ptr);
-void *CRYPTO_malloc(int num, const char *file, int line);
-char *CRYPTO_strdup(const char *str, const char *file, int line);
-void CRYPTO_free(void *ptr);
-void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
+void *CRYPTO_malloc_locked(int num, const char *file, int line)
+ __attribute__((deprecated));
+void CRYPTO_free_locked(void *ptr) __attribute__((deprecated));
+void *CRYPTO_malloc(int num, const char *file, int line)
+ __attribute__((deprecated));
+char *CRYPTO_strdup(const char *str, const char *file, int line)
+ __attribute__((deprecated));
+void CRYPTO_free(void *ptr) __attribute__((deprecated));
+void *CRYPTO_realloc(void *addr, int num, const char *file, int line)
+ __attribute__((deprecated));
void *CRYPTO_realloc_clean(void *addr, int old_num, int num,
const char *file, int line);
void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
void OPENSSL_cleanse(void *ptr, size_t len);
-void CRYPTO_set_mem_debug_options(long bits);
-long CRYPTO_get_mem_debug_options(void);
+void CRYPTO_set_mem_debug_options(long bits) __attribute__((deprecated));
+long CRYPTO_get_mem_debug_options(void) __attribute__((deprecated));
#define CRYPTO_push_info(info) \
CRYPTO_push_info_(info, __FILE__, __LINE__);