Documentation ¶
Index ¶
- Constants
- func GetMetadataRawMessage(layout string, linkDir string, layoutKey string) (canonicaljson.RawMessage, error)
- func ValidateFromPath(p string) error
- func ValidateLayout(layout in_toto.Layout) error
- func VerifyInContainer(target *client.TargetWithRole, bundle []byte, verificationImage string, ...) error
- func VerifyOnOS(target *client.TargetWithRole, bundle []byte) error
- func WriteMetadataFiles(m *Metadata, dir string) error
- type Metadata
Constants ¶
View Source
const ( BundleFilename = "bundle.json" ReadOnlyMask = 0400 )
Variables ¶
This section is empty.
Functions ¶
func GetMetadataRawMessage ¶
func GetMetadataRawMessage(layout string, linkDir string, layoutKey string) (canonicaljson.RawMessage, error)
GetMetadataRawMessage takes In-Toto metadata and returns a canonical RawMessage that can be stored in the TUF targets custom field.
TODO: layout signing key should not be passed by the library. Layouts should be signed with the targets key used to sign the TUF collection.
func ValidateFromPath ¶
ValidateFromPath validates a layout given a path
func ValidateLayout ¶
ValidateLayout is a function used to ensure that a passed item of type Layout matches the necessary format.
func VerifyInContainer ¶
func VerifyOnOS ¶
func VerifyOnOS(target *client.TargetWithRole, bundle []byte) error
func WriteMetadataFiles ¶
WriteMetadataFiles writes the content of a metadata object into files in a directory
Types ¶
type Metadata ¶
type Metadata struct { // TODO: remove this once the TUF targets key is used to sign the root layout Key []byte `json:"key"` Layout []byte `json:"layout"` Links map[string][]byte `json:"links"` }
Metadata represents the In-Toto metadata stored in TUF. All fields are represented as []byte in order to be stored in the Custom field for TUF metadata.
Click to show internal directories.
Click to hide internal directories.