Skip to content

Commit

Permalink
Fix missing error check
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej Rosano committed Oct 5, 2021
1 parent b512099 commit f1ca9b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cmd/armory-drive-install/ft.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ func verifyRelease(release *github.RepositoryRelease, a *releaseAssets) (err err

if len(checkpoints) > 0 {
checkpoints = append(checkpoints, *newCP)
err = client.CheckConsistency(ctx, rfc6962.DefaultHasher, logFetcher, checkpoints)

if err = client.CheckConsistency(ctx, rfc6962.DefaultHasher, logFetcher, checkpoints); err != nil {
return
}
}

return verifyProof(a)
Expand Down
4 changes: 2 additions & 2 deletions cmd/armory-drive-install/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func downloadRelease(version string) (a *releaseAssets, err error) {
log.Printf("\nDownloaded verified release assets")

if len(conf.frPublicKey) > 0 {
log.Printf("Using %s as manifest authentication key", conf.frPublicKey)
log.Printf("Using %s as manifest authentication key", conf.frPublicKey)
a.frPub, err = os.ReadFile(conf.frPublicKey)
} else {
a.frPub, err = downloadKey("manifest authentication key", keysPath+frKeyName, client)
Expand All @@ -144,7 +144,7 @@ func downloadRelease(version string) (a *releaseAssets, err error) {
}

if len(conf.logPublicKey) > 0 {
log.Printf("Using %s as log authentication key", conf.logPublicKey)
log.Printf("Using %s as log authentication key", conf.logPublicKey)
a.logPub, err = os.ReadFile(conf.logPublicKey)
} else {
a.logPub, err = downloadKey("transparency log authentication key", keysPath+logKeyName, client)
Expand Down

0 comments on commit f1ca9b6

Please sign in to comment.