client

package
v0.0.0-...-7306f8b Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) AddAgentToVerifier

func (c *Client) AddAgentToVerifier(ctx context.Context, ragent *registrar.Agent, vc verifier.Client, payload []byte, agentVerify bool) (retErr error)

func (*Client) RandomVerifier

func (c *Client) RandomVerifier() string

func (*Client) Registrar

func (c *Client) Registrar() registrar.Client

func (*Client) Verifier

func (c *Client) Verifier(name string) (verifier.Client, bool)

func (*Client) VerifierNames

func (c *Client) VerifierNames() []string

func (*Client) VerifyEK

func (c *Client) VerifyEK(ekCert *x509.Certificate, rootPool, intermediatePool *x509.CertPool) (*EKVerification, error)

VerifyEK will verify if the `ekCert` verifies against the intermediate and root pools. It will return with an error if this fails. NOTE: This function will *always* return an EKVerification which could contain additional information that was extracted from the EK certificate regardless if verification passes or not.

type EKVerification

type EKVerification struct {
	Verified                   bool
	AuthorityChains            [][]string
	SubjectAlternativeNames    *ekcert.EKSAN
	SubjectDirectoryAttributes *ekcert.EKSDA
}

type Keylime

type Keylime interface {
	Registrar() registrar.Client
	Verifier(name string) (verifier.Client, bool)
	VerifierNames() []string
	RandomVerifier() string
	AddAgentToVerifier(ctx context.Context, agent *registrar.Agent, vc verifier.Client, payload []byte, agentVerify bool) error
	VerifyEK(ekCert *x509.Certificate, rootPool, intermediatePool *x509.CertPool) (*EKVerification, error)
}

func New

func New(ctx context.Context, logger logr.Logger, httpClient *http.Client, registrarURL string, verifierURLs []string, tpmCertStore string) (Keylime, error)

New returns a new Keylime client which has (sort of) equivalent functionality to the Keylime tenant CLI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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