-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First draft of Unprocessed Evidence!
Signed-off-by: Yogesh Deshpande <yogesh.deshpande@arm.com>
- Loading branch information
1 parent
6dc8e80
commit 8e88d74
Showing
3 changed files
with
51 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2023 Contributors to the Veraison project. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package ear | ||
|
||
import "fmt" | ||
|
||
// UnprocessedEvidence contains the details of Evidence | ||
// which te Verifier could not Appraise | ||
type UnprocessedEvidence struct { | ||
// Build uniquely identifies the software build running the verifier. | ||
MediaType *string `json:"media_type"` | ||
// Developer uniquely identifies the organizational unit responsible | ||
// for this build. | ||
Data *[]byte `json:"data"` | ||
} | ||
|
||
func (o *UnprocessedEvidence) SetMediaType(mt *string) error { | ||
if *mt == "" { | ||
return fmt.Errorf("nil mt string") | ||
} | ||
o.MediaType = mt | ||
return nil | ||
} | ||
|
||
func (o *UnprocessedEvidence) SetEvidence(data *[]byte) error { | ||
if len(*data) == 0 { | ||
return fmt.Errorf("nil data supplied") | ||
} | ||
o.Data = data | ||
return nil | ||
} |