mirror of
https://github.com/matrix-construct/construct
synced 2024-05-29 00:03:45 +02:00
ircd::net::acceptor: Move alpn/sni init config into method; minor reorg.
This commit is contained in:
parent
abf1ed47c6
commit
3fcfaddc3e
|
@ -71,6 +71,7 @@ ircd::net::acceptor
|
||||||
void configure_ciphers(const json::object &);
|
void configure_ciphers(const json::object &);
|
||||||
void configure_flags(const json::object &);
|
void configure_flags(const json::object &);
|
||||||
void configure_password(const json::object &);
|
void configure_password(const json::object &);
|
||||||
|
void configure_sni(const json::object &);
|
||||||
void configure(const json::object &opts);
|
void configure(const json::object &opts);
|
||||||
|
|
||||||
// Handshake stack
|
// Handshake stack
|
||||||
|
|
|
@ -328,13 +328,6 @@ try
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
configure(opts);
|
configure(opts);
|
||||||
|
|
||||||
log::debug
|
|
||||||
{
|
|
||||||
log, "%s configured listener SSL",
|
|
||||||
loghead(*this)
|
|
||||||
};
|
|
||||||
|
|
||||||
open();
|
open();
|
||||||
}
|
}
|
||||||
catch(const boost::system::system_error &e)
|
catch(const boost::system::system_error &e)
|
||||||
|
@ -1081,7 +1074,18 @@ ircd::net::acceptor::configure(const json::object &opts)
|
||||||
configure_ciphers(opts);
|
configure_ciphers(opts);
|
||||||
configure_curves(opts);
|
configure_curves(opts);
|
||||||
configure_certs(opts);
|
configure_certs(opts);
|
||||||
|
configure_sni(opts);
|
||||||
|
|
||||||
|
log::debug
|
||||||
|
{
|
||||||
|
log, "%s configured listener SSL",
|
||||||
|
loghead(*this)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::net::acceptor::configure_sni(const json::object &opts)
|
||||||
|
{
|
||||||
SSL_CTX_set_alpn_select_cb(ssl.native_handle(), ircd_net_acceptor_handle_alpn, this);
|
SSL_CTX_set_alpn_select_cb(ssl.native_handle(), ircd_net_acceptor_handle_alpn, this);
|
||||||
SSL_CTX_set_tlsext_servername_callback(ssl.native_handle(), ircd_net_acceptor_handle_sni);
|
SSL_CTX_set_tlsext_servername_callback(ssl.native_handle(), ircd_net_acceptor_handle_sni);
|
||||||
SSL_CTX_set_tlsext_servername_arg(ssl.native_handle(), this);
|
SSL_CTX_set_tlsext_servername_arg(ssl.native_handle(), this);
|
||||||
|
|
Loading…
Reference in a new issue