summaryrefslogtreecommitdiffstats
path: root/crypto/mem.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-03-20 14:27:52 +0000
committerMatt Caswell <matt@openssl.org>2019-04-04 23:09:47 +0100
commit9efa0ae0b602c1c0e356009a58410a2e8b80201a (patch)
tree0c0a25f2c705d36de4a1dff84a9b9590c1061c57 /crypto/mem.c
parentecbfaef2aad61fae0c29c04287913af11981b82e (diff)
Create a FIPS provider and put SHA256 in it
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8537)
Diffstat (limited to 'crypto/mem.c')
-rw-r--r--crypto/mem.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index 5feece36fb..562d6b51e2 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <limits.h>
#include <openssl/crypto.h>
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
+#if !defined(OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE) && !defined(FIPS_MODE)
# include <execinfo.h>
#endif
@@ -30,7 +30,7 @@ static void *(*realloc_impl)(void *, size_t, const char *, int)
static void (*free_impl)(void *, const char *, int)
= CRYPTO_free;
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+#if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)
# include "internal/tsan_assist.h"
static TSAN_QUALIFIER int malloc_count;
@@ -94,7 +94,7 @@ void CRYPTO_get_mem_functions(
*f = free_impl;
}
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+#if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount)
{
if (mcount != NULL)
@@ -209,7 +209,7 @@ void *CRYPTO_malloc(size_t num, const char *file, int line)
*/
allow_customize = 0;
}
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+#if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)
if (call_malloc_debug) {
CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);
ret = malloc(num);
@@ -250,7 +250,7 @@ void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
return NULL;
}
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+#if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)
if (call_malloc_debug) {
void *ret;
CRYPTO_mem_debug_realloc(str, NULL, num, 0, file, line);
@@ -300,7 +300,7 @@ void CRYPTO_free(void *str, const char *file, int line)
return;
}
-#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+#if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)
if (call_malloc_debug) {
CRYPTO_mem_debug_free(str, 0, file, line);
free(str);