mirror of https://github.com/hashicorp/consul
connect/ca: return a better error message if the CA isn't fully initialized when signing
parent
ddc4a8d848
commit
a28ba4687d
|
@ -328,6 +328,9 @@ func (c *ConsulProvider) Sign(csr *x509.CertificateRequest) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if providerState.PrivateKey == "" {
|
||||
return "", ErrNotInitialized
|
||||
}
|
||||
|
||||
// Create the keyId for the cert from the signing private key.
|
||||
signer, err := connect.ParseSigner(providerState.PrivateKey)
|
||||
|
|
Loading…
Reference in New Issue