summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2016-11-02 11:21:06 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2016-11-02 11:21:06 +0000
commit0817b9a0ddd1c59c0acfffeac411794c7c266001 (patch)
tree0d4df169b21a4f599bde5a59ee7d79619ac2096c
parentda8a16426ea78cfed5a1957b55f9a411ed02fe42 (diff)
Expand LHASH_OF, IMPLEMENT_LHASH_DOALL_ARG_FN and LHASH_DOALL_ARG_FN
macros. Only change in generated assembly is due to line numbering.
-rw-r--r--lib/libssl/ssl_lib.c4
-rw-r--r--lib/libssl/ssl_sess.c16
2 files changed, 13 insertions, 7 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index 86cac6eace8..ebe78808c57 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.120 2016/11/02 10:45:02 jsing Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.121 2016/11/02 11:21:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1106,7 +1106,7 @@ SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
}
}
-LHASH_OF(SSL_SESSION) *
+struct lhash_st_SSL_SESSION *
SSL_CTX_sessions(SSL_CTX *ctx)
{
return (ctx->sessions);
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c
index cd00b68ca9c..f6e2642aeb0 100644
--- a/lib/libssl/ssl_sess.c
+++ b/lib/libssl/ssl_sess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_sess.c,v 1.52 2016/11/02 09:54:47 jsing Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.53 2016/11/02 11:21:05 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -890,7 +890,7 @@ SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len)
typedef struct timeout_param_st {
SSL_CTX *ctx;
long time;
- LHASH_OF(SSL_SESSION) *cache;
+ struct lhash_st_SSL_SESSION *cache;
} TIMEOUT_PARAM;
static void
@@ -909,8 +909,14 @@ timeout_doall_arg(SSL_SESSION *s, TIMEOUT_PARAM *p)
}
}
-static
-IMPLEMENT_LHASH_DOALL_ARG_FN(timeout, SSL_SESSION, TIMEOUT_PARAM)
+static void
+timeout_LHASH_DOALL_ARG(void *arg1, void *arg2)
+{
+ SSL_SESSION *a = arg1;
+ TIMEOUT_PARAM *b = arg2;
+
+ timeout_doall_arg(a, b);
+}
/* XXX 2038 */
void
@@ -927,7 +933,7 @@ SSL_CTX_flush_sessions(SSL_CTX *s, long 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, LHASH_DOALL_ARG_FN(timeout),
+ lh_SSL_SESSION_doall_arg(tp.cache, timeout_LHASH_DOALL_ARG,
TIMEOUT_PARAM, &tp);
CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = i;
CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);