lejp-conf: support builds without TLS
This commit is contained in:
parent
2e4ac9defe
commit
a903d73ab7
1 changed files with 8 additions and 0 deletions
|
@ -326,6 +326,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
a->info->ssl_cert_filepath = NULL;
|
||||
a->info->ssl_private_key_filepath = NULL;
|
||||
a->info->ssl_ca_filepath = NULL;
|
||||
#ifdef LWS_OPENSSL_SUPPORT
|
||||
a->info->client_ssl_cert_filepath = NULL;
|
||||
a->info->client_ssl_private_key_filepath = NULL;
|
||||
a->info->client_ssl_ca_filepath = NULL;
|
||||
|
@ -342,6 +343,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
"!DHE-RSA-AES256-SHA256:"
|
||||
"!AES256-GCM-SHA384:"
|
||||
"!AES256-SHA256";
|
||||
#endif
|
||||
a->info->timeout_secs = 5;
|
||||
a->info->ssl_cipher_list = "ECDHE-ECDSA-AES256-GCM-SHA384:"
|
||||
"ECDHE-RSA-AES256-GCM-SHA384:"
|
||||
|
@ -434,6 +436,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
}
|
||||
a->any_vhosts = 1;
|
||||
|
||||
#ifdef LWS_OPENSSL_SUPPORT
|
||||
if (a->enable_client_ssl) {
|
||||
const char *cert_filepath = a->info->client_ssl_cert_filepath;
|
||||
const char *private_key_filepath = a->info->client_ssl_private_key_filepath;
|
||||
|
@ -447,6 +450,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
a->info->options = LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
|
||||
lws_init_vhost_client_ssl(a->info, vhost);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -576,9 +580,11 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
case LEJPVP_KEEPALIVE_TIMEOUT:
|
||||
a->info->keepalive_timeout = atoi(ctx->buf);
|
||||
return 0;
|
||||
#ifdef LWS_OPENSSL_SUPPORT
|
||||
case LEJPVP_CLIENT_CIPHERS:
|
||||
a->info->client_ssl_cipher_list = a->p;
|
||||
break;
|
||||
#endif
|
||||
case LEJPVP_CIPHERS:
|
||||
a->info->ssl_cipher_list = a->p;
|
||||
break;
|
||||
|
@ -654,6 +660,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
case LEJPVP_ENABLE_CLIENT_SSL:
|
||||
a->enable_client_ssl = arg_to_bool(ctx->buf);
|
||||
return 0;
|
||||
#ifdef LWS_OPENSSL_SUPPORT
|
||||
case LEJPVP_CLIENT_SSL_KEY:
|
||||
a->info->client_ssl_private_key_filepath = a->p;
|
||||
break;
|
||||
|
@ -663,6 +670,7 @@ lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
|||
case LEJPVP_CLIENT_SSL_CA:
|
||||
a->info->client_ssl_ca_filepath = a->p;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case LEJPVP_NOIPV6:
|
||||
if (arg_to_bool(ctx->buf))
|
||||
|
|
Loading…
Add table
Reference in a new issue