Skip to content

Commit

Permalink
Only include Attestation data if attestation storage enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Lily Sturmann <lsturman@redhat.com>
  • Loading branch information
lkatalin committed Nov 15, 2021
1 parent e003278 commit b06f4c4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions cmd/rekor-cli/app/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,16 @@ func parseEntry(uuid string, e models.LogEntryAnon) (interface{}, error) {
}

obj := getCmdOutput{
Attestation: string(e.Attestation.Data),
AttestationType: e.Attestation.MediaType,
Body: eimpl,
UUID: uuid,
IntegratedTime: *e.IntegratedTime,
LogIndex: int(*e.LogIndex),
LogID: *e.LogID,
Body: eimpl,
UUID: uuid,
IntegratedTime: *e.IntegratedTime,
LogIndex: int(*e.LogIndex),
LogID: *e.LogID,
}

if viper.GetBool("enable_attestation_storage") {
obj.Attestation = string(e.Attestation.Data)
obj.AttestationType = e.Attestation.MediaType
}

return &obj, nil
Expand Down

0 comments on commit b06f4c4

Please sign in to comment.