LocalSend::Protocol::TLS
TLS for LocalSend's self-signed certificates.
LocalSend has no CA, so certificate-chain validation is disabled. Connections compare the presented SHA-256 fingerprint with the announcement instead.
Constants
Log = LocalSend::Log.for("tls")
Class methods
connect(identity : Identity, host : String, port : Int32, protocol : String, expect_fingerprint : String | Nil, timeout : Time::Span) : HTTP::Client
Opens an HTTP connection and verifies the expected TLS fingerprint before sending data.
Build the socket manually because HTTP::Client's TLS constructor does not expose it for fingerprint verification.
Checks the presented certificate against the announced fingerprint.