diff options
| author | jsing <> | 2015-09-10 16:07:58 +0000 |
|---|---|---|
| committer | jsing <> | 2015-09-10 16:07:58 +0000 |
| commit | 25b994dfab3c9b00e25e427e65759e17f54683a0 (patch) | |
| tree | 82f6cd54b9e3d3957f8081b132f3bc16cabb42d6 /src | |
| parent | 67f9ef720252ddf452c6feea7d5a9ef16c2381f6 (diff) | |
| download | openbsd-25b994dfab3c9b00e25e427e65759e17f54683a0.tar.gz openbsd-25b994dfab3c9b00e25e427e65759e17f54683a0.tar.bz2 openbsd-25b994dfab3c9b00e25e427e65759e17f54683a0.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 '')
| -rw-r--r-- | src/lib/libcrypto/crypto.h | 21 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/crypto.h | 21 |
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 | |||
| 325 | int CRYPTO_mem_ctrl(int mode); | 310 | int CRYPTO_mem_ctrl(int mode); |
| 326 | int CRYPTO_is_mem_check_on(void); | 311 | int 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 | |||
| 325 | int CRYPTO_mem_ctrl(int mode); | 310 | int CRYPTO_mem_ctrl(int mode); |
| 326 | int CRYPTO_is_mem_check_on(void); | 311 | int CRYPTO_is_mem_check_on(void); |
| 327 | 312 | ||
