diff options
author | tb <> | 2024-01-13 12:18:52 +0000 |
---|---|---|
committer | tb <> | 2024-01-13 12:18:52 +0000 |
commit | ffcbcf224e3b614df8406b4f4316bcb3494828b4 (patch) | |
tree | 0180b49c7eebb723d95ce58815ee65a6c3eb8b1a /src | |
parent | aece9df797c54eb13f72b041cc251439ffa16cfd (diff) | |
download | openbsd-ffcbcf224e3b614df8406b4f4316bcb3494828b4.tar.gz openbsd-ffcbcf224e3b614df8406b4f4316bcb3494828b4.tar.bz2 openbsd-ffcbcf224e3b614df8406b4f4316bcb3494828b4.zip |
The OBJ_NAME API joins the party in evp_names.c
... and another file without license disappears.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_names.c | 51 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 51 |
3 files changed, 51 insertions, 54 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index 474c453100..0461363e3c 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.165 2024/01/13 12:15:27 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.166 2024/01/13 12:18:52 tb Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
@@ -452,7 +452,6 @@ SRCS+= ofb128.c | |||
452 | SRCS+= xts128.c | 452 | SRCS+= xts128.c |
453 | 453 | ||
454 | # objects/ | 454 | # objects/ |
455 | SRCS+= o_names.c | ||
456 | SRCS+= obj_dat.c | 455 | SRCS+= obj_dat.c |
457 | SRCS+= obj_err.c | 456 | SRCS+= obj_err.c |
458 | SRCS+= obj_lib.c | 457 | SRCS+= obj_lib.c |
diff --git a/src/lib/libcrypto/evp/evp_names.c b/src/lib/libcrypto/evp/evp_names.c index b09f71b4c4..046391fe30 100644 --- a/src/lib/libcrypto/evp/evp_names.c +++ b/src/lib/libcrypto/evp/evp_names.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_names.c,v 1.6 2024/01/13 12:15:27 tb Exp $ */ | 1 | /* $OpenBSD: evp_names.c,v 1.7 2024/01/13 12:18:52 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -15,6 +15,7 @@ | |||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <openssl/err.h> | ||
18 | #include <openssl/evp.h> | 19 | #include <openssl/evp.h> |
19 | #include <openssl/objects.h> | 20 | #include <openssl/objects.h> |
20 | 21 | ||
@@ -1787,3 +1788,51 @@ EVP_add_digest(const EVP_MD *md) | |||
1787 | { | 1788 | { |
1788 | return 1; | 1789 | return 1; |
1789 | } | 1790 | } |
1791 | |||
1792 | int | ||
1793 | OBJ_NAME_init(void) | ||
1794 | { | ||
1795 | OBJerror(ERR_R_DISABLED); | ||
1796 | return 0; | ||
1797 | } | ||
1798 | LCRYPTO_ALIAS(OBJ_NAME_init); | ||
1799 | |||
1800 | int | ||
1801 | OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | ||
1802 | int (*cmp_func)(const char *, const char *), | ||
1803 | void (*free_func)(const char *, int, const char *)) | ||
1804 | { | ||
1805 | OBJerror(ERR_R_DISABLED); | ||
1806 | return 0; | ||
1807 | } | ||
1808 | LCRYPTO_ALIAS(OBJ_NAME_new_index); | ||
1809 | |||
1810 | const char * | ||
1811 | OBJ_NAME_get(const char *name, int type) | ||
1812 | { | ||
1813 | OBJerror(ERR_R_DISABLED); | ||
1814 | return NULL; | ||
1815 | } | ||
1816 | LCRYPTO_ALIAS(OBJ_NAME_get); | ||
1817 | |||
1818 | int | ||
1819 | OBJ_NAME_add(const char *name, int type, const char *data) | ||
1820 | { | ||
1821 | /* No error to avoid polluting xca's error stack. */ | ||
1822 | return 0; | ||
1823 | } | ||
1824 | LCRYPTO_ALIAS(OBJ_NAME_add); | ||
1825 | |||
1826 | int | ||
1827 | OBJ_NAME_remove(const char *name, int type) | ||
1828 | { | ||
1829 | OBJerror(ERR_R_DISABLED); | ||
1830 | return 0; | ||
1831 | } | ||
1832 | LCRYPTO_ALIAS(OBJ_NAME_remove); | ||
1833 | |||
1834 | void | ||
1835 | OBJ_NAME_cleanup(int type) | ||
1836 | { | ||
1837 | } | ||
1838 | LCRYPTO_ALIAS(OBJ_NAME_cleanup); | ||
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c deleted file mode 100644 index 566ada4d49..0000000000 --- a/src/lib/libcrypto/objects/o_names.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* $OpenBSD: o_names.c,v 1.26 2024/01/13 11:38:45 tb Exp $ */ | ||
2 | #include <openssl/err.h> | ||
3 | #include <openssl/objects.h> | ||
4 | |||
5 | int | ||
6 | OBJ_NAME_init(void) | ||
7 | { | ||
8 | OBJerror(ERR_R_DISABLED); | ||
9 | return 0; | ||
10 | } | ||
11 | LCRYPTO_ALIAS(OBJ_NAME_init); | ||
12 | |||
13 | int | ||
14 | OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | ||
15 | int (*cmp_func)(const char *, const char *), | ||
16 | void (*free_func)(const char *, int, const char *)) | ||
17 | { | ||
18 | OBJerror(ERR_R_DISABLED); | ||
19 | return 0; | ||
20 | } | ||
21 | LCRYPTO_ALIAS(OBJ_NAME_new_index); | ||
22 | |||
23 | const char * | ||
24 | OBJ_NAME_get(const char *name, int type) | ||
25 | { | ||
26 | OBJerror(ERR_R_DISABLED); | ||
27 | return NULL; | ||
28 | } | ||
29 | LCRYPTO_ALIAS(OBJ_NAME_get); | ||
30 | |||
31 | int | ||
32 | OBJ_NAME_add(const char *name, int type, const char *data) | ||
33 | { | ||
34 | /* No error to avoid polluting xca's error stack. */ | ||
35 | return 0; | ||
36 | } | ||
37 | LCRYPTO_ALIAS(OBJ_NAME_add); | ||
38 | |||
39 | int | ||
40 | OBJ_NAME_remove(const char *name, int type) | ||
41 | { | ||
42 | OBJerror(ERR_R_DISABLED); | ||
43 | return 0; | ||
44 | } | ||
45 | LCRYPTO_ALIAS(OBJ_NAME_remove); | ||
46 | |||
47 | void | ||
48 | OBJ_NAME_cleanup(int type) | ||
49 | { | ||
50 | } | ||
51 | LCRYPTO_ALIAS(OBJ_NAME_cleanup); | ||