Skip to content

Commit

Permalink
attestation: add Azure TDX variant
Browse files Browse the repository at this point in the history
Only a stub for now.
  • Loading branch information
malt3 committed Jan 16, 2024
1 parent 5063b81 commit 336ba6b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions internal/attestation/variant/variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const (
awsNitroTPM = "aws-nitro-tpm"
awsSEVSNP = "aws-sev-snp"
gcpSEVES = "gcp-sev-es"
azureTDX = "azure-tdx"
azureSEVSNP = "azure-sev-snp"
azureTrustedLaunch = "azure-trustedlaunch"
qemuVTPM = "qemu-vtpm"
Expand Down Expand Up @@ -206,6 +207,24 @@ func (GCPSEVES) Equal(other Getter) bool {
return other.OID().Equal(GCPSEVES{}.OID())
}

// AzureTDX holds the OID for Azure TDX CVMs.
type AzureTDX struct{}

// OID returns the struct's object identifier.
func (AzureTDX) OID() asn1.ObjectIdentifier {
return asn1.ObjectIdentifier{1, 3, 9900, 4, 3}
}

// String returns the string representation of the OID.
func (AzureTDX) String() string {
return azureTDX
}

// Equal returns true if the other variant is also AzureTDX.
func (AzureTDX) Equal(other Getter) bool {
return other.OID().Equal(AzureTDX{}.OID())
}

// AzureSEVSNP holds the OID for Azure SNP CVMs.
type AzureSEVSNP struct{}

Expand Down

0 comments on commit 336ba6b

Please sign in to comment.