module

XMPP::TLSConnection

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

Class methods

client_context(config : Config) : OpenSSL::SSL::Context::Client

Builds the client TLS context (CA bundle, TLS version policy, verification policy) used by STARTTLS/direct-TLS sockets, WebSocket (wss), and BOSH (https) alike so certificate handling stays consistent.

Source
verification_failure?(message : String) : Bool

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

Source
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.

Source