Allow FIPS malloc callback setting. Automatically set some callbacks
[openssl.git] / fips / utl / fips_mem.c
index e0bd0a8265970e3fc487893d5a62e00ad18e1385..ff6e727442a503e0cf1de588e00066d28770a9fa 100644 (file)
@@ -84,3 +84,11 @@ void FIPS_free(void *x)
        {
        fips_free_cb(x);
        }
+
+void FIPS_set_malloc_callbacks(
+               void *(*malloc_cb)(int num, const char *file, int line),
+               void (*free_cb)(void *))
+       {
+       fips_malloc_cb = malloc_cb;
+       fips_free_cb = free_cb;
+       }