cert: allow cert expiry to be set in config
This commit is contained in:
1 parent
1ccf6ed7d4
commit
786568fa46
6 files changed
+32
-21
No files matched your search
@@ -79,6 +79,11 @@ const (
|
||||
defaultTorV2PrivateKeyFilename = "v2_onion_private_key"
|
||||
defaultTorV3PrivateKeyFilename = "v3_onion_private_key"
|
||||
|
||||
// DefaultAutogenValidity is the default validity of a self-signed
|
||||
// certificate. The value corresponds to 14 months
|
||||
// (14 months * 30 days * 24 hours).
|
||||
defaultTLSCertDuration = 14 * 30 * 24 * time.Hour
|
||||
|
||||
// minTimeLockDelta is the minimum timelock we require for incoming
|
||||
// HTLCs on our channels.
|
||||
minTimeLockDelta = routing.MinCLTVDelta
|
||||
@@ -193,12 +198,13 @@ type Config struct {
|
||||
DataDir string `short:"b" long:"datadir" description:"The directory to store lnd's data within"`
|
||||
SyncFreelist bool `long:"sync-freelist" description:"Whether the databases used within lnd should sync their freelist to disk. This is disabled by default resulting in improved memory performance during operation, but with an increase in startup time."`
|
||||
|
||||
TLSCertPath string `long:"tlscertpath" description:"Path to write the TLS certificate for lnd's RPC and REST services"`
|
||||
TLSKeyPath string `long:"tlskeypath" description:"Path to write the TLS private key for lnd's RPC and REST services"`
|
||||
TLSExtraIPs []string `long:"tlsextraip" description:"Adds an extra ip to the generated certificate"`
|
||||
TLSExtraDomains []string `long:"tlsextradomain" description:"Adds an extra domain to the generated certificate"`
|
||||
TLSAutoRefresh bool `long:"tlsautorefresh" description:"Re-generate TLS certificate and key if the IPs or domains are changed"`
|
||||
TLSDisableAutofill bool `long:"tlsdisableautofill" description:"Do not include the interface IPs or the system hostname in TLS certificate, use first --tlsextradomain as Common Name instead, if set"`
|
||||
TLSCertPath string `long:"tlscertpath" description:"Path to write the TLS certificate for lnd's RPC and REST services"`
|
||||
TLSKeyPath string `long:"tlskeypath" description:"Path to write the TLS private key for lnd's RPC and REST services"`
|
||||
TLSExtraIPs []string `long:"tlsextraip" description:"Adds an extra ip to the generated certificate"`
|
||||
TLSExtraDomains []string `long:"tlsextradomain" description:"Adds an extra domain to the generated certificate"`
|
||||
TLSAutoRefresh bool `long:"tlsautorefresh" description:"Re-generate TLS certificate and key if the IPs or domains are changed"`
|
||||
TLSDisableAutofill bool `long:"tlsdisableautofill" description:"Do not include the interface IPs or the system hostname in TLS certificate, use first --tlsextradomain as Common Name instead, if set"`
|
||||
TLSCertDuration time.Duration `long:"tlscertduration" description:"The duration for which the auto-generated TLS certificate will be valid for"`
|
||||
|
||||
NoMacaroons bool `long:"no-macaroons" description:"Disable macaroon authentication, can only be used if server is not listening on a public interface."`
|
||||
AdminMacPath string `long:"adminmacaroonpath" description:"Path to write the admin macaroon for lnd's RPC and REST services if it doesn't exist"`
|
||||
@@ -364,6 +370,7 @@ func DefaultConfig() Config {
|
||||
DebugLevel: defaultLogLevel,
|
||||
TLSCertPath: defaultTLSCertPath,
|
||||
TLSKeyPath: defaultTLSKeyPath,
|
||||
TLSCertDuration: defaultTLSCertDuration,
|
||||
LetsEncryptDir: defaultLetsEncryptDir,
|
||||
LetsEncryptListen: defaultLetsEncryptListen,
|
||||
LogDir: defaultLogDir,
|
||||
|
||||
Reference in new issue
Block a user