summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2015-09-10 16:07:58 +0000
committerjsing <>2015-09-10 16:07:58 +0000
commit37f61117b9f43c808ca9fa19c7bdb769bb8255c1 (patch)
tree82f6cd54b9e3d3957f8081b132f3bc16cabb42d6 /src
parent982b34ac106993362d290729a3b8b13449216085 (diff)
downloadopenbsd-37f61117b9f43c808ca9fa19c7bdb769bb8255c1.tar.gz
openbsd-37f61117b9f43c808ca9fa19c7bdb769bb8255c1.tar.bz2
openbsd-37f61117b9f43c808ca9fa19c7bdb769bb8255c1.zip
CRYPTO_set_mem_debug_functions() and CRYPTO_set_mem_functions() are already
noops, so neuter the CRYPTO_malloc_init and CRYPTO_malloc_debug_init macros. With input from miod@ ok beck@ bcook@ miod@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/crypto.h21
-rw-r--r--src/lib/libssl/src/crypto/crypto.h21
2 files changed, 6 insertions, 36 deletions
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index 68028d9c13..767c83491b 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.35 2015/06/20 12:01:54 jsing Exp $ */ 1/* $OpenBSD: crypto.h,v 1.36 2015/09/10 16:07:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -298,12 +298,8 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
298 * via CRYPTO_ex_data_new_class). */ 298 * via CRYPTO_ex_data_new_class). */
299#define CRYPTO_EX_INDEX_USER 100 299#define CRYPTO_EX_INDEX_USER 100
300 300
301/* This is the default callbacks, but we can have others as well: 301#define CRYPTO_malloc_init() (0)
302 * this is needed in Win32 where the application malloc and the 302#define CRYPTO_malloc_debug_init() (0)
303 * library malloc may not be the same.
304 */
305#define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\
306 malloc, realloc, free)
307 303
308#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD 304#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD
309# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */ 305# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */
@@ -311,17 +307,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
311# endif 307# endif
312#endif 308#endif
313 309
314/* Set standard debugging functions (not done by default
315 * unless CRYPTO_MDEBUG is defined) */
316#define CRYPTO_malloc_debug_init() do {\
317 CRYPTO_set_mem_debug_functions(\
318 CRYPTO_dbg_malloc,\
319 CRYPTO_dbg_realloc,\
320 CRYPTO_dbg_free,\
321 CRYPTO_dbg_set_options,\
322 CRYPTO_dbg_get_options);\
323 } while(0)
324
325int CRYPTO_mem_ctrl(int mode); 310int CRYPTO_mem_ctrl(int mode);
326int CRYPTO_is_mem_check_on(void); 311int CRYPTO_is_mem_check_on(void);
327 312
diff --git a/src/lib/libssl/src/crypto/crypto.h b/src/lib/libssl/src/crypto/crypto.h
index 68028d9c13..767c83491b 100644
--- a/src/lib/libssl/src/crypto/crypto.h
+++ b/src/lib/libssl/src/crypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.35 2015/06/20 12:01:54 jsing Exp $ */ 1/* $OpenBSD: crypto.h,v 1.36 2015/09/10 16:07:58 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -298,12 +298,8 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
298 * via CRYPTO_ex_data_new_class). */ 298 * via CRYPTO_ex_data_new_class). */
299#define CRYPTO_EX_INDEX_USER 100 299#define CRYPTO_EX_INDEX_USER 100
300 300
301/* This is the default callbacks, but we can have others as well: 301#define CRYPTO_malloc_init() (0)
302 * this is needed in Win32 where the application malloc and the 302#define CRYPTO_malloc_debug_init() (0)
303 * library malloc may not be the same.
304 */
305#define CRYPTO_malloc_init() CRYPTO_set_mem_functions(\
306 malloc, realloc, free)
307 303
308#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD 304#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD
309# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */ 305# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */
@@ -311,17 +307,6 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
311# endif 307# endif
312#endif 308#endif
313 309
314/* Set standard debugging functions (not done by default
315 * unless CRYPTO_MDEBUG is defined) */
316#define CRYPTO_malloc_debug_init() do {\
317 CRYPTO_set_mem_debug_functions(\
318 CRYPTO_dbg_malloc,\
319 CRYPTO_dbg_realloc,\
320 CRYPTO_dbg_free,\
321 CRYPTO_dbg_set_options,\
322 CRYPTO_dbg_get_options);\
323 } while(0)
324
325int CRYPTO_mem_ctrl(int mode); 310int CRYPTO_mem_ctrl(int mode);
326int CRYPTO_is_mem_check_on(void); 311int CRYPTO_is_mem_check_on(void);
327 312