summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-01-13 12:18:52 +0000
committertb <>2024-01-13 12:18:52 +0000
commitffcbcf224e3b614df8406b4f4316bcb3494828b4 (patch)
tree0180b49c7eebb723d95ce58815ee65a6c3eb8b1a /src
parentaece9df797c54eb13f72b041cc251439ffa16cfd (diff)
downloadopenbsd-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/Makefile3
-rw-r--r--src/lib/libcrypto/evp/evp_names.c51
-rw-r--r--src/lib/libcrypto/objects/o_names.c51
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
3LIB= crypto 3LIB= crypto
4LIBREBUILD=y 4LIBREBUILD=y
@@ -452,7 +452,6 @@ SRCS+= ofb128.c
452SRCS+= xts128.c 452SRCS+= xts128.c
453 453
454# objects/ 454# objects/
455SRCS+= o_names.c
456SRCS+= obj_dat.c 455SRCS+= obj_dat.c
457SRCS+= obj_err.c 456SRCS+= obj_err.c
458SRCS+= obj_lib.c 457SRCS+= 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
1792int
1793OBJ_NAME_init(void)
1794{
1795 OBJerror(ERR_R_DISABLED);
1796 return 0;
1797}
1798LCRYPTO_ALIAS(OBJ_NAME_init);
1799
1800int
1801OBJ_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}
1808LCRYPTO_ALIAS(OBJ_NAME_new_index);
1809
1810const char *
1811OBJ_NAME_get(const char *name, int type)
1812{
1813 OBJerror(ERR_R_DISABLED);
1814 return NULL;
1815}
1816LCRYPTO_ALIAS(OBJ_NAME_get);
1817
1818int
1819OBJ_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}
1824LCRYPTO_ALIAS(OBJ_NAME_add);
1825
1826int
1827OBJ_NAME_remove(const char *name, int type)
1828{
1829 OBJerror(ERR_R_DISABLED);
1830 return 0;
1831}
1832LCRYPTO_ALIAS(OBJ_NAME_remove);
1833
1834void
1835OBJ_NAME_cleanup(int type)
1836{
1837}
1838LCRYPTO_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
5int
6OBJ_NAME_init(void)
7{
8 OBJerror(ERR_R_DISABLED);
9 return 0;
10}
11LCRYPTO_ALIAS(OBJ_NAME_init);
12
13int
14OBJ_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}
21LCRYPTO_ALIAS(OBJ_NAME_new_index);
22
23const char *
24OBJ_NAME_get(const char *name, int type)
25{
26 OBJerror(ERR_R_DISABLED);
27 return NULL;
28}
29LCRYPTO_ALIAS(OBJ_NAME_get);
30
31int
32OBJ_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}
37LCRYPTO_ALIAS(OBJ_NAME_add);
38
39int
40OBJ_NAME_remove(const char *name, int type)
41{
42 OBJerror(ERR_R_DISABLED);
43 return 0;
44}
45LCRYPTO_ALIAS(OBJ_NAME_remove);
46
47void
48OBJ_NAME_cleanup(int type)
49{
50}
51LCRYPTO_ALIAS(OBJ_NAME_cleanup);