增加ssl_stream_dump_info函数,输出ssl版本号、sni,以进一步定位 #116

This commit is contained in:
zhengchao
2019-02-18 18:25:19 +06:00
parent 2d34aafa48
commit 71f7452413
2 changed files with 7 additions and 2 deletions

View File

@@ -886,6 +886,12 @@ struct bufferevent * ssl_upstream_create_result_release_bev(future_result_t * re
ctx->bev = NULL; //giveup ownership
return ret;
}
const char* ssl_stream_dump_info(struct ssl_stream *stream, char* buffer, size_t sz)
{
snprintf(buffer, sz, "%s:%s", SSL_get_version(stream->ssl),
stream->dir==CONN_DIR_UPSTREAM ? stream->client_hello->sni:NULL);
return buffer;
}
void ssl_stream_log_error(struct bufferevent * bev, enum tfe_conn_dir dir, struct ssl_mgr* mgr)
{
unsigned long sslerr=0;