cmd

package
v0.0.0-...-4a25916 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

* Copyright (c) 2022-2024 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause

Index

Constants

View Source
const (
	CloudProviderAzure = "azure"
)

Variables

View Source
var BuildDate = ""
View Source
var GitHash = ""
View Source
var Version = ""

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ValidateFilePath

func ValidateFilePath(path string) (string, error)

Types

type Config

type Config struct {
	CloudProvider        string     `json:"cloud_provider"`
	TrustAuthorityUrl    string     `json:"trustauthority_url"`
	TrustAuthorityApiUrl string     `json:"trustauthority_api_url"`
	TrustAuthorityApiKey string     `json:"trustauthority_api_key"`
	Tpm                  *TpmConfig `json:"tpm,omitempty"`
}

type ConfigFactory

type ConfigFactory interface {
	LoadConfig(configFile string) (*Config, error)
}

func NewConfigFactory

func NewConfigFactory() ConfigFactory

type HexInt

type HexInt int

func (HexInt) MarshalJSON

func (hi HexInt) MarshalJSON() ([]byte, error)

func (*HexInt) UnmarshalJSON

func (hi *HexInt) UnmarshalJSON(data []byte) error

type TdxAdapterFactory

type TdxAdapterFactory interface {
	New(cloudProvider string, evLogParser tdx.EventLogParser) (connector.CompositeEvidenceAdapter, error)
}

TdxAdapterFactory is an interface for creating TDX adapters.

func NewTdxAdapterFactory

func NewTdxAdapterFactory(tpmFactory tpm.TpmFactory) TdxAdapterFactory

NewTdxAdapterFactory creates a new, default TDX adapter factory.

type TpmConfig

type TpmConfig struct {
	// AkHandle is the handle of the TPM key that will be used to sign TPM quotes
	AkHandle HexInt `json:"ak_handle"`
	// EkHandle is needed during AK provisioning to create the AK
	EkHandle HexInt `json:"ek_handle"`
	// OwnerAuth is the owner password of the TPM (defaults to "")
	OwnerAuth string `json:"owner_auth"`
	// PcrSelections is the list of PCR banks and indices that are included in TPM quotes
	PcrSelections string `json:"pcr_selections"`
	// AkCertificateUri is the URI of the AK certificate.  Currently, "file://{full path}" and
	// "nvram://{index in hex}" are supported.
	AkCertificateUri string `json:"ak_certificate"`
}

Jump to

Keyboard shortcuts

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