syncthing/lib/discover
André Colomb ec8a748514
lib/syncthing: Clean up / refactor LoadOrGenerateCertificate() utility function. (#8025)
LoadOrGenerateCertificate() takes two file path arguments, but then
uses the locations package to determine the actual path.  Fix that
with a minimally invasive change, by using the arguments instead.
Factor out GenerateCertificate().

The only caller of this function is cmd/syncthing, which passes the
same values, so this is technically a no-op.

* lib/tlsutil: Make storing generated certificate optional.  Avoid
  temporary cert and key files in tests, keep cert in memory.
2021-11-07 23:59:48 +01:00
..
mocks lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
cache_test.go all: Refactor preparing configuration (#7127) 2020-11-20 14:21:54 +01:00
cache.go all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
discover.go all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
doc.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
global_test.go lib/syncthing: Clean up / refactor LoadOrGenerateCertificate() utility function. (#8025) 2021-11-07 23:59:48 +01:00
global.go all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
local_test.go all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
local.go lib/discover, lib/protocol: Buffer allocation 2021-09-06 15:30:56 +02:00
local.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
manager.go build: List go:generate tools in tools.go (#7599) 2021-05-08 12:52:06 +02:00