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. |
||
---|---|---|
.. | ||
auto | ||
testdata | ||
.gitignore | ||
api.go | ||
api_auth.go | ||
api_auth_test.go | ||
api_csrf.go | ||
api_statics.go | ||
api_test.go | ||
confighandler.go | ||
debug.go | ||
mocked_config_test.go | ||
support_bundle.go |