-/* $OpenBSD: x509_v3.c,v 1.25 2024/05/23 01:43:51 tb Exp $ */
+/* $OpenBSD: x509_v3.c,v 1.26 2024/05/23 01:50:52 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
if (x == NULL)
return 0;
+
return sk_X509_EXTENSION_num(x);
}
LCRYPTO_ALIAS(X509v3_get_ext_count);
{
if (ext == NULL || obj == NULL)
return 0;
+
ASN1_OBJECT_free(ext->object);
ext->object = OBJ_dup(obj);
+
return ext->object != NULL;
}
LCRYPTO_ALIAS(X509_EXTENSION_set_object);
{
if (ext == NULL)
return 0;
+
ext->critical = crit ? 0xFF : -1;
+
return 1;
}
LCRYPTO_ALIAS(X509_EXTENSION_set_critical);
if (ext == NULL)
return 0;
+
i = ASN1_STRING_set(ext->value, data->data, data->length);
if (!i)
return 0;
{
if (ext == NULL)
return NULL;
+
return ext->object;
}
LCRYPTO_ALIAS(X509_EXTENSION_get_object);
{
if (ext == NULL)
return NULL;
+
return ext->value;
}
LCRYPTO_ALIAS(X509_EXTENSION_get_data);