summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/malloc-wrapper.c
diff options
context:
space:
mode:
authortb <>2024-11-06 04:08:26 +0000
committertb <>2024-11-06 04:08:26 +0000
commitf43847518f7fe0930205f9b6aeb7ea4c6596860b (patch)
treef22b3160c5e2a762977c4632ca80845064521a25 /src/lib/libcrypto/malloc-wrapper.c
parent5737d0f009803326f24baddb5d0ae6495f069273 (diff)
downloadopenbsd-f43847518f7fe0930205f9b6aeb7ea4c6596860b.tar.gz
openbsd-f43847518f7fe0930205f9b6aeb7ea4c6596860b.tar.bz2
openbsd-f43847518f7fe0930205f9b6aeb7ea4c6596860b.zip
Rename malloc-wrapper.c to crypto_memory.c
Apparently it's important that five trivial one-line wrappers remain in a file with the ISC license. So instead of cleaning the root directory of our favorite pigsty further by squashing all the useless legacy garbage into a single file, rename the oddly-named malloc-wrapper.c into crypto_memory.c. discussed with beck, jsing
Diffstat (limited to 'src/lib/libcrypto/malloc-wrapper.c')
-rw-r--r--src/lib/libcrypto/malloc-wrapper.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/lib/libcrypto/malloc-wrapper.c b/src/lib/libcrypto/malloc-wrapper.c
deleted file mode 100644
index 7330903c6c..0000000000
--- a/src/lib/libcrypto/malloc-wrapper.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/* $OpenBSD: malloc-wrapper.c,v 1.11 2024/04/10 14:51:02 beck Exp $ */
2/*
3 * Copyright (c) 2014 Bob Beck
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17#include <stdio.h>
18#include <stdlib.h>
19#include <string.h>
20
21#include <openssl/crypto.h>
22
23int
24CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
25 void (*f)(void *))
26{
27 return 0;
28}
29LCRYPTO_ALIAS(CRYPTO_set_mem_functions);
30
31int
32CRYPTO_set_mem_ex_functions(void *(*m)(size_t, const char *, int),
33 void *(*r)(void *, size_t, const char *, int), void (*f)(void *))
34{
35 return 0;
36}
37LCRYPTO_ALIAS(CRYPTO_set_mem_ex_functions);
38
39void *
40CRYPTO_malloc(size_t num, const char *file, int line)
41{
42 return malloc(num);
43}
44LCRYPTO_ALIAS(CRYPTO_malloc);
45
46char *
47CRYPTO_strdup(const char *str, const char *file, int line)
48{
49 return strdup(str);
50}
51LCRYPTO_ALIAS(CRYPTO_strdup);
52
53void
54CRYPTO_free(void *ptr, const char *file, int line)
55{
56 free(ptr);
57}
58LCRYPTO_ALIAS(CRYPTO_free);