sync with OpenBSD -current
This commit is contained in:
parent
5c4b291e07
commit
b478f6b854
50 changed files with 466 additions and 438 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: x509_lu.c,v 1.64 2024/03/02 10:57:03 tb Exp $ */
|
||||
/* $OpenBSD: x509_lu.c,v 1.65 2024/03/22 06:24:54 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -63,6 +63,7 @@
|
|||
#include <openssl/lhash.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
#include "x509_local.h"
|
||||
|
||||
static X509_LOOKUP *
|
||||
|
@ -221,22 +222,13 @@ x509_object_dup(const X509_OBJECT *obj)
|
|||
void
|
||||
X509_STORE_free(X509_STORE *store)
|
||||
{
|
||||
STACK_OF(X509_LOOKUP) *sk;
|
||||
X509_LOOKUP *lu;
|
||||
int i;
|
||||
|
||||
if (store == NULL)
|
||||
return;
|
||||
|
||||
if (CRYPTO_add(&store->references, -1, CRYPTO_LOCK_X509_STORE) > 0)
|
||||
return;
|
||||
|
||||
sk = store->get_cert_methods;
|
||||
for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
|
||||
lu = sk_X509_LOOKUP_value(sk, i);
|
||||
X509_LOOKUP_free(lu);
|
||||
}
|
||||
sk_X509_LOOKUP_free(sk);
|
||||
sk_X509_LOOKUP_pop_free(store->get_cert_methods, X509_LOOKUP_free);
|
||||
sk_X509_OBJECT_pop_free(store->objs, X509_OBJECT_free);
|
||||
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, store, &store->ex_data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue