MCPcopy
hub / github.com/perkeep/perkeep / DefaultTLSCert

Function DefaultTLSCert

internal/osutil/paths.go:299–305  ·  view source on GitHub ↗

DefaultTLSCert returns the path to the default TLS certificate file that is used (creating if necessary) when TLS is specified without the cert file.

()

Source from the content-addressed store, hash-verified

297// file that is used (creating if necessary) when TLS is specified
298// without the cert file.
299func DefaultTLSCert() string {
300 dir, err := PerkeepConfigDir()
301 if err != nil {
302 log.Fatalf("Could not compute DefaultTLSCert: %v", err)
303 }
304 return filepath.Join(dir, "tls.crt")
305}
306
307// DefaultTLSKey returns the path to the default TLS key
308// file that is used (creating if necessary) when TLS is specified

Callers 1

setupTLSFunction · 0.92

Calls 2

PerkeepConfigDirFunction · 0.85
FatalfMethod · 0.65

Tested by

no test coverage detected