Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
OBJ_NAME_add, OBJ_NAME_remove, OBJ_NAME_get, OBJ_NAME_new_index, OBJ_NAME_init, OBJ_NAME_cleanup — global associative arraySYNOPSIS
#include <openssl/objects.h>OBJ_NAME_add(const char *name, int type, const char *value);
OBJ_NAME_remove(const char *name, int type);
OBJ_NAME_get(const char *name, int type);
OBJ_NAME_new_index(unsigned long (*hash_func)(const char *name), int (*cmp_func)(const char *name1, const char *name2), void (*free_func)(const char *name, int type, const char *value));
OBJ_NAME_init(void);
OBJ_NAME_cleanup(int type);
typedef struct { int type; int alias; const char *name; const char *data; } OBJ_NAME;
DESCRIPTION
These functions implement a single, static associative array with the following properties:- The keys are ordered pairs consisting of a NUL-terminated string (called the name) and an int number (called the type). Two types are predefined and used internally by the library: OBJ_NAME_TYPE_MD_METH and OBJ_NAME_TYPE_CIPHER_METH. Two additional types are predefined but not used internally: OBJ_NAME_TYPE_PKEY_METH and OBJ_NAME_TYPE_COMP_METH. All predefined types are greater than OBJ_NAME_TYPE_UNDEF and smaller than OBJ_NAME_TYPE_NUM.
- The values are pointers. Formally, they are of the type const char *, but in practice, pointers of other types, for example EVP_CIPHER * or EVP_MD *, are often stored as values and cast back to the correct type on retrieval.
- The array supports type-specific aliases for names.