> how-to You will have a pain fingerprint (or file) pinning Gmail and many other service certs these days because they change their end service cert sigs frequently via LetsEncrypt, and Google even physically swaps out their entire service certs while leaving their intermediates in place longer term. This forces at least a three month maintenance cycle upon the user, some services even do it monthly.
Msmtp should thus be updated to support setting a --pinnedpubkey sha256//<hash> option to which each cert's pubkey, in the path from the root down to the end service, in order, is compared, wherein the first match will pass. That way an intermediate cert can be pubkey pinned [1] while leaving the service cert free to rotate out at frequency (the Google problem, among others). However, the end service cert must still pass the usual root cert path, sig, expiry, etc checks, even though it is no longer fingerprint or pubkey pinned. Obviously --pinnedpubkey could be set to the pubkey of the end service cert, thus leaving just its sig free to rotate, but not its pubkey (the LetsEncrypt problem, among others). For those now common scenarios, pubkey checking is more useful than fingerprint checking over full cert DER form with sig. Note that a compromised privkey will always change both pubkey and sig anyways. And note that a sig of a cert is in some environments an equivalent security to knowing the pubkey hash. The first pass scheme obviously does make it logically acceptable to set both --pinnedpubkey and --tls_fingerprint at the same time, to whatever values you want, wherein both options must pass if so. [1] --tls_fingerprint should also be updated to be first match wins, that way an intermediate could be fingerprint pinned if its sig interval is expected to be less than a pain.. curl(1) --pinnedpubkey <hashes> (TLS) Tells curl to use the specified public key file (or hashes) to verify the peer. This can be a path to a file which contains a single public key in PEM or DER format, or any number of base64 encoded sha256 hashes preceded by 'sha256//' and separated by ';' When negotiating a TLS or SSL connection, the server sends a certificate indicating its identity. A public key is extracted from this certificate and if it does not exactly match the public key provided to this option, curl will abort the connection before sending or receiving any data. CURLOPT_PINNEDPUBLICKEY(3) PUBLIC KEY EXTRACTION If you do not have the server's public key file you can extract it from the server's certificate... snip _______________________________________________ msmtp-users mailing list msmtp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/msmtp-users