[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] tls_hostname: TLS verification without fingerprint or FQDN



On Fri, Apr 20, 2018 at 6:21 AM, ilf <ilf@...273...> wrote:
> In order to use an
> IP or onion as $host combined with $tls_trust_file, I would propose to add
> something like a $tls_hostname setting which we will be verified against the
> hostname in the certificate.
>
> This isn't completely new, f.e. unbound does something like this for
> DNS-over-TLS:
>
>> forward-addr: 1.1.1.1#cloudflare-dns.com
>
> https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=658#c10

In addition to that method there may be some related things,

Tools like fetch can skip certain parts of a full cert check...

     --no-verify-hostname
                 [SSL] Do not verify that the hostname matches the subject of
                 the certificate presented by the server.

Tools like curl and wget can check only certain parts of the cert,
(as hinted in comment 0 part A, etc, of the ticket re: pinning sha256 PK)...

 https://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html

Didn't look, but these days, if provided by the library, it might also
be useful to lock down to only TLS_1_2 or TLS_1_3.

There could also be a TOFU mode where it accepts the first
CA valid (or otherwise based on specified checks) server cert
but locks out future cert changes (based on specified parameters),
with some alert or field noting such. That would require keeping a
state file, similar to wget's session / cookie management system.
TOFU seems more popular for longer lived SSH keys, and useful in
p2p / smtp networks where random peers may have self-signed certs.

Then there is potential of online CRL / OCSP / Cert Observatory checking...

Flexibility is fun.