-/* $OpenBSD: x509_lu.c,v 1.54 2022/01/05 20:18:19 tb Exp $ */
+/* $OpenBSD: x509_lu.c,v 1.55 2022/01/14 07:53:45 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if (a == NULL)
return;
- X509_OBJECT_free_contents(a);
+ switch (a->type) {
+ case X509_LU_X509:
+ X509_free(a->data.x509);
+ break;
+ case X509_LU_CRL:
+ X509_CRL_free(a->data.crl);
+ break;
+ }
+
free(a);
}
return a->type;
}
-void
-X509_OBJECT_free_contents(X509_OBJECT *a)
-{
- switch (a->type) {
- case X509_LU_X509:
- X509_free(a->data.x509);
- break;
- case X509_LU_CRL:
- X509_CRL_free(a->data.crl);
- break;
- }
- memset(a, 0, sizeof(*a));
- a->type = X509_LU_NONE;
-}
-
static int
x509_object_idx_cnt(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type,
X509_NAME *name, int *pnmatch)
-/* $OpenBSD: x509_vfy.h,v 1.49 2022/01/14 07:49:49 tb Exp $ */
+/* $OpenBSD: x509_vfy.h,v 1.50 2022/01/14 07:53:45 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x);
int X509_OBJECT_up_ref_count(X509_OBJECT *a);
X509_LOOKUP_TYPE X509_OBJECT_get_type(const X509_OBJECT *a);
-void X509_OBJECT_free_contents(X509_OBJECT *a);
X509 *X509_OBJECT_get0_X509(const X509_OBJECT *xo);
X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *xo);