Adding tls host name extension (SNI)
Signed-off-by: Viktor Gotwig <viktor.gotwig@q-loud.de>
This commit is contained in:
parent
6dd63d3000
commit
e90afb8526
@ -589,6 +589,14 @@ int net__socket_connect_step3(struct mosquitto *mosq, const char *host, uint16_t
|
||||
}
|
||||
SSL_set_bio(mosq->ssl, bio, bio);
|
||||
|
||||
/*
|
||||
* required for the SNI resolving
|
||||
*/
|
||||
if(SSL_set_tlsext_host_name(mosq->ssl, host) != 1) {
|
||||
COMPAT_CLOSE(mosq->sock);
|
||||
return MOSQ_ERR_TLS;
|
||||
}
|
||||
|
||||
if(net__socket_connect_tls(mosq)){
|
||||
return MOSQ_ERR_TLS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user