2022-03-22 11:03:15 -04:00
|
|
|
package oid
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/asn1"
|
|
|
|
)
|
|
|
|
|
2022-05-24 10:33:44 -04:00
|
|
|
// ATLSNonce is the ASN.1 object identifier used to transmit a nonce from server to client.
|
|
|
|
var ATLSNonce = asn1.ObjectIdentifier{1, 3, 9900, 0, 1}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// Getter returns an ASN.1 Object Identifier.
|
2022-03-22 11:03:15 -04:00
|
|
|
type Getter interface {
|
|
|
|
OID() asn1.ObjectIdentifier
|
|
|
|
}
|
|
|
|
|
|
|
|
// Here we define OIDs for different CSPs. Currently this is used in attested TLS to distinguish the attestation documents.
|
|
|
|
// OIDs beginning with 1.3.9900 are reserved and can be used without registration.
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// Dummy OID for testing.
|
2022-03-22 11:03:15 -04:00
|
|
|
type Dummy struct{}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// OID returns the struct's object identifier.
|
2022-03-22 11:03:15 -04:00
|
|
|
func (Dummy) OID() asn1.ObjectIdentifier {
|
|
|
|
return asn1.ObjectIdentifier{1, 3, 9900, 1}
|
|
|
|
}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// AWS holds the AWS OID.
|
2022-03-22 11:03:15 -04:00
|
|
|
type AWS struct{}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// OID returns the struct's object identifier.
|
2022-03-22 11:03:15 -04:00
|
|
|
func (AWS) OID() asn1.ObjectIdentifier {
|
|
|
|
return asn1.ObjectIdentifier{1, 3, 9900, 2}
|
|
|
|
}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// GCP holds the GCP OID.
|
2022-03-22 11:03:15 -04:00
|
|
|
type GCP struct{}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// OID returns the struct's object identifier.
|
2022-03-22 11:03:15 -04:00
|
|
|
func (GCP) OID() asn1.ObjectIdentifier {
|
|
|
|
return asn1.ObjectIdentifier{1, 3, 9900, 3}
|
|
|
|
}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// Azure holds the Azure OID.
|
2022-03-22 11:03:15 -04:00
|
|
|
type Azure struct{}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// OID returns the struct's object identifier.
|
2022-03-22 11:03:15 -04:00
|
|
|
func (Azure) OID() asn1.ObjectIdentifier {
|
|
|
|
return asn1.ObjectIdentifier{1, 3, 9900, 4}
|
|
|
|
}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// QEMU holds the QEMU OID.
|
2022-04-21 10:27:34 -04:00
|
|
|
type QEMU struct{}
|
|
|
|
|
2022-04-28 08:31:01 -04:00
|
|
|
// OID returns the struct's object identifier.
|
2022-04-21 10:27:34 -04:00
|
|
|
func (QEMU) OID() asn1.ObjectIdentifier {
|
|
|
|
return asn1.ObjectIdentifier{1, 3, 9900, 5}
|
|
|
|
}
|