11//go:build windows
22// +build windows
33
4- package pspdriver
4+ package securitypolicy
55
66import (
77 "bytes"
@@ -217,7 +217,7 @@ func GetPspDriverError() error {
217217}
218218
219219// IsSNPMode() returns true if it's in SNP mode.
220- func IsSNPMode (ctx context. Context ) (bool , error ) {
220+ func IsSNPMode () (bool , error ) {
221221
222222 if pspDriverError != nil {
223223 return false , pspDriverError
@@ -249,7 +249,7 @@ func IsSNPMode(ctx context.Context) (bool, error) {
249249}
250250
251251// FetchRawSNPReport returns attestation report bytes.
252- func FetchRawSNPReport (ctx context. Context , reportData []byte ) ([]byte , error ) {
252+ func FetchRawSNPReport (reportData []byte ) ([]byte , error ) {
253253 if pspDriverError != nil {
254254 return nil , pspDriverError
255255 }
@@ -291,8 +291,8 @@ func FetchRawSNPReport(ctx context.Context, reportData []byte) ([]byte, error) {
291291}
292292
293293// FetchParsedSNPReport parses raw attestation response into proper structs.
294- func FetchParsedSNPReport (ctx context. Context , reportData []byte ) (Report , error ) {
295- rawBytes , err := FetchRawSNPReport (ctx , reportData )
294+ func FetchParsedSNPReport (reportData []byte ) (Report , error ) {
295+ rawBytes , err := FetchRawSNPReport (reportData )
296296 if err != nil {
297297 return Report {}, err
298298 }
@@ -308,16 +308,16 @@ func FetchParsedSNPReport(ctx context.Context, reportData []byte) (Report, error
308308// TODO: Based on internal\guest\runtime\hcsv2\hostdata.go and it's duplicated.
309309// ValidateHostData fetches SNP report (if applicable) and validates `hostData` against
310310// HostData set at UVM launch.
311- func ValidateHostData ( ctx context. Context , hostData []byte ) error {
311+ func ValidateHostDataPSP ( hostData []byte ) error {
312312 // If the UVM is not SNP, then don't try to fetch an SNP report.
313- isSnpMode , err := IsSNPMode (ctx )
313+ isSnpMode , err := IsSNPMode ()
314314 if err != nil {
315315 return err
316316 }
317317 if ! isSnpMode {
318318 return nil
319319 }
320- report , err := FetchParsedSNPReport (ctx , nil )
320+ report , err := FetchParsedSNPReport (nil )
321321 if err != nil {
322322 return err
323323 }
0 commit comments