[323] Allow outgoing IPv6 connections to use TLS.

Bug: https://github.com/eclipse/mosquitto/issues/323
pull/223/merge
Roger A. Light 9 years ago
parent ed80a9a526
commit 98ea684906

@ -1,6 +1,11 @@
Broker:
- Fix crash when "lazy" type bridge attempts to reconnect. Closes #259.
- maximum_connections now applies to websockets listeners. Closes #271.
- Allow bridges to use TLS with IPv6.
Client library:
- Clients can now use TLS with IPv6.
1.4.10 - 20160816
=================

@ -281,14 +281,7 @@ int _mosquitto_try_connect(struct mosquitto *mosq, const char *host, uint16_t po
*sock = INVALID_SOCKET;
memset(&hints, 0, sizeof(struct addrinfo));
#ifdef WITH_TLS
if(mosq->tls_cafile || mosq->tls_capath || mosq->tls_psk){
hints.ai_family = PF_INET;
}else
#endif
{
hints.ai_family = PF_UNSPEC;
}
hints.ai_family = PF_UNSPEC;
hints.ai_flags = AI_ADDRCONFIG;
hints.ai_socktype = SOCK_STREAM;
@ -542,6 +535,7 @@ int _mosquitto_socket_connect(struct mosquitto *mosq, const char *host, uint16_t
COMPAT_CLOSE(sock);
return MOSQ_ERR_TLS;
}
SSL_set_ex_data(mosq->ssl, tls_ex_index_mosq, mosq);
bio = BIO_new_socket(sock, BIO_NOCLOSE);
if(!bio){

Loading…
Cancel
Save