return 1;
}
-int CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t, const char *, int),
+int
+CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t, const char *, int),
void (*f)(void *))
{
if (!allow_customize)
*f = free_func;
}
-void CRYPTO_get_mem_ex_functions(void *(**m)(size_t, const char *, int),
+void
+CRYPTO_get_mem_ex_functions(void *(**m)(size_t, const char *, int),
void *(**r)(void *, size_t, const char *, int), void (**f)(void *))
{
if (m != NULL)
*f = free_locked_func;
}
-void CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t, const char *, int),
+void
+CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t, const char *, int),
void (**f)(void *))
{
if (m != NULL)
}
-void
-*CRYPTO_malloc_locked(int num, const char *file, int line)
+void *
+CRYPTO_malloc_locked(int num, const char *file, int line)
{
void *ret = NULL;
if (malloc_debug_func != NULL)
malloc_debug_func(ret, num, file, line, 1);
-#ifndef OPENSSL_CPUID_OBJ
- /* Create a dependency on the value of 'cleanse_ctr' so our memory
- * sanitisation function can't be optimised out. NB: We only do
- * this for >2Kb so the overhead doesn't bother us. */
- if (ret && (num > 2048)) {
- extern unsigned char cleanse_ctr;
- ((unsigned char *)ret)[0] = cleanse_ctr;
- }
-#endif
-
return ret;
}
free_debug_func(NULL, 1);
}
-void
-*CRYPTO_malloc(int num, const char *file, int line)
+void *
+CRYPTO_malloc(int num, const char *file, int line)
{
void *ret = NULL;
if (malloc_debug_func != NULL)
malloc_debug_func(ret, num, file, line, 1);
-#ifndef OPENSSL_CPUID_OBJ
- /* Create a dependency on the value of 'cleanse_ctr' so our memory
- * sanitisation function can't be optimised out. NB: We only do
- * this for >2Kb so the overhead doesn't bother us. */
- if (ret && (num > 2048)) {
- extern unsigned char cleanse_ctr;
- ((unsigned char *)ret)[0] = cleanse_ctr;
- }
-#endif
-
return ret;
}
-char
-*CRYPTO_strdup(const char *str, const char *file, int line)
+char *
+CRYPTO_strdup(const char *str, const char *file, int line)
{
size_t len = strlen(str) + 1;
char *ret = CRYPTO_malloc(len, file, line);
return ret;
}
-void
-*CRYPTO_realloc(void *str, int num, const char *file, int line)
+void *
+CRYPTO_realloc(void *str, int num, const char *file, int line)
{
void *ret = NULL;
return ret;
}
-void
-*CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
+void *
+CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
int line)
{
void *ret = NULL;
free_debug_func(NULL, 1);
}
-void
-*CRYPTO_remalloc(void *a, int num, const char *file, int line)
+void *
+CRYPTO_remalloc(void *a, int num, const char *file, int line)
{
if (a != NULL)
OPENSSL_free(a);
return 1;
}
-int CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t, const char *, int),
+int
+CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t, const char *, int),
void (*f)(void *))
{
if (!allow_customize)
*f = free_func;
}
-void CRYPTO_get_mem_ex_functions(void *(**m)(size_t, const char *, int),
+void
+CRYPTO_get_mem_ex_functions(void *(**m)(size_t, const char *, int),
void *(**r)(void *, size_t, const char *, int), void (**f)(void *))
{
if (m != NULL)
*f = free_locked_func;
}
-void CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t, const char *, int),
+void
+CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t, const char *, int),
void (**f)(void *))
{
if (m != NULL)
}
-void
-*CRYPTO_malloc_locked(int num, const char *file, int line)
+void *
+CRYPTO_malloc_locked(int num, const char *file, int line)
{
void *ret = NULL;
if (malloc_debug_func != NULL)
malloc_debug_func(ret, num, file, line, 1);
-#ifndef OPENSSL_CPUID_OBJ
- /* Create a dependency on the value of 'cleanse_ctr' so our memory
- * sanitisation function can't be optimised out. NB: We only do
- * this for >2Kb so the overhead doesn't bother us. */
- if (ret && (num > 2048)) {
- extern unsigned char cleanse_ctr;
- ((unsigned char *)ret)[0] = cleanse_ctr;
- }
-#endif
-
return ret;
}
free_debug_func(NULL, 1);
}
-void
-*CRYPTO_malloc(int num, const char *file, int line)
+void *
+CRYPTO_malloc(int num, const char *file, int line)
{
void *ret = NULL;
if (malloc_debug_func != NULL)
malloc_debug_func(ret, num, file, line, 1);
-#ifndef OPENSSL_CPUID_OBJ
- /* Create a dependency on the value of 'cleanse_ctr' so our memory
- * sanitisation function can't be optimised out. NB: We only do
- * this for >2Kb so the overhead doesn't bother us. */
- if (ret && (num > 2048)) {
- extern unsigned char cleanse_ctr;
- ((unsigned char *)ret)[0] = cleanse_ctr;
- }
-#endif
-
return ret;
}
-char
-*CRYPTO_strdup(const char *str, const char *file, int line)
+char *
+CRYPTO_strdup(const char *str, const char *file, int line)
{
size_t len = strlen(str) + 1;
char *ret = CRYPTO_malloc(len, file, line);
return ret;
}
-void
-*CRYPTO_realloc(void *str, int num, const char *file, int line)
+void *
+CRYPTO_realloc(void *str, int num, const char *file, int line)
{
void *ret = NULL;
return ret;
}
-void
-*CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
+void *
+CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
int line)
{
void *ret = NULL;
free_debug_func(NULL, 1);
}
-void
-*CRYPTO_remalloc(void *a, int num, const char *file, int line)
+void *
+CRYPTO_remalloc(void *a, int num, const char *file, int line)
{
if (a != NULL)
OPENSSL_free(a);