mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
24 lines
596 B
Go
24 lines
596 B
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
// Package tdx reads measurements from an Intel TDX guest.
|
|
package tdx
|
|
|
|
import (
|
|
"github.com/edgelesssys/constellation/v2/internal/attestation/tdx"
|
|
"github.com/edgelesssys/constellation/v2/measurement-reader/internal/sorted"
|
|
)
|
|
|
|
// Measurements returns a sorted list of TDX runtime measurements.
|
|
func Measurements() ([]sorted.Measurement, error) {
|
|
m, err := tdx.GetSelectedMeasurements(tdx.Open, []int{0, 1, 2, 3, 4})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return sorted.SortMeasurements(m, sorted.TDX), nil
|
|
}
|