Sha256: 18d633f0e43243653953b11b3d277504ec55e32eb1a356fdbc0e8d2b359ad121
Contents?: true
Size: 553 Bytes
Versions: 33
Compression:
Stored size: 553 Bytes
Contents
module Blather class Stream # @private class TLS < Features class TLSFailure < BlatherError register :tls_failure end TLS_NS = 'urn:ietf:params:xml:ns:xmpp-tls'.freeze register TLS_NS def receive_data(stanza) case stanza.element_name when 'starttls' @stream.send "<starttls xmlns='#{TLS_NS}'/>" when 'proceed' @stream.start_tls(:verify_peer => true) @stream.start # succeed! else fail! TLSFailure.new end end end #TLS end #Stream end #Blather
Version data entries
33 entries across 33 versions & 2 rubygems