XMPP::TLSConnection
Shared TLS helpers used by both STARTTLS upgrades and XEP-0368 direct TLS connections so certificate handling stays consistent.
Class methods
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.