diff options
author | Stefan Eissing <icing@apache.org> | 2021-03-09 13:55:55 +0100 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2021-03-09 13:55:55 +0100 |
commit | 7c5e4c9ab2861dd877156be38edc1d110d234f68 (patch) | |
tree | 471c1be835bce6e8293d4157aee506bc9a41fb3d /modules/loggers | |
parent | lets try ASN1_STRING_data() for openssl 1.0.2 (diff) | |
download | apache2-7c5e4c9ab2861dd877156be38edc1d110d234f68.tar.xz apache2-7c5e4c9ab2861dd877156be38edc1d110d234f68.zip |
Using the new ap_ssl_conn_is_ssl() and ap_ssl_var_lookup() in all internal modules.
* leaving mod_nw_ssl and mod_ssl itself untouched
* removing mod_ssl.h includes where no longer necessary
* some modules might skip post_config hooks, but those were left in, even when empty now.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887364 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers')
-rw-r--r-- | modules/loggers/mod_log_json.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/modules/loggers/mod_log_json.c b/modules/loggers/mod_log_json.c index 825da6b170..f25be19c92 100644 --- a/modules/loggers/mod_log_json.c +++ b/modules/loggers/mod_log_json.c @@ -21,7 +21,6 @@ #include "http_protocol.h" #include "http_request.h" -#include <mod_ssl.h> #include "mod_log_config.h" #include "apr_strings.h" @@ -49,8 +48,6 @@ APLOG_USE_MODULE(log_json); module AP_MODULE_DECLARE_DATA log_json_module; -static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *log_json_ssl_lookup = NULL; -static APR_OPTIONAL_FN_TYPE(ssl_is_https) *log_json_ssl_is_https = NULL; static APR_OPTIONAL_FN_TYPE(ap_register_log_handler) *log_json_register = NULL; static const char *crit_error = @@ -99,21 +96,20 @@ log_json(request_rec *r, char *a) json_string(apr_table_get(r->headers_in, "User-Agent"))); json_object_set_new_nocheck(obj, "hdrs", hdrs); - if (log_json_ssl_is_https != NULL && log_json_ssl_lookup != NULL && - log_json_ssl_is_https(r->connection)) { + if (ap_ssl_conn_is_ssl(r->connection)) { json_t *tls = json_object(); json_object_set_new_nocheck(tls, "v", - json_string(log_json_ssl_lookup( + json_string(ap_ssl_var_lookup( r->pool, r->server, r->connection, r, "SSL_PROTOCOL"))); json_object_set_new_nocheck(tls, "cipher", - json_string(log_json_ssl_lookup( + json_string(ap_ssl_var_lookup( r->pool, r->server, r->connection, r, "SSL_CIPHER"))); json_object_set_new_nocheck(tls, "client_verify", - json_string(log_json_ssl_lookup( + json_string(ap_ssl_var_lookup( r->pool, r->server, r->connection, r, "SSL_CLIENT_VERIFY"))); json_object_set_new_nocheck(tls, "sni", - json_string(log_json_ssl_lookup( + json_string(ap_ssl_var_lookup( r->pool, r->server, r->connection, r, "SSL_TLS_SNI"))); json_object_set_new_nocheck(obj, "tls", tls); @@ -162,9 +158,6 @@ log_json_post_config( return OK; } - log_json_ssl_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup); - log_json_ssl_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https); - /* http://jansson.readthedocs.io/en/2.8/portability.html#portability-thread-safety */ json_object_seed(0); |