mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
connect/ca: fix a potential panic in the Consul provider
This commit is contained in:
parent
fb0fc6e459
commit
29e4c17b07
@ -323,8 +323,7 @@ func (c *ConsulProvider) Sign(csr *x509.CertificateRequest) (string, error) {
|
|||||||
defer c.Unlock()
|
defer c.Unlock()
|
||||||
|
|
||||||
// Get the provider state
|
// Get the provider state
|
||||||
state := c.Delegate.State()
|
idx, providerState, err := c.getState()
|
||||||
idx, providerState, err := state.CAProviderState(c.id)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@ -509,8 +508,7 @@ func (c *ConsulProvider) CrossSignCA(cert *x509.Certificate) (string, error) {
|
|||||||
defer c.Unlock()
|
defer c.Unlock()
|
||||||
|
|
||||||
// Get the provider state
|
// Get the provider state
|
||||||
state := c.Delegate.State()
|
idx, providerState, err := c.getState()
|
||||||
idx, providerState, err := state.CAProviderState(c.id)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user