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.crClass Method Summary
-
.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.
-
.verification_failure?(message : String) : Bool
Best-effort detection of certificate/hostname verification failures from OpenSSL error messages, which vary across platforms and versions.
-
.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.
Class Method Detail
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.
Best-effort detection of certificate/hostname verification failures from OpenSSL error messages, which vary across platforms and versions.
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.