module XMPP::TLSConnection

Overview

Shared TLS helpers used by both STARTTLS upgrades and XEP-0368 direct TLS connections so certificate handling stays consistent.

Defined in:

xmpp/tls.cr

Class Method Summary

Class Method Detail

def self.verification_failure?(message : String) : Bool #

Best-effort detection of certificate/hostname verification failures from OpenSSL error messages, which vary across platforms and versions.


[View source]
def self.wrap(socket : IO, config : Config, hostname : String) : OpenSSL::SSL::Socket::Client #

Wraps an already-connected socket in a client TLS socket, applying the configured CA bundle and certificate verification policy. On failure the underlying socket is closed so the caller can try the next endpoint.


[View source]