From 6d947c42b5e573cb350a1354a47a3a806a22cbb2 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 15 Sep 2018 16:11:05 +0200 Subject: Notification on TLS error/wrong password, log TLS cert issues, don't make account with connection error appear disabled in accounts dialog --- xmpp-vala/src/module/xep/0368_srv_records_tls.vala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmpp-vala/src/module/xep') diff --git a/xmpp-vala/src/module/xep/0368_srv_records_tls.vala b/xmpp-vala/src/module/xep/0368_srv_records_tls.vala index 8da8ba0c..87c8e433 100644 --- a/xmpp-vala/src/module/xep/0368_srv_records_tls.vala +++ b/xmpp-vala/src/module/xep/0368_srv_records_tls.vala @@ -37,9 +37,10 @@ public class TlsConnectionProvider : ConnectionProvider { SocketClient client = new SocketClient(); try { IOStream? io_stream = yield client.connect_to_host_async(srv_target.get_hostname(), srv_target.get_port()); - io_stream = TlsClientConnection.new(io_stream, new NetworkAddress(stream.remote_name.to_string(), srv_target.get_port())); + TlsConnection tls_connection = TlsClientConnection.new(io_stream, new NetworkAddress(stream.remote_name.to_string(), srv_target.get_port())); + tls_connection.accept_certificate.connect(Tls.Module.on_invalid_certificate); stream.add_flag(new Tls.Flag() { finished=true }); - return io_stream; + return tls_connection; } catch (Error e) { return null; } -- cgit v1.2.3-70-g09d2