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 <[email protected]>
  • Loading branch information
alrs committed Sep 26, 2023
1 parent d24fe0c commit b13f741
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 b13f741

Please sign in to comment.