Skip to content

Commit

Permalink
decrypt: fix dropped error
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
  • Loading branch information
alrs authored and hiddeco committed Sep 30, 2023
1 parent 507a652 commit b6808f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decrypt/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func DataWithFormat(data []byte, format Format) (cleartext []byte, err error) {
key,
tree.Metadata.LastModified.Format(time.RFC3339),
)
if err != nil {
return nil, fmt.Errorf("Failed to decrypt original mac: %w", err)
}
if originalMac != mac {
return nil, fmt.Errorf("Failed to verify data integrity. expected mac %q, got %q", originalMac, mac)
}
Expand Down

0 comments on commit b6808f8

Please sign in to comment.