Documentation ¶
Overview ¶
Package sgx provides Intel SGX specific functionality.
Index ¶
Constants ¶
const ( SGXModeEnvKey = "SGX_MODE" SGXModeHwType = "HW" SGXModeSimType = "SIM" SGXCredentialsPathKey = "SGX_CREDENTIALS_PATH" )
Variables ¶
This section is empty.
Functions ¶
func ReadSPIDType ¶
ReadSPIDType reads the SPID type from a credentials path and returns it as string.
Types ¶
type AttestationParams ¶
type AttestationParams struct { AttestationType string `json:"attestation_type"` HexSpid string `json:"hex_spid"` SigRL string `json:"sig_rl"` }
AttestationParams holds additional attestation information that is required to perform LifecycleInitEnclave.
func CreateAttestationParamsFromCredentialsPath ¶
func CreateAttestationParamsFromCredentialsPath(sgxCredentialsPath string) (*AttestationParams, error)
CreateAttestationParamsFromCredentialsPath reads attestation information from a given path and returns an SGXAttestationParams object.
func CreateAttestationParamsFromEnvironment ¶
func CreateAttestationParamsFromEnvironment() (*AttestationParams, error)
CreateAttestationParamsFromEnvironment reads attestation information from environment variables and returns an SGXAttestationParams object. This methods requires `SGX_MODE` and `SGX_CREDENTIALS_PATH` to be set.
func (*AttestationParams) ToBase64EncodedJSON ¶
func (p *AttestationParams) ToBase64EncodedJSON() ([]byte, error)
ToBase64EncodedJSON returns the SGXAttestationParams object as serialized JSON with Base64 encoding.
func (*AttestationParams) Validate ¶
func (p *AttestationParams) Validate() error
Validate checks that the attestation information are correct.