Skip to content

Commit

Permalink
AWS GetPublicKey error handling fix (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-asphyx authored Jul 17, 2023
1 parent 11d91a4 commit 9eef74d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/vault/aws/awskms.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ func (i *awsKMSIterator) Next() (key vault.StoredKey, err error) {

if err == nil {
return key, nil
} else if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() != "AccessDeniedException" || err != crypt.ErrUnsupportedKeyType {
} else if awsErr, ok := err.(awserr.Error); ok {
if awsErr.Code() != "AccessDeniedException" {
return nil, err
}
} else if err != crypt.ErrUnsupportedKeyType {
return nil, err
}
}
Expand Down

0 comments on commit 9eef74d

Please sign in to comment.