Skip to content

Commit

Permalink
fix: improve log message
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb authored Jun 12, 2024
1 parent 609f7fd commit 120947f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sztp-agent/pkg/secureagent/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ func (a *Agent) downloadAndValidateImage() error {
return err
}
sum := fmt.Sprintf("%x", h.Sum(nil))
log.Println(sum)
log.Println(strings.ReplaceAll(a.BootstrapServerOnboardingInfo.IetfSztpConveyedInfoOnboardingInformation.BootImage.ImageVerification[i].HashValue, ":", ""))
original := strings.ReplaceAll(a.BootstrapServerOnboardingInfo.IetfSztpConveyedInfoOnboardingInformation.BootImage.ImageVerification[i].HashValue, ":", "")
log.Println("calculated: " + sum)
log.Println("expected : " + original)
if sum != original {
return errors.New("Checksum mismatch")
}
Expand Down

0 comments on commit 120947f

Please sign in to comment.