nghttpx: Use ImmutableString for ciphers

This commit is contained in:
Tatsuhiro Tsujikawa 2016-02-14 21:25:24 +09:00
parent 2344932b45
commit 67804cfc8c
3 changed files with 6 additions and 6 deletions

View File

@ -1804,7 +1804,7 @@ int parse_config(const char *opt, const char *optarg,
return 0;
}
case SHRPX_OPTID_CIPHERS:
mod_config()->tls.ciphers = strcopy(optarg);
mod_config()->tls.ciphers = optarg;
return 0;
case SHRPX_OPTID_CLIENT:

View File

@ -430,7 +430,7 @@ struct TLSConfig {
ImmutableString private_key_passwd;
ImmutableString cert_file;
ImmutableString dh_param_file;
std::unique_ptr<char[]> ciphers;
ImmutableString ciphers;
ImmutableString cacert;
bool insecure;
bool no_http2_cipher_black_list;

View File

@ -493,8 +493,8 @@ SSL_CTX *create_ssl_context(const char *private_key_file, const char *cert_file
SSL_CTX_set_timeout(ssl_ctx, tlsconf.session_timeout.count());
const char *ciphers;
if (tlsconf.ciphers) {
ciphers = tlsconf.ciphers.get();
if (!tlsconf.ciphers.empty()) {
ciphers = tlsconf.ciphers.c_str();
} else {
ciphers = nghttp2::ssl::DEFAULT_CIPHER_LIST;
}
@ -683,8 +683,8 @@ SSL_CTX *create_ssl_client_context(
SSL_CTX_set_options(ssl_ctx, ssl_opts | tlsconf.tls_proto_mask);
const char *ciphers;
if (tlsconf.ciphers) {
ciphers = tlsconf.ciphers.get();
if (!tlsconf.ciphers.empty()) {
ciphers = tlsconf.ciphers.c_str();
} else {
ciphers = nghttp2::ssl::DEFAULT_CIPHER_LIST;
}