diff options
Diffstat (limited to 'xmpp-vala/src/module/tls.vala')
-rw-r--r-- | xmpp-vala/src/module/tls.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/tls.vala b/xmpp-vala/src/module/tls.vala index c3afc4b3..1b8a5411 100644 --- a/xmpp-vala/src/module/tls.vala +++ b/xmpp-vala/src/module/tls.vala @@ -23,10 +23,11 @@ namespace Xmpp.Tls { private void received_nonza(XmppStream stream, StanzaNode node) { if (node.ns_uri == NS_URI && node.name == "proceed") { try { - var io_stream = stream.get_stream(); + StartTlsXmppStream? tls_xmpp_stream = stream as StartTlsXmppStream; + var io_stream = tls_xmpp_stream.get_stream(); if (io_stream == null) return; var conn = TlsClientConnection.new(io_stream, identity); - stream.reset_stream(conn); + tls_xmpp_stream.reset_stream(conn); conn.accept_certificate.connect(on_invalid_certificate); var flag = stream.get_flag(Flag.IDENTITY); |