nghttpx: Add doc and clean up
This commit is contained in:
parent
e048deb64c
commit
0ea041e8cb
|
@ -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,
|
SSL_CTX *create_ssl_context(const char *private_key_file,
|
||||||
const char *cert_file) {
|
const char *cert_file) {
|
||||||
SSL_CTX *ssl_ctx;
|
auto ssl_ctx = SSL_CTX_new(SSLv23_server_method());
|
||||||
ssl_ctx = SSL_CTX_new(SSLv23_server_method());
|
|
||||||
if (!ssl_ctx) {
|
if (!ssl_ctx) {
|
||||||
LOG(FATAL) << ERR_error_string(ERR_get_error(), nullptr);
|
LOG(FATAL) << ERR_error_string(ERR_get_error(), nullptr);
|
||||||
DIE();
|
DIE();
|
||||||
|
@ -440,8 +439,7 @@ int select_next_proto_cb(SSL *ssl, unsigned char **out, unsigned char *outlen,
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
SSL_CTX *create_ssl_client_context() {
|
SSL_CTX *create_ssl_client_context() {
|
||||||
SSL_CTX *ssl_ctx;
|
auto ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
||||||
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
|
||||||
if (!ssl_ctx) {
|
if (!ssl_ctx) {
|
||||||
LOG(FATAL) << ERR_error_string(ERR_get_error(), nullptr);
|
LOG(FATAL) << ERR_error_string(ERR_get_error(), nullptr);
|
||||||
DIE();
|
DIE();
|
||||||
|
|
|
@ -42,9 +42,11 @@ class DownstreamConnectionPool;
|
||||||
|
|
||||||
namespace ssl {
|
namespace ssl {
|
||||||
|
|
||||||
|
// Create server side SSL_CTX
|
||||||
SSL_CTX *create_ssl_context(const char *private_key_file,
|
SSL_CTX *create_ssl_context(const char *private_key_file,
|
||||||
const char *cert_file);
|
const char *cert_file);
|
||||||
|
|
||||||
|
// Create client side SSL_CTX
|
||||||
SSL_CTX *create_ssl_client_context();
|
SSL_CTX *create_ssl_client_context();
|
||||||
|
|
||||||
ClientHandler *accept_connection(struct ev_loop *loop, SSL_CTX *ssl_ctx, int fd,
|
ClientHandler *accept_connection(struct ev_loop *loop, SSL_CTX *ssl_ctx, int fd,
|
||||||
|
|
Loading…
Reference in New Issue