diff --git a/include/haproxy/ssl_sock-t.h b/include/haproxy/ssl_sock-t.h index f864595f7..410a789a1 100644 --- a/include/haproxy/ssl_sock-t.h +++ b/include/haproxy/ssl_sock-t.h @@ -327,5 +327,11 @@ extern const char *SSL_SOCK_KEYTYPE_NAMES[]; extern struct pool_head *ssl_sock_client_sni_pool; +struct ssl_counters { + long long sess; + long long reused_sess; + long long failed_handshake; +}; + #endif /* USE_OPENSSL */ #endif /* _HAPROXY_SSL_SOCK_T_H */ diff --git a/include/haproxy/ssl_sock.h b/include/haproxy/ssl_sock.h index b4a7e3af9..bd32ef2f9 100644 --- a/include/haproxy/ssl_sock.h +++ b/include/haproxy/ssl_sock.h @@ -54,6 +54,7 @@ extern int ssl_client_sni_index; extern struct pool_head *pool_head_ssl_keylog; extern struct pool_head *pool_head_ssl_keylog_str; extern struct list openssl_providers; +extern struct stats_module ssl_stats_module; int ssl_sock_prep_ctx_and_inst(struct bind_conf *bind_conf, struct ssl_bind_conf *ssl_conf, SSL_CTX *ctx, struct ckch_inst *ckch_inst, char **err); diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 7e8603a4b..45d34b246 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -169,11 +169,7 @@ static struct stat_col ssl_stats[] = { .desc = "Total number of failed handshake" }, }; -static struct ssl_counters { - long long sess; - long long reused_sess; - long long failed_handshake; -} ssl_counters; +static struct ssl_counters ssl_counters; static int ssl_fill_stats(void *data, struct field *stats, unsigned int *selected_field) { @@ -208,7 +204,7 @@ static int ssl_fill_stats(void *data, struct field *stats, unsigned int *selecte return 1; } -static struct stats_module ssl_stats_module = { +struct stats_module ssl_stats_module = { .name = "ssl", .fill_stats = ssl_fill_stats, .stats = ssl_stats,