config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Overview

Package config provides parsing for the armored-witness-boot configuration file format.

Index

Constants

View Source
const (
	Offset    = 10485760
	MaxLength = 40960
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Offset is the MMC/SD card offset to an ELF unikernel image (e.g. TamaGo).
	Offset int64
	// Size is the unikernel length.
	Size int64
	// Signatures are the unikernel signify/minisign signatures.
	Signatures [][]byte
	// Bundle contains firmware transparency artefacts relating to the firmware this config
	// references.
	Bundle ProofBundle
}

Config represents the armored-witness-boot configuration.

func (*Config) Decode

func (c *Config) Decode(buf []byte) (err error)

Decode deserializes the configuration.

func (*Config) Encode

func (c *Config) Encode() ([]byte, error)

Encode serializes the configuration.

type ProofBundle

type ProofBundle struct {
	// Checkpoint is a note-formatted checkpoint from a log which contains Manifest, below.
	Checkpoint []byte
	// Manifest contains metadata about a firmware release.
	Manifest []byte
	// LogIndex is the position within the log where Manifest was included.
	LogIndex uint64
	// InclusionProof is a proof for Manifest@Index being committed to by Checkpoint.
	InclusionProof [][]byte
}

ProofBundle represents a firmware transparency proof bundle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL