summaryrefslogtreecommitdiff
path: root/aws
diff options
context:
space:
mode:
authorJanusz Bialy <janusz.bialy@qlik.com>2019-02-24 17:07:30 -0500
committerJanusz Bialy <janusz.bialy@qlik.com>2019-03-23 15:04:21 -0400
commitb235bf53460a8d2d622e951928fd1bf5d3d29d2c (patch)
treea1b4217181dc283deb10f10e37d3dde2a443866e /aws
parentfbbabe268acce795003e99599d89cf4063b98f0b (diff)
handle base64 encode errors
Diffstat (limited to 'aws')
-rw-r--r--aws/kms.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/aws/kms.go b/aws/kms.go
index d33d23a7..2961351a 100644
--- a/aws/kms.go
+++ b/aws/kms.go
@@ -30,7 +30,10 @@ func (k *KMS) Encrypt(keyID, plaintext string) (string, error) {
if err != nil {
return "", err
}
- ciphertext, _ := b64.Encode(output.CiphertextBlob)
+ ciphertext, err := b64.Encode(output.CiphertextBlob)
+ if err != nil {
+ return "", err
+ }
return ciphertext, nil
}