Skip to content

Commit

Permalink
nghttpx: Rename ssl_* log variables as tls_*
Browse files Browse the repository at this point in the history
The exiting ssl_* log variables still work for backward compatibility.
  • Loading branch information
tatsuhiro-t committed Apr 18, 2017
1 parent 2c5cf5a commit 03be97e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
4 changes: 4 additions & 0 deletions gennghttpxfun.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@
"ssl_protocol",
"ssl_session_id",
"ssl_session_reused",
"tls_cipher",
"tls_protocol",
"tls_session_id",
"tls_session_reused",
"backend_host",
"backend_port",
]
Expand Down
8 changes: 4 additions & 4 deletions src/shrpx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2447,10 +2447,10 @@ HTTP/2 and SPDY:
* $alpn: ALPN identifier of the protocol which generates
the response. For HTTP/1, ALPN is always http/1.1,
regardless of minor version.
* $ssl_cipher: cipher used for SSL/TLS connection.
* $ssl_protocol: protocol for SSL/TLS connection.
* $ssl_session_id: session ID for SSL/TLS connection.
* $ssl_session_reused: "r" if SSL/TLS session was
* $tls_cipher: cipher used for SSL/TLS connection.
* $tls_protocol: protocol for SSL/TLS connection.
* $tls_session_id: session ID for SSL/TLS connection.
* $tls_session_reused: "r" if SSL/TLS session was
reused. Otherwise, "."
* $backend_host: backend host used to fulfill the
request. "-" if backend host is not available.
Expand Down
12 changes: 12 additions & 0 deletions src/shrpx_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ LogFragmentType log_var_lookup_token(const char *name, size_t namelen) {
if (util::strieq_l("ssl_ciphe", name, 9)) {
return SHRPX_LOGF_SSL_CIPHER;
}
if (util::strieq_l("tls_ciphe", name, 9)) {
return SHRPX_LOGF_TLS_CIPHER;
}
break;
}
break;
Expand Down Expand Up @@ -455,6 +458,9 @@ LogFragmentType log_var_lookup_token(const char *name, size_t namelen) {
if (util::strieq_l("ssl_protoco", name, 11)) {
return SHRPX_LOGF_SSL_PROTOCOL;
}
if (util::strieq_l("tls_protoco", name, 11)) {
return SHRPX_LOGF_TLS_PROTOCOL;
}
break;
case 't':
if (util::strieq_l("backend_hos", name, 11)) {
Expand All @@ -472,6 +478,9 @@ LogFragmentType log_var_lookup_token(const char *name, size_t namelen) {
if (util::strieq_l("ssl_session_i", name, 13)) {
return SHRPX_LOGF_SSL_SESSION_ID;
}
if (util::strieq_l("tls_session_i", name, 13)) {
return SHRPX_LOGF_TLS_SESSION_ID;
}
break;
}
break;
Expand All @@ -490,6 +499,9 @@ LogFragmentType log_var_lookup_token(const char *name, size_t namelen) {
if (util::strieq_l("ssl_session_reuse", name, 17)) {
return SHRPX_LOGF_SSL_SESSION_REUSED;
}
if (util::strieq_l("tls_session_reuse", name, 17)) {
return SHRPX_LOGF_TLS_SESSION_REUSED;
}
break;
}
break;
Expand Down
12 changes: 8 additions & 4 deletions src/shrpx_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,14 @@ enum LogFragmentType {
SHRPX_LOGF_REQUEST_TIME,
SHRPX_LOGF_PID,
SHRPX_LOGF_ALPN,
SHRPX_LOGF_SSL_CIPHER,
SHRPX_LOGF_SSL_PROTOCOL,
SHRPX_LOGF_SSL_SESSION_ID,
SHRPX_LOGF_SSL_SESSION_REUSED,
SHRPX_LOGF_TLS_CIPHER,
SHRPX_LOGF_SSL_CIPHER = SHRPX_LOGF_TLS_CIPHER,
SHRPX_LOGF_TLS_PROTOCOL,
SHRPX_LOGF_SSL_PROTOCOL = SHRPX_LOGF_TLS_PROTOCOL,
SHRPX_LOGF_TLS_SESSION_ID,
SHRPX_LOGF_SSL_SESSION_ID = SHRPX_LOGF_TLS_SESSION_ID,
SHRPX_LOGF_TLS_SESSION_REUSED,
SHRPX_LOGF_SSL_SESSION_REUSED = SHRPX_LOGF_TLS_SESSION_REUSED,
SHRPX_LOGF_BACKEND_HOST,
SHRPX_LOGF_BACKEND_PORT,
};
Expand Down

0 comments on commit 03be97e

Please sign in to comment.