We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6fa860 commit 4ddc069Copy full SHA for 4ddc069
lib/tpm/tpm.go
@@ -125,6 +125,11 @@ func QueryWithTPM(
125
if err != nil {
126
return nil, trace.Wrap(err, "querying EKs")
127
}
128
+ // Be a good citizen and check the slice bounds. This is not expected to
129
+ // happen.
130
+ if len(eks) == 0 {
131
+ return nil, trace.BadParameter("no endorsement keys found in tpm")
132
+ }
133
134
// The first EK returned by `go-attestation` will be an RSA based EK key or
135
// EK cert. On Windows, ECC certs may also be returned following this. At
0 commit comments