kms: KES client should return non-nil error when GenerateKey fails (#12290)

This commit fixes a bug in the KMS KES client integration.
The client should return a non-nil error when the key generation
fails.

Signed-off-by: Andreas Auernhammer <aead@mail.de>
This commit is contained in:
Andreas Auernhammer 2021-05-13 18:11:10 +02:00 committed by GitHub
parent 5c0a7189c7
commit b989e5a514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ func (c *kesClient) GenerateKey(keyID string, ctx Context) (DEK, error) {
}
dek, err := c.client.GenerateKey(context.Background(), keyID, ctxBytes)
if err != nil {
return DEK{}, nil
return DEK{}, err
}
return DEK{
KeyID: keyID,