File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -612,10 +612,21 @@ func validateKeys(report *spb.Report, options *Options) error {
612
612
}
613
613
614
614
func validateKeyKind (report * spb.Attestation ) (* x509.Certificate , error ) {
615
+ if report == nil {
616
+ return nil , fmt .Errorf ("attestation cannot be nil" )
617
+ }
618
+ if report .GetReport () == nil {
619
+ return nil , fmt .Errorf ("attestation report cannot be nil" )
620
+ }
621
+ if report .GetCertificateChain () == nil {
622
+ return nil , fmt .Errorf ("attestation certificate chain cannot be nil" )
623
+ }
624
+
615
625
info , err := abi .ParseSignerInfo (report .GetReport ().GetSignerInfo ())
616
626
if err != nil {
617
627
return nil , err
618
628
}
629
+
619
630
switch info .SigningKey {
620
631
case abi .VcekReportSigner :
621
632
if len (report .GetCertificateChain ().VcekCert ) != 0 {
You can’t perform that action at this time.
0 commit comments