nghttpx: Rename spdy_{upstream,downstream}_no_tls as {upstream,downstream}_no_tls
This commit is contained in:
parent
564e6b9ffc
commit
0150312022
12
src/shrpx.cc
12
src/shrpx.cc
|
@ -240,13 +240,13 @@ int event_loop()
|
|||
|
||||
if(get_config()->client_mode) {
|
||||
sv_ssl_ctx = 0;
|
||||
cl_ssl_ctx = get_config()->spdy_downstream_no_tls ?
|
||||
cl_ssl_ctx = get_config()->downstream_no_tls ?
|
||||
0 : ssl::create_ssl_client_context();
|
||||
} else {
|
||||
sv_ssl_ctx = get_config()->spdy_upstream_no_tls ?
|
||||
sv_ssl_ctx = get_config()->upstream_no_tls ?
|
||||
0 : get_config()->default_ssl_ctx;
|
||||
cl_ssl_ctx = get_config()->spdy_bridge &&
|
||||
!get_config()->spdy_downstream_no_tls ?
|
||||
!get_config()->downstream_no_tls ?
|
||||
ssl::create_ssl_client_context() : 0;
|
||||
}
|
||||
|
||||
|
@ -357,8 +357,8 @@ void fill_default_config()
|
|||
mod_config()->spdy_upstream_window_bits = 16;
|
||||
mod_config()->spdy_downstream_window_bits = 16;
|
||||
|
||||
mod_config()->spdy_upstream_no_tls = false;
|
||||
mod_config()->spdy_downstream_no_tls = false;
|
||||
mod_config()->upstream_no_tls = false;
|
||||
mod_config()->downstream_no_tls = false;
|
||||
|
||||
set_config_str(&mod_config()->downstream_host, "127.0.0.1");
|
||||
mod_config()->downstream_port = 80;
|
||||
|
@ -902,7 +902,7 @@ int main(int argc, char **argv)
|
|||
mod_config()->downstream_proto = PROTO_HTTP;
|
||||
}
|
||||
|
||||
if(!get_config()->client_mode && !get_config()->spdy_upstream_no_tls) {
|
||||
if(!get_config()->client_mode && !get_config()->upstream_no_tls) {
|
||||
if(!get_config()->private_key_file || !get_config()->cert_file) {
|
||||
print_usage(std::cerr);
|
||||
LOG(FATAL) << "Too few arguments";
|
||||
|
|
|
@ -266,9 +266,9 @@ int parse_config(const char *opt, const char *optarg)
|
|||
return -1;
|
||||
}
|
||||
} else if(util::strieq(opt, SHRPX_OPT_FRONTEND_NO_TLS)) {
|
||||
mod_config()->spdy_upstream_no_tls = util::strieq(optarg, "yes");
|
||||
mod_config()->upstream_no_tls = util::strieq(optarg, "yes");
|
||||
} else if(util::strieq(opt, SHRPX_OPT_BACKEND_NO_TLS)) {
|
||||
mod_config()->spdy_downstream_no_tls = util::strieq(optarg, "yes");
|
||||
mod_config()->downstream_no_tls = util::strieq(optarg, "yes");
|
||||
} else if(util::strieq(opt, SHRPX_OPT_BACKEND_TLS_SNI_FIELD)) {
|
||||
set_config_str(&mod_config()->backend_tls_sni_name, optarg);
|
||||
} else if(util::strieq(opt, SHRPX_OPT_PID_FILE)) {
|
||||
|
|
|
@ -130,8 +130,8 @@ struct Config {
|
|||
bool accesslog;
|
||||
size_t spdy_upstream_window_bits;
|
||||
size_t spdy_downstream_window_bits;
|
||||
bool spdy_upstream_no_tls;
|
||||
bool spdy_downstream_no_tls;
|
||||
bool upstream_no_tls;
|
||||
bool downstream_no_tls;
|
||||
char *backend_tls_sni_name;
|
||||
char *pid_file;
|
||||
uid_t uid;
|
||||
|
|
|
@ -248,7 +248,7 @@ void eventcb(bufferevent *bev, short events, void *ptr)
|
|||
SSLOG(INFO, spdy) << "Connection established";
|
||||
}
|
||||
spdy->set_state(SpdySession::CONNECTED);
|
||||
if((!get_config()->spdy_downstream_no_tls &&
|
||||
if((!get_config()->downstream_no_tls &&
|
||||
!get_config()->insecure && spdy->check_cert() != 0) ||
|
||||
spdy->on_connect() != 0) {
|
||||
spdy->disconnect();
|
||||
|
|
Loading…
Reference in New Issue