Commit 0ea041e8 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Add doc and clean up

parent e048deb6
......@@ -288,8 +288,7 @@ long int create_tls_proto_mask(const std::vector<char *> &tls_proto_list) {
SSL_CTX *create_ssl_context(const char *private_key_file,
const char *cert_file) {
SSL_CTX *ssl_ctx;
ssl_ctx = SSL_CTX_new(SSLv23_server_method());
auto ssl_ctx = SSL_CTX_new(SSLv23_server_method());
if (!ssl_ctx) {
LOG(FATAL) << ERR_error_string(ERR_get_error(), nullptr);
DIE();
......@@ -440,8 +439,7 @@ int select_next_proto_cb(SSL *ssl, unsigned char **out, unsigned char *outlen,
} // namespace
SSL_CTX *create_ssl_client_context() {
SSL_CTX *ssl_ctx;
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
auto ssl_ctx = SSL_CTX_new(SSLv23_client_method());
if (!ssl_ctx) {
LOG(FATAL) << ERR_error_string(ERR_get_error(), nullptr);
DIE();
......
......@@ -42,9 +42,11 @@ class DownstreamConnectionPool;
namespace ssl {
// Create server side SSL_CTX
SSL_CTX *create_ssl_context(const char *private_key_file,
const char *cert_file);
// Create client side SSL_CTX
SSL_CTX *create_ssl_client_context();
ClientHandler *accept_connection(struct ev_loop *loop, SSL_CTX *ssl_ctx, int fd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment