forked from TrueCloudLab/lego
fix: bugs. (#670)
This commit is contained in:
parent
8a5cdcb4ef
commit
01c63ec08d
5 changed files with 5 additions and 4 deletions
|
@ -61,7 +61,7 @@ type DNSProvider struct {
|
||||||
// The REST endpoint will be appended. In addition, the Configuration name
|
// The REST endpoint will be appended. In addition, the Configuration name
|
||||||
// and external DNS View Name must be passed in BLUECAT_CONFIG_NAME and BLUECAT_DNS_VIEW
|
// and external DNS View Name must be passed in BLUECAT_CONFIG_NAME and BLUECAT_DNS_VIEW
|
||||||
func NewDNSProvider() (*DNSProvider, error) {
|
func NewDNSProvider() (*DNSProvider, error) {
|
||||||
values, err := env.Get("BLUECAT_SERVER_URL", "BLUECAT_USER_NAME", "BLUECAT_CONFIG_NAME", "BLUECAT_CONFIG_NAME", "BLUECAT_DNS_VIEW")
|
values, err := env.Get("BLUECAT_SERVER_URL", "BLUECAT_USER_NAME", "BLUECAT_PASSWORD", "BLUECAT_CONFIG_NAME", "BLUECAT_DNS_VIEW")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("bluecat: %v", err)
|
return nil, fmt.Errorf("bluecat: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
||||||
|
|
||||||
client.HTTPClient = config.HTTPClient
|
client.HTTPClient = config.HTTPClient
|
||||||
|
|
||||||
return &DNSProvider{client: client}, nil
|
return &DNSProvider{client: client, config: config}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Present creates a TXT record to fulfill the dns-01 challenge.
|
// Present creates a TXT record to fulfill the dns-01 challenge.
|
||||||
|
|
|
@ -81,7 +81,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
||||||
client := dnspod.NewClient(params)
|
client := dnspod.NewClient(params)
|
||||||
client.HttpClient = config.HTTPClient
|
client.HttpClient = config.HTTPClient
|
||||||
|
|
||||||
return &DNSProvider{client: client}, nil
|
return &DNSProvider{client: client, config: config}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Present creates a TXT record to fulfill the dns-01 challenge.
|
// Present creates a TXT record to fulfill the dns-01 challenge.
|
||||||
|
|
|
@ -94,6 +94,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return &DNSProvider{
|
return &DNSProvider{
|
||||||
|
config: config,
|
||||||
activeRecords: make(map[string]int),
|
activeRecords: make(map[string]int),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
||||||
client := api.NewClient(config.Token, config.Secret, "tk1a")
|
client := api.NewClient(config.Token, config.Secret, "tk1a")
|
||||||
client.UserAgent = acme.UserAgent
|
client.UserAgent = acme.UserAgent
|
||||||
|
|
||||||
return &DNSProvider{client: client}, nil
|
return &DNSProvider{client: client, config: config}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Present creates a TXT record to fulfill the dns-01 challenge.
|
// Present creates a TXT record to fulfill the dns-01 challenge.
|
||||||
|
|
Loading…
Reference in a new issue