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 {
612612}
613613
614614func 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+
615625 info , err := abi .ParseSignerInfo (report .GetReport ().GetSignerInfo ())
616626 if err != nil {
617627 return nil , err
618628 }
629+
619630 switch info .SigningKey {
620631 case abi .VcekReportSigner :
621632 if len (report .GetCertificateChain ().VcekCert ) != 0 {
You can’t perform that action at this time.
0 commit comments