Bug 248867 - net/syncthing: SSL errors due to Go 1.15 behaviour change
Summary: net/syncthing: SSL errors due to Go 1.15 behaviour change
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Steve Wills
URL: https://github.com/syncthing/syncthin...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-24 05:36 UTC by James French
Modified: 2020-08-24 18:04 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments
Backported patch from 1.9 development (5.78 KB, patch)
2020-08-24 05:36 UTC, James French
no flags Details | Diff
Poudriere build log (25.79 KB, text/plain)
2020-08-24 05:43 UTC, James French
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James French 2020-08-24 05:36:44 UTC
Created attachment 217476 [details]
Backported patch from 1.9 development

Go 1.15 has changed certificate handling which has broken the certificates syncthing self-generates for each host. Clients running Go 1.15 & Syncthing 1.8.0 will now error for every connecting host:

Bad certificate from <client> at [<client-v6-ip>]:22000-[<client-v6-ip>]:22000/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

Upstream have fixed this bug in this issue: https://github.com/syncthing/syncthing/issues/6867

The fix will be a part of the upcoming 1.90 release but in the interim 1.80 is currently broken with Go 1.15 (which are both the current versions in the ports tree). I have backported the fix and it does apply and build cleanly on 1.80.

Build log to follow.
Comment 1 James French 2020-08-24 05:43:10 UTC
Created attachment 217477 [details]
Poudriere build log

Can also confirm, that the fix does work with 1.8.0
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-08-24 17:51:35 UTC
A commit references this bug:

Author: swills
Date: Mon Aug 24 17:50:39 UTC 2020
New revision: 546103
URL: https://svnweb.freebsd.org/changeset/ports/546103

Log:
  net/syncthing: fix SSL errors due to Go 1.15 behaviour change

  PR:		248867
  Submitted by:	James French <james@french.id.au>

Changes:
  head/net/syncthing/Makefile
  head/net/syncthing/files/patch-syncthing_lib_api_api.go
  head/net/syncthing/files/patch-syncthing_lib_api_api__test.go
  head/net/syncthing/files/patch-syncthing_lib_connections_service.go
  head/net/syncthing/files/patch-syncthing_lib_tlsutil_tlsutil.go
Comment 3 Steve Wills freebsd_committer freebsd_triage 2020-08-24 18:04:26 UTC
Committed, thanks!