From cb82efff156de2c337798a2f652e89f6c2fa7f95 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 13 Jan 2024 12:18:52 +0000 Subject: [PATCH] The OBJ_NAME API joins the party in evp_names.c ... and another file without license disappears. --- lib/libcrypto/Makefile | 3 +- lib/libcrypto/evp/evp_names.c | 51 ++++++++++++++++++++++++++++++++- lib/libcrypto/objects/o_names.c | 51 --------------------------------- 3 files changed, 51 insertions(+), 54 deletions(-) delete mode 100644 lib/libcrypto/objects/o_names.c diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile index 474c4531006..0461363e3cc 100644 --- a/lib/libcrypto/Makefile +++ b/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.165 2024/01/13 12:15:27 tb Exp $ +# $OpenBSD: Makefile,v 1.166 2024/01/13 12:18:52 tb Exp $ LIB= crypto LIBREBUILD=y @@ -452,7 +452,6 @@ SRCS+= ofb128.c SRCS+= xts128.c # objects/ -SRCS+= o_names.c SRCS+= obj_dat.c SRCS+= obj_err.c SRCS+= obj_lib.c diff --git a/lib/libcrypto/evp/evp_names.c b/lib/libcrypto/evp/evp_names.c index b09f71b4c4f..046391fe301 100644 --- a/lib/libcrypto/evp/evp_names.c +++ b/lib/libcrypto/evp/evp_names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_names.c,v 1.6 2024/01/13 12:15:27 tb Exp $ */ +/* $OpenBSD: evp_names.c,v 1.7 2024/01/13 12:18:52 tb Exp $ */ /* * Copyright (c) 2023 Theo Buehler * @@ -15,6 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include @@ -1787,3 +1788,51 @@ EVP_add_digest(const EVP_MD *md) { return 1; } + +int +OBJ_NAME_init(void) +{ + OBJerror(ERR_R_DISABLED); + return 0; +} +LCRYPTO_ALIAS(OBJ_NAME_init); + +int +OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), + int (*cmp_func)(const char *, const char *), + void (*free_func)(const char *, int, const char *)) +{ + OBJerror(ERR_R_DISABLED); + return 0; +} +LCRYPTO_ALIAS(OBJ_NAME_new_index); + +const char * +OBJ_NAME_get(const char *name, int type) +{ + OBJerror(ERR_R_DISABLED); + return NULL; +} +LCRYPTO_ALIAS(OBJ_NAME_get); + +int +OBJ_NAME_add(const char *name, int type, const char *data) +{ + /* No error to avoid polluting xca's error stack. */ + return 0; +} +LCRYPTO_ALIAS(OBJ_NAME_add); + +int +OBJ_NAME_remove(const char *name, int type) +{ + OBJerror(ERR_R_DISABLED); + return 0; +} +LCRYPTO_ALIAS(OBJ_NAME_remove); + +void +OBJ_NAME_cleanup(int type) +{ +} +LCRYPTO_ALIAS(OBJ_NAME_cleanup); diff --git a/lib/libcrypto/objects/o_names.c b/lib/libcrypto/objects/o_names.c deleted file mode 100644 index 566ada4d49c..00000000000 --- a/lib/libcrypto/objects/o_names.c +++ /dev/null @@ -1,51 +0,0 @@ -/* $OpenBSD: o_names.c,v 1.26 2024/01/13 11:38:45 tb Exp $ */ -#include -#include - -int -OBJ_NAME_init(void) -{ - OBJerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(OBJ_NAME_init); - -int -OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), - int (*cmp_func)(const char *, const char *), - void (*free_func)(const char *, int, const char *)) -{ - OBJerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(OBJ_NAME_new_index); - -const char * -OBJ_NAME_get(const char *name, int type) -{ - OBJerror(ERR_R_DISABLED); - return NULL; -} -LCRYPTO_ALIAS(OBJ_NAME_get); - -int -OBJ_NAME_add(const char *name, int type, const char *data) -{ - /* No error to avoid polluting xca's error stack. */ - return 0; -} -LCRYPTO_ALIAS(OBJ_NAME_add); - -int -OBJ_NAME_remove(const char *name, int type) -{ - OBJerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(OBJ_NAME_remove); - -void -OBJ_NAME_cleanup(int type) -{ -} -LCRYPTO_ALIAS(OBJ_NAME_cleanup); -- 2.20.1