Documentation ¶
Overview ¶
Package quote provides the quoting functionialty for remote attestation on both Coordinator and Marble site.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailIssuer ¶
type FailIssuer struct{}
FailIssuer always fails.
func NewFailIssuer ¶
func NewFailIssuer() *FailIssuer
NewFailIssuer returns a new FailIssuer object.
type FailValidator ¶
type FailValidator struct{}
FailValidator always fails.
func NewFailValidator ¶
func NewFailValidator() *FailValidator
NewFailValidator returns a new FailValidator object.
func (*FailValidator) Validate ¶
func (m *FailValidator) Validate(_ []byte, _ []byte, _ PackageProperties, _ InfrastructureProperties) error
Validate implements the Validator interface for FailValidator.
type InfrastructureProperties ¶
type InfrastructureProperties struct { // CPUSVN is the processor model and firmware security version number. // NOTE: the Intel manual states that CPUSVN "cannot be compared mathematically" CPUSVN []byte // QESVN is the quoting Enclave security version number. QESVN *uint16 // PCESVN is the provisioning Certification Enclave security version number. PCESVN *uint16 // RootCA is the Certificate of the root Certificate Authority (not optional). RootCA []byte }
InfrastructureProperties contains the infrastructure-specific properties of a SGX DCAP quote.
func (InfrastructureProperties) Equal ¶ added in v1.0.0
func (p InfrastructureProperties) Equal(other InfrastructureProperties) bool
Equal returns true if both infrastructures are equal.
func (InfrastructureProperties) IsCompliant ¶
func (p InfrastructureProperties) IsCompliant(given InfrastructureProperties) bool
IsCompliant checks if the given infrastructure properties comply with the requirements.
type Issuer ¶
type Issuer interface { // Issue issues a quote for remote attestation for a given message Issue(cert []byte) (quote []byte, err error) }
Issuer issues quotes.
type MockIssuer ¶
type MockIssuer struct{}
MockIssuer is a mockup quote issuer.
func NewMockIssuer ¶
func NewMockIssuer() *MockIssuer
NewMockIssuer returns a new MockIssuer object.
type MockValidator ¶
type MockValidator struct {
// contains filtered or unexported fields
}
MockValidator is a mockup quote validator.
func NewMockValidator ¶
func NewMockValidator() *MockValidator
NewMockValidator returns a new MockValidator object.
func (*MockValidator) AddValidQuote ¶
func (m *MockValidator) AddValidQuote(quote []byte, message []byte, pp PackageProperties, ip InfrastructureProperties)
AddValidQuote adds a valid quote.
func (*MockValidator) Validate ¶
func (m *MockValidator) Validate(quote []byte, message []byte, pp PackageProperties, ip InfrastructureProperties) error
Validate implements the Validator interface.
type PackageProperties ¶
type PackageProperties struct { // Debug Flag of the Attributes. Debug bool // UniqueID is a hash of the enclave (MRENCLAVE). UniqueID string // SignerID is a hash of the enclave signer's public key (MRSIGNER). SignerID string // ProductID of the package (ISVPRODID). ProductID *uint64 // SecurityVersion of the package (ISVSVN). SecurityVersion *uint // AcceptedTCBStatuses is a list of TCB levels an enclave is allowed to have. AcceptedTCBStatuses []string }
PackageProperties contains the enclave package-specific properties of an OpenEnclave quote Either UniqueID or SignerID, ProductID, and SecurityVersion should be specified.
func (PackageProperties) Equal ¶ added in v1.0.0
func (p PackageProperties) Equal(other PackageProperties) bool
Equal returns true if both packages are equal.
func (PackageProperties) IsCompliant ¶
func (p PackageProperties) IsCompliant(given PackageProperties) bool
IsCompliant checks if the given package properties comply with the requirements.
func (PackageProperties) String ¶ added in v1.2.0
func (p PackageProperties) String() string
String returns a string representation of the package properties.
type Validator ¶
type Validator interface { // Validate validates a quote for a given message and properties Validate(quote []byte, cert []byte, pp PackageProperties, ip InfrastructureProperties) error }
Validator validates quotes.