Documentation
¶
Index ¶
- Variables
- func LogAttestErrors(l *zerolog.Logger, err error)
- func LogEnrollErrors(l *zerolog.Logger, err error)
- func LogInitErrors(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)
- type AttestationClientError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEncodeJson = AttestationClientError("json encoding") ErrReadPcr = AttestationClientError("read pcr") ErrRootKey = AttestationClientError("create or load root key") ErrAik = AttestationClientError("create or load aik") ErrQuote = AttestationClientError("tpm quote") ErrUnknown = AttestationClientError("internal error") ErrEndorsementKey = AttestationClientError("create or load EK") ErrEnroll = AttestationClientError("internal enrollment error") ErrApiResponse = AttestationClientError("unexpected api response") ErrOpenTrustAnchor = AttestationClientError("open trust anchor") ErrStateDir = AttestationClientError("create or write state dir") ErrStateLoad = AttestationClientError("other state load error") ErrStateStore = AttestationClientError("other state store error") ErrUpdateConfig = AttestationClientError("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 LogEnrollErrors ¶ added in v3.12.0
LogEnrollErrors 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
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
type AttestationClientError ¶ added in v3.12.0
type AttestationClientError string
func (AttestationClientError) Error ¶ added in v3.12.0
func (e AttestationClientError) Error() string
func (AttestationClientError) Is ¶ added in v3.12.0
func (e AttestationClientError) Is(target error) bool
Click to show internal directories.
Click to hide internal directories.