Documentation ¶
Index ¶
- Variables
- func LogAttestErrors(l *zerolog.Logger, err error)
- func LogInitErrors(l *zerolog.Logger, err error)
- func LogUpdateConfigErrors(l *zerolog.Logger, err error)
- type AttestationClient
- func (ac *AttestationClient) Attest(ctx context.Context, dryRun bool) (*api.Evidence, error)
- func (ac *AttestationClient) Enroll(ctx context.Context, token string, dummyTPM bool, tpmPath string) error
- func (ac *AttestationClient) Init(stateDir string, logger *zerolog.Logger) error
- func (ac *AttestationClient) OverrideServerUrl(server *url.URL)
- func (ac *AttestationClient) UpdateConfig() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEncodeJson = errors.New("json encoding") ErrReadPcr = errors.New("read pcr") ErrRootKey = errors.New("create or load root key") ErrAik = errors.New("create or load aik") ErrQuote = errors.New("tpm quote") ErrUnknown = errors.New("internal error") ErrEndorsementKey = errors.New("create or load EK") ErrEnroll = errors.New("internal enrollment error") ErrApiResponse = errors.New("unexpected api response") ErrOpenTrustAnchor = errors.New("open trust anchor") ErrStateDir = errors.New("create or write state dir") ErrStateLoad = errors.New("other state load error") ErrStateStore = errors.New("other state store error") ErrUpdateConfig = errors.New("fetch config from server") )
Functions ¶
func LogAttestErrors ¶ added in v3.11.0
LogAttestErrors is a helper function to translate errors to text and log them directly
func LogInitErrors ¶ added in v3.11.0
LogInitErrors is a helper function to translate errors to text and log them directly
func LogUpdateConfigErrors ¶ added in v3.11.0
LogUpdateConfigErrors is a helper function to translate errors to text and log them directly
Types ¶
type AttestationClient ¶ added in v3.11.0
type AttestationClient struct { // program info ReleaseId *string // on-disk state State *state.State StatePath string // API client Client api.Client // TPM EndorsementAuth string // Logging Log *zerolog.Logger }
func NewCore ¶ added in v3.11.0
func NewCore() *AttestationClient
func (*AttestationClient) Init ¶ added in v3.11.0
func (ac *AttestationClient) Init(stateDir string, logger *zerolog.Logger) error
func (*AttestationClient) OverrideServerUrl ¶ added in v3.11.1
func (ac *AttestationClient) OverrideServerUrl(server *url.URL)
OverrideServerUrl sets URL in state re-inits the API client the changed URL becomes permanent when the state is stored, which happens during enroll and possibly when updating config
func (*AttestationClient) UpdateConfig ¶ added in v3.11.0
func (ac *AttestationClient) UpdateConfig() error
try to get a new configuration from server
Click to show internal directories.
Click to hide internal directories.