Skip to content

Commit 16e7fd4

Browse files
committed
Reverts unnecessary changes
1 parent cdc7776 commit 16e7fd4

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

internal/attestation/variant/variant.go

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,28 @@ type Variant interface {
101101
}
102102

103103
func FromOID(oid asn1.ObjectIdentifier) (Variant, error) {
104-
for _, v := range []Variant{Dummy{},AWSSEVSNP{}, AWSNitroTPM{}, GCPSEVES{}, GCPSEVSNP{}, AzureSEVSNP{}, AzureTrustedLaunch{}, AzureTDX{}, QEMUVTPM{}, QEMUTDX{}} {
105-
if v.OID().Equal(oid) {
106-
return v, nil
107-
}
104+
switch oid.String() {
105+
case Dummy{}.OID().String():
106+
return Dummy{}, nil
107+
case AWSSEVSNP{}.OID().String():
108+
return AWSSEVSNP{}, nil
109+
case AWSNitroTPM{}.OID().String():
110+
return AWSNitroTPM{}, nil
111+
case GCPSEVES{}.OID().String():
112+
return GCPSEVES{}, nil
113+
case GCPSEVSNP{}.OID().String():
114+
return GCPSEVSNP{}, nil
115+
case AzureSEVSNP{}.OID().String():
116+
return AzureSEVSNP{}, nil
117+
case AzureTrustedLaunch{}.OID().String():
118+
return AzureTrustedLaunch{}, nil
119+
case AzureTDX{}.OID().String():
120+
return AzureTDX{}, nil
121+
case QEMUVTPM{}.OID().String():
122+
return QEMUVTPM{}, nil
123+
case QEMUTDX{}.OID().String():
124+
return QEMUTDX{}, nil
108125
}
109-
110126
return nil, fmt.Errorf("unknown OID: %q", oid)
111127
}
112128

internal/versions/components/components.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ syntax = "proto3";
22

33
package components;
44

5-
option go_package = "github.com/edgelesssys/constellation/v2/internal/versions/components";
5+
option go_package = "cvm-reverse-proxy/internal/versions/components";
66

77
// Component is a Kubernetes component to install.
88
message Component {

0 commit comments

Comments
 (0)