diff options
| author | jsing <> | 2016-11-02 11:21:05 +0000 |
|---|---|---|
| committer | jsing <> | 2016-11-02 11:21:05 +0000 |
| commit | 849e449a83384719b38a7cfdafafc48800004525 (patch) | |
| tree | b259a1e8d80a6aefffbadd1c5efa888c6c802c43 /src/lib/libssl/ssl_sess.c | |
| parent | 3229a27b62911724fb93df842f26f8eb5cc89bce (diff) | |
| download | openbsd-849e449a83384719b38a7cfdafafc48800004525.tar.gz openbsd-849e449a83384719b38a7cfdafafc48800004525.tar.bz2 openbsd-849e449a83384719b38a7cfdafafc48800004525.zip | |
Expand LHASH_OF, IMPLEMENT_LHASH_DOALL_ARG_FN and LHASH_DOALL_ARG_FN
macros. Only change in generated assembly is due to line numbering.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index cd00b68ca9..f6e2642aeb 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_sess.c,v 1.52 2016/11/02 09:54:47 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_sess.c,v 1.53 2016/11/02 11:21:05 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -890,7 +890,7 @@ SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len) | |||
| 890 | typedef struct timeout_param_st { | 890 | typedef struct timeout_param_st { |
| 891 | SSL_CTX *ctx; | 891 | SSL_CTX *ctx; |
| 892 | long time; | 892 | long time; |
| 893 | LHASH_OF(SSL_SESSION) *cache; | 893 | struct lhash_st_SSL_SESSION *cache; |
| 894 | } TIMEOUT_PARAM; | 894 | } TIMEOUT_PARAM; |
| 895 | 895 | ||
| 896 | static void | 896 | static void |
| @@ -909,8 +909,14 @@ timeout_doall_arg(SSL_SESSION *s, TIMEOUT_PARAM *p) | |||
| 909 | } | 909 | } |
| 910 | } | 910 | } |
| 911 | 911 | ||
| 912 | static | 912 | static void |
| 913 | IMPLEMENT_LHASH_DOALL_ARG_FN(timeout, SSL_SESSION, TIMEOUT_PARAM) | 913 | timeout_LHASH_DOALL_ARG(void *arg1, void *arg2) |
| 914 | { | ||
| 915 | SSL_SESSION *a = arg1; | ||
| 916 | TIMEOUT_PARAM *b = arg2; | ||
| 917 | |||
| 918 | timeout_doall_arg(a, b); | ||
| 919 | } | ||
| 914 | 920 | ||
| 915 | /* XXX 2038 */ | 921 | /* XXX 2038 */ |
| 916 | void | 922 | void |
| @@ -927,7 +933,7 @@ SSL_CTX_flush_sessions(SSL_CTX *s, long t) | |||
| 927 | CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); | 933 | CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); |
| 928 | i = CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load; | 934 | i = CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load; |
| 929 | CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = 0; | 935 | CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = 0; |
| 930 | lh_SSL_SESSION_doall_arg(tp.cache, LHASH_DOALL_ARG_FN(timeout), | 936 | lh_SSL_SESSION_doall_arg(tp.cache, timeout_LHASH_DOALL_ARG, |
| 931 | TIMEOUT_PARAM, &tp); | 937 | TIMEOUT_PARAM, &tp); |
| 932 | CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = i; | 938 | CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load = i; |
| 933 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); | 939 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); |
