-/* $OpenBSD: x509_lib.c,v 1.11 2023/04/16 12:05:31 tb Exp $ */
+/* $OpenBSD: x509_lib.c,v 1.12 2023/04/16 12:08:03 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
static STACK_OF(X509V3_EXT_METHOD) *ext_list = NULL;
-static int ext_cmp(const X509V3_EXT_METHOD * const *a,
- const X509V3_EXT_METHOD * const *b);
-static void ext_list_free(X509V3_EXT_METHOD *ext);
-
extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku;
extern X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info, v3_sinfo;
extern X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, v3_akey_id;
#define STANDARD_EXTENSION_COUNT (sizeof(standard_exts) / sizeof(standard_exts[0]))
+static int
+ext_cmp(const X509V3_EXT_METHOD * const *a, const X509V3_EXT_METHOD * const *b)
+{
+ return ((*a)->ext_nid - (*b)->ext_nid);
+}
+
int
X509V3_EXT_add(X509V3_EXT_METHOD *ext)
{
}
LCRYPTO_ALIAS(X509V3_EXT_add);
-static int
-ext_cmp(const X509V3_EXT_METHOD * const *a, const X509V3_EXT_METHOD * const *b)
-{
- return ((*a)->ext_nid - (*b)->ext_nid);
-}
-
static int
ext_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)
{
}
LCRYPTO_ALIAS(X509V3_EXT_add_alias);
+static void
+ext_list_free(X509V3_EXT_METHOD *ext)
+{
+ if (ext->ext_flags & X509V3_EXT_DYNAMIC)
+ free(ext);
+}
+
void
X509V3_EXT_cleanup(void)
{
}
LCRYPTO_ALIAS(X509V3_EXT_cleanup);
-static void
-ext_list_free(X509V3_EXT_METHOD *ext)
-{
- if (ext->ext_flags & X509V3_EXT_DYNAMIC)
- free(ext);
-}
-
int
X509V3_add_standard_extensions(void)
{