mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
NOISSUE - Azure TDX Support (#596)
* initial Azure TDX support * add tests * update documentation --------- Co-authored-by: Ubuntu <danko@cocos.nbzvzgavv4yeximq0jorvcggfd.dx.internal.cloudapp.net>
This commit is contained in:
committed by
GitHub
parent
27db9b29eb
commit
02aa7d7d85
@@ -33,6 +33,12 @@ func (s *service) FetchRawEvidence(ctx context.Context, req *attestationpb.Attes
|
||||
var nonce [32]byte
|
||||
copy(nonce[:], req.Nonce)
|
||||
binaryReport, err = s.provider.Attestation(reportData[:], nonce[:])
|
||||
case attestationpb.PlatformType_PLATFORM_TYPE_AZURE:
|
||||
var reportData [64]byte
|
||||
copy(reportData[:], req.ReportData)
|
||||
var nonce [32]byte
|
||||
copy(nonce[:], req.Nonce)
|
||||
binaryReport, err = s.provider.Attestation(reportData[:], nonce[:])
|
||||
case attestationpb.PlatformType_PLATFORM_TYPE_UNSPECIFIED:
|
||||
// Generate sample attestation for testing in non-TEE environments
|
||||
// This uses the underlying provider (EmptyProvider or CC Attestation Agent)
|
||||
|
||||
@@ -318,6 +318,13 @@ func (s *service) FetchAttestation(ctx context.Context, req *attestationpb.Attes
|
||||
copy(nonce[:], req.Nonce)
|
||||
binaryReport, err = s.provider.Attestation(reportData[:], nonce[:])
|
||||
platformType = attestation.SNPvTPM
|
||||
case attestationpb.PlatformType_PLATFORM_TYPE_AZURE:
|
||||
var reportData [64]byte
|
||||
copy(reportData[:], req.ReportData)
|
||||
var nonce [32]byte
|
||||
copy(nonce[:], req.Nonce)
|
||||
binaryReport, err = s.provider.Attestation(reportData[:], nonce[:])
|
||||
platformType = attestation.Azure
|
||||
case attestationpb.PlatformType_PLATFORM_TYPE_UNSPECIFIED:
|
||||
// Generate sample attestation for testing in non-TEE environments
|
||||
s.logger.Warn("generating sample attestation for PLATFORM_TYPE_UNSPECIFIED - this should only be used for testing")
|
||||
|
||||
Reference in New Issue
Block a user