Documentation
¶
Overview ¶
Package tlscert manages a local CA and server certificate for the LAN HTTPS listener. The CA is generated once so a phone only has to trust it once; the server certificate is renewed whenever the machine's LAN addresses change or it approaches expiry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store owns the CA and server certificate files in one directory.
func (*Store) CAPEMPath ¶
CAPEMPath returns the path of the CA certificate that devices need to install and trust.
func (*Store) Certificate ¶
Certificate returns a server certificate covering the given IPs. It is exported for tests and for callers that already know the desired SANs.
func (*Store) ServerCertificate ¶
func (s *Store) ServerCertificate() (tls.Certificate, error)
ServerCertificate returns the TLS certificate for the LAN HTTPS listener, generating or renewing the local CA and leaf certificate as needed.