nghttpx: Add doc and clean up

This commit is contained in:
Tatsuhiro Tsujikawa 2015-01-12 22:47:30 +09:00
parent e048deb64c
commit 0ea041e8cb
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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,