syncthing/lib/tlsutil
Jakob Borg 2dc2aa5d21
lib/connections, lib/tlsutil: Handle certName in Go 1.15 (fixes #6867) (#6868)
Our authentication is based on device ID (certificate fingerprint) but
we also check the certificate name for ... historical extra security
reasons. (I don't think this adds anything but it is what it is.) Since
that check breaks in Go 1.15 this change does two things:

- Adds a manual check for the peer certificate CommonName, and if they
  are equal we are happy and don't call the more advanced
  VerifyHostname() function. This allows our old style certificates to
  still pass the check.

- Adds the cert name "syncthing" as a DNS SAN when generating the
  certificate. This is the correct way nowadays and makes VerifyHostname()
  happy in Go 1.15 as well, even without the above patch.
2020-07-30 13:36:11 +02:00
..
tlsutil_test.go cmd/*, lib/tlsutil: Refactor TLS stuff (fixes #5256) (#5276) 2018-10-21 14:17:50 +09:00
tlsutil.go lib/connections, lib/tlsutil: Handle certName in Go 1.15 (fixes #6867) (#6868) 2020-07-30 13:36:11 +02:00