ssl_quic_initial_ctx() stores the result of SSL_CTX_new() into
bind_conf->initial_ctx without checking it, unlike ssl_sock_initial_ctx()
which alerts and returns an error. On allocation failure the QUIC bind
therefore crashed without any diagnostic.
Report the failure the same way the TCP path does.
Must be backported to all stable versions.
SSL_CTX *ctx;
ctx = SSL_CTX_new(TLS_server_method());
+ if (!ctx) {
+ cfgerr += 1;
+ ha_alert("Proxy '%s': failed to create an SSL context for bind '%s' at [%s:%d].\n",
+ bind_conf->frontend->id, bind_conf->arg, bind_conf->file, bind_conf->line);
+ goto end;
+ }
+
bind_conf->initial_ctx = ctx;
if (global_ssl.security_level > -1)
}
#endif
-
+ end:
return cfgerr;
}