From 29e4c17b077f46776410c8e88477c8f090ab0e2b Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Thu, 7 Feb 2019 10:43:54 -0800 Subject: [PATCH] connect/ca: fix a potential panic in the Consul provider --- agent/connect/ca/provider_consul.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/agent/connect/ca/provider_consul.go b/agent/connect/ca/provider_consul.go index d82eb53bc6..a61686ca6b 100644 --- a/agent/connect/ca/provider_consul.go +++ b/agent/connect/ca/provider_consul.go @@ -323,8 +323,7 @@ func (c *ConsulProvider) Sign(csr *x509.CertificateRequest) (string, error) { defer c.Unlock() // Get the provider state - state := c.Delegate.State() - idx, providerState, err := state.CAProviderState(c.id) + idx, providerState, err := c.getState() if err != nil { return "", err } @@ -509,8 +508,7 @@ func (c *ConsulProvider) CrossSignCA(cert *x509.Certificate) (string, error) { defer c.Unlock() // Get the provider state - state := c.Delegate.State() - idx, providerState, err := state.CAProviderState(c.id) + idx, providerState, err := c.getState() if err != nil { return "", err }