- ssl-default-server-ciphers
- ssl-default-server-ciphersuites
- ssl-default-server-client-sigalgs
+ - ssl-default-server-curves
- ssl-default-server-options
- ssl-default-server-sigalgs
- ssl-dh-param-file
versions. It is not recommended to change this setting unless compatibility
with a middlebox is required.
+ssl-default-server-curves <curves>
+ This setting is only available when support for OpenSSL was built in. It sets
+ the default string describing the list of elliptic curves algorithms ("curve
+ suite") that are negotiated during the SSL/TLS handshake with ECDHE. The format
+ of the string is a colon-delimited list of curve name.
+ Please check the "server" keyword for more information.
+
ssl-default-server-options [<option>]...
This setting is only available when support for OpenSSL was built in. It sets
default ssl-options to force on all "server" lines. Please check the "server"
at the same path suffixed by a ".key" (provided the "ssl-load-extra-files"
option is set accordingly).
+curves <curves>
+ This setting is only available when support for OpenSSL was built in. It sets
+ the string describing the list of elliptic curves algorithms ("curve suite")
+ that are negotiated during the SSL/TLS handshake with ECDHE. The format of the
+ string is a colon-delimited list of curve name.
+ Example: "X25519:P-256" (without quote)
+
disabled
The "disabled" keyword starts the server in the "disabled" state. That means
that it is marked down in maintenance mode, and no connection other than the
char **err)
{
char **target;
- target = &global_ssl.listen_default_curves;
+ target = (args[0][12] == 'b') ? &global_ssl.listen_default_curves : &global_ssl.connect_default_curves;
if (too_many_args(1, args, err, NULL))
return -1;
}
#endif
+#if defined(SSL_CTX_set1_curves_list)
+ if (global_ssl.connect_default_curves && !s->ssl_ctx.curves) {
+ s->ssl_ctx.curves = strdup(global_ssl.connect_default_curves);
+ if (!s->ssl_ctx.curves)
+ return 1;
+ }
+#endif
+
return 0;
}
#endif
}
+/* parse the "curves" server keyword */
+static int srv_parse_curves(char **args, int *cur_arg, struct proxy *px, struct server *newsrv, char **err)
+{
+#ifndef SSL_CTX_set1_curves_list
+ memprintf(err, "'%s' : library does not support setting curves list", args[*cur_arg]);
+ return ERR_ALERT | ERR_FATAL;
+#else
+ char *arg;
+
+ arg = args[*cur_arg + 1];
+ if (!*arg) {
+ memprintf(err, "'%s' : missing curves list", args[*cur_arg]);
+ return ERR_ALERT | ERR_FATAL;
+ }
+ newsrv->ssl_ctx.curves = strdup(arg);
+ if (!newsrv->ssl_ctx.curves) {
+ memprintf(err, "out of memory");
+ return ERR_ALERT | ERR_FATAL;
+ }
+ return 0;
+#endif
+}
+
/* parse the "crt" server keyword */
static int srv_parse_crt(char **args, int *cur_arg, struct proxy *px, struct server *newsrv, char **err)
{
#endif
{ "client-sigalgs", srv_parse_client_sigalgs, 1, 1, 1 }, /* signature algorithms */
{ "crl-file", srv_parse_crl_file, 1, 1, 1 }, /* set certificate revocation list file use on server cert verify */
+ { "curves", srv_parse_curves, 1, 1, 1 }, /* set TLS curves list */
{ "crt", srv_parse_crt, 1, 1, 1 }, /* set client certificate */
{ "force-sslv3", srv_parse_tls_method_options, 0, 1, 1 }, /* force SSLv3 */
{ "force-tlsv10", srv_parse_tls_method_options, 0, 1, 1 }, /* force TLSv10 */
{ CFG_GLOBAL, "ssl-default-server-ciphers", ssl_parse_global_ciphers },
#if defined(SSL_CTX_set1_curves_list)
{ CFG_GLOBAL, "ssl-default-bind-curves", ssl_parse_global_curves },
+ { CFG_GLOBAL, "ssl-default-server-curves", ssl_parse_global_curves },
#endif
#if defined(SSL_CTX_set1_sigalgs_list)
{ CFG_GLOBAL, "ssl-default-bind-sigalgs", ssl_parse_global_sigalgs },
#if defined(SSL_CTX_set1_client_sigalgs_list)
const char *conf_client_sigalgs = NULL;
#endif
+#if defined(SSL_CTX_set1_curves_list)
+ const char *conf_curves = NULL;
+#endif
if (conf_ssl_methods->flags && (conf_ssl_methods->min || conf_ssl_methods->max))
ha_warning("no-sslv3/no-tlsv1x are ignored for this server. "
}
#endif
+#if defined(SSL_CTX_set1_curves_list)
+ conf_curves = srv->ssl_ctx.curves;
+ if (conf_curves) {
+ if (!SSL_CTX_set1_curves_list(ctx, conf_curves)) {
+ ha_alert("Proxy '%s': unable to set SSL curves list to '%s' for server '%s'.\n",
+ curproxy->id, conf_curves, srv->id);
+ cfgerr++;
+ }
+ }
+#endif /* defined(SSL_CTX_set1_curves_list) */
+
return cfgerr;
}