You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2015/09/15 18:14:35 UTC
trafficserver git commit: [TS-3648] Desire support for client TLS
cipher in custom log format. This closes #288. This closes #122.
Repository: trafficserver
Updated Branches:
refs/heads/master 35eedcc8f -> e445bcd4d
[TS-3648] Desire support for client TLS cipher in custom log format. This closes #288. This closes #122.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e445bcd4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e445bcd4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e445bcd4
Branch: refs/heads/master
Commit: e445bcd4d44e1780acb8d5eff6aa9a6b99db5088
Parents: 35eedcc
Author: Eric Schwartz <es...@unknown-192-168-202-143.yahoo.com>
Authored: Tue Sep 8 07:38:44 2015 -0700
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Tue Sep 15 11:14:08 2015 -0500
----------------------------------------------------------------------
proxy/http/HttpSM.cc | 6 ++++--
proxy/logging/LogAccessHttp.cc | 14 ++++++++------
2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e445bcd4/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index df369d8..ad8082f 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -481,8 +481,10 @@ HttpSM::attach_client_session(HttpClientSession *client_vc, IOBufferReader *buff
if (ssl_vc != NULL) {
client_connection_is_ssl = true;
client_ssl_reused = ssl_vc->getSSLSessionCacheHit();
- client_sec_protocol = ssl_vc->getSSLProtocol();
- client_cipher_suite = ssl_vc->getSSLCipherSuite();
+ const char *protocol = ssl_vc->getSSLProtocol();
+ client_sec_protocol = protocol ? protocol : "-";
+ const char *cipher = ssl_vc->getSSLCipherSuite();
+ client_cipher_suite = cipher ? cipher : "-";
}
ink_release_assert(ua_session->get_half_close_flag() == false);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e445bcd4/proxy/logging/LogAccessHttp.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index ba8b7de..8c7b525 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -711,24 +711,26 @@ LogAccessHttp::marshal_client_finish_status_code(char *buf)
int
LogAccessHttp::marshal_client_security_protocol(char *buf)
{
- int round_len = INK_MIN_ALIGN;
+ const char *proto = m_http_sm->client_sec_protocol;
+ int round_len = LogAccess::strlen(proto);
+
if (buf) {
- const char *proto = m_http_sm->client_sec_protocol;
- round_len = LogAccess::strlen(proto);
marshal_str(buf, proto, round_len);
}
+
return round_len;
}
int
LogAccessHttp::marshal_client_security_cipher_suite(char *buf)
{
- int round_len = INK_MIN_ALIGN;
+ const char *cipher = m_http_sm->client_cipher_suite;
+ int round_len = LogAccess::strlen(cipher);
+
if (buf) {
- const char *cipher = m_http_sm->client_cipher_suite;
- round_len = LogAccess::strlen(cipher);
marshal_str(buf, cipher, round_len);
}
+
return round_len;
}