Switch name member of OBJ_NAME to const void *
authortb <tb@openbsd.org>
Sat, 2 Mar 2024 09:43:10 +0000 (09:43 +0000)
committertb <tb@openbsd.org>
Sat, 2 Mar 2024 09:43:10 +0000 (09:43 +0000)
Because this is the type it should have had from the get go.

ok jsing

lib/libcrypto/evp/evp_names.c
lib/libcrypto/objects/objects.h

index ad325ba..ec66c12 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: evp_names.c,v 1.10 2024/03/02 09:41:02 tb Exp $ */
+/*     $OpenBSD: evp_names.c,v 1.11 2024/03/02 09:43:10 tb Exp $ */
 /*
  * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
  *
@@ -1787,7 +1787,7 @@ OBJ_NAME_from_cipher_name(OBJ_NAME *obj_name, const struct cipher_name *cipher)
                obj_name->data = cipher->alias;
        } else {
                obj_name->alias = 0;
-               obj_name->data = (const char *)evp_cipher;
+               obj_name->data = evp_cipher;
        }
 
        return 1;
@@ -1822,7 +1822,7 @@ OBJ_NAME_from_digest_name(OBJ_NAME *obj_name, const struct digest_name *digest)
                obj_name->data = digest->alias;
        } else {
                obj_name->alias = 0;
-               obj_name->data = (const char *)evp_md;
+               obj_name->data = evp_md;
        }
 
        return 1;
index 37570a5..2d3aa98 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: objects.h,v 1.24 2024/03/02 09:41:02 tb Exp $ */
+/* $OpenBSD: objects.h,v 1.25 2024/03/02 09:43:10 tb Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -89,7 +89,7 @@ typedef struct obj_name_st {
        int type;
        int alias;
        const char *name;
-       const char *data;
+       const void *data;
 } OBJ_NAME;
 
 #define                OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c)