-/* $OpenBSD: conf_api.c,v 1.16 2023/07/08 08:26:26 beck Exp $ */
+/* $OpenBSD: conf_api.c,v 1.17 2024/01/24 14:05:10 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if (conf == NULL || conf->data == NULL)
return;
- lh_CONF_VALUE_down_load(conf->data) = 0; /* evil thing to make
- * sure the 'free()' works as
- * expected */
lh_CONF_VALUE_doall_arg(conf->data,
LHASH_DOALL_ARG_FN(value_free_hash),
LHASH_OF(CONF_VALUE), conf->data);
-/* $OpenBSD: obj_dat.c,v 1.84 2024/01/13 11:57:51 tb Exp $ */
+/* $OpenBSD: obj_dat.c,v 1.85 2024/01/24 14:05:10 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
if (added == NULL)
return;
- lh_ADDED_OBJ_down_load(added) = 0;
+
lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup1)); /* zero counters */
lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup2)); /* set counters */
lh_ADDED_OBJ_doall(added, LHASH_DOALL_FN(cleanup3)); /* free objects */
-/* $OpenBSD: ssl_sess.c,v 1.123 2023/11/19 15:51:49 tb Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.124 2024/01/24 14:05:10 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
void
SSL_CTX_flush_sessions(SSL_CTX *s, long t)
{
- unsigned long i;
TIMEOUT_PARAM tp;
tp.ctx = s;
if (tp.cache == NULL)
return;
tp.time = t;
+
CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
- i = CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load;
- CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = 0;
lh_SSL_SESSION_doall_arg(tp.cache, timeout_LHASH_DOALL_ARG,
- TIMEOUT_PARAM, &tp);
- CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = i;
+ TIMEOUT_PARAM, &tp);
CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
}
LSSL_ALIAS(SSL_CTX_flush_sessions);