diff --git a/agent/connect/ca/provider_consul.go b/agent/connect/ca/provider_consul.go index d8db65078f..bac728cb86 100644 --- a/agent/connect/ca/provider_consul.go +++ b/agent/connect/ca/provider_consul.go @@ -617,19 +617,13 @@ func (c *ConsulProvider) incrementAndGetNextSerialNumber() (uint64, error) { // generateCA makes a new root CA using the current private key func (c *ConsulProvider) generateCA(privateKey string, sn uint64, rootCertTTL time.Duration) (string, error) { - stateStore := c.Delegate.State() - _, config, err := stateStore.CAConfig(nil) - if err != nil { - return "", err - } - privKey, err := connect.ParseSigner(privateKey) if err != nil { return "", fmt.Errorf("error parsing private key %q: %s", privateKey, err) } // The URI (SPIFFE compatible) for the cert - id := connect.SpiffeIDSigningForCluster(config.ClusterID) + id := connect.SpiffeIDSigningForCluster(c.clusterID) keyId, err := connect.KeyId(privKey.Public()) if err != nil { return "", err