@@ -46,12 +46,12 @@ func message(d Device, command uintptr, req *labi.SnpUserGuestRequest) error {
46
46
47
47
// GetRawReportAtVmpl requests for an attestation report at the given VMPL that incorporates the
48
48
// given user data.
49
- func GetRawReportAtVmpl (d Device , userData [64 ]byte , vmpl int ) ([]byte , error ) {
49
+ func GetRawReportAtVmpl (d Device , reportData [64 ]byte , vmpl int ) ([]byte , error ) {
50
50
var snpReportRsp labi.SnpReportRespABI
51
51
userGuestReq := labi.SnpUserGuestRequest {
52
52
ReqData : & labi.SnpReportReqABI {
53
- UserData : userData ,
54
- Vmpl : uint32 (vmpl ),
53
+ ReportData : reportData ,
54
+ Vmpl : uint32 (vmpl ),
55
55
},
56
56
RespData : & snpReportRsp ,
57
57
}
@@ -62,35 +62,35 @@ func GetRawReportAtVmpl(d Device, userData [64]byte, vmpl int) ([]byte, error) {
62
62
}
63
63
64
64
// GetRawReport requests for an attestation report at VMPL0 that incorporates the given user data.
65
- func GetRawReport (d Device , userData [64 ]byte ) ([]byte , error ) {
66
- return GetRawReportAtVmpl (d , userData , 0 )
65
+ func GetRawReport (d Device , reportData [64 ]byte ) ([]byte , error ) {
66
+ return GetRawReportAtVmpl (d , reportData , 0 )
67
67
}
68
68
69
69
// GetReportAtVmpl gets an attestation report at the given VMPL into its protobuf representation.
70
- func GetReportAtVmpl (d Device , userData [64 ]byte , vmpl int ) (* pb.Report , error ) {
71
- data , err := GetRawReportAtVmpl (d , userData , vmpl )
70
+ func GetReportAtVmpl (d Device , reportData [64 ]byte , vmpl int ) (* pb.Report , error ) {
71
+ data , err := GetRawReportAtVmpl (d , reportData , vmpl )
72
72
if err != nil {
73
73
return nil , err
74
74
}
75
75
return abi .ReportToProto (data )
76
76
}
77
77
78
78
// GetReport gets an attestation report at VMPL0 into its protobuf representation.
79
- func GetReport (d Device , userData [64 ]byte ) (* pb.Report , error ) {
80
- return GetReportAtVmpl (d , userData , 0 )
79
+ func GetReport (d Device , reportData [64 ]byte ) (* pb.Report , error ) {
80
+ return GetReportAtVmpl (d , reportData , 0 )
81
81
}
82
82
83
- // getExtendedReportIn issues a GetExtendedReport command to the sev-guest driver with userData
83
+ // getExtendedReportIn issues a GetExtendedReport command to the sev-guest driver with reportData
84
84
// input and certs as a destination for certificate data. If certs is empty, this function returns
85
85
// the expected size of certs as its second result value. If certs is non-empty, this function
86
- // returns the signed attestation report containing userData and the certificate chain for the
86
+ // returns the signed attestation report containing reportData and the certificate chain for the
87
87
// report's endorsement key.
88
- func getExtendedReportIn (d Device , userData [64 ]byte , vmpl int , certs []byte ) ([]byte , uint32 , error ) {
88
+ func getExtendedReportIn (d Device , reportData [64 ]byte , vmpl int , certs []byte ) ([]byte , uint32 , error ) {
89
89
var snpReportRsp labi.SnpReportRespABI
90
90
snpExtReportReq := labi.SnpExtendedReportReq {
91
91
Data : labi.SnpReportReqABI {
92
- UserData : userData ,
93
- Vmpl : uint32 (vmpl ),
92
+ ReportData : reportData ,
93
+ Vmpl : uint32 (vmpl ),
94
94
},
95
95
Certs : certs ,
96
96
CertsLength : uint32 (len (certs )),
@@ -122,13 +122,13 @@ func queryCertificateLength(d Device, vmpl int) (uint32, error) {
122
122
123
123
// GetRawExtendedReportAtVmpl requests for an attestation report that incorporates the given user
124
124
// data at the given VMPL, and additional key certificate information.
125
- func GetRawExtendedReportAtVmpl (d Device , userData [64 ]byte , vmpl int ) ([]byte , []byte , error ) {
125
+ func GetRawExtendedReportAtVmpl (d Device , reportData [64 ]byte , vmpl int ) ([]byte , []byte , error ) {
126
126
length , err := queryCertificateLength (d , vmpl )
127
127
if err != nil {
128
128
return nil , nil , fmt .Errorf ("error querying certificate length: %v" , err )
129
129
}
130
130
certs := make ([]byte , length )
131
- report , _ , err := getExtendedReportIn (d , userData , vmpl , certs )
131
+ report , _ , err := getExtendedReportIn (d , reportData , vmpl , certs )
132
132
if err != nil {
133
133
return nil , nil , err
134
134
}
@@ -137,13 +137,13 @@ func GetRawExtendedReportAtVmpl(d Device, userData [64]byte, vmpl int) ([]byte,
137
137
138
138
// GetRawExtendedReport requests for an attestation report that incorporates the given user data,
139
139
// and additional key certificate information.
140
- func GetRawExtendedReport (d Device , userData [64 ]byte ) ([]byte , []byte , error ) {
141
- return GetRawExtendedReportAtVmpl (d , userData , 0 )
140
+ func GetRawExtendedReport (d Device , reportData [64 ]byte ) ([]byte , []byte , error ) {
141
+ return GetRawExtendedReportAtVmpl (d , reportData , 0 )
142
142
}
143
143
144
144
// GetExtendedReportAtVmpl gets an extended attestation report at the given VMPL into a structured type.
145
- func GetExtendedReportAtVmpl (d Device , userData [64 ]byte , vmpl int ) (* pb.Attestation , error ) {
146
- reportBytes , certBytes , err := GetRawExtendedReportAtVmpl (d , userData , vmpl )
145
+ func GetExtendedReportAtVmpl (d Device , reportData [64 ]byte , vmpl int ) (* pb.Attestation , error ) {
146
+ reportBytes , certBytes , err := GetRawExtendedReportAtVmpl (d , reportData , vmpl )
147
147
if err != nil {
148
148
return nil , err
149
149
}
@@ -161,8 +161,8 @@ func GetExtendedReportAtVmpl(d Device, userData [64]byte, vmpl int) (*pb.Attesta
161
161
}
162
162
163
163
// GetExtendedReport gets an extended attestation report at VMPL0 into a structured type.
164
- func GetExtendedReport (d Device , userData [64 ]byte ) (* pb.Attestation , error ) {
165
- return GetExtendedReportAtVmpl (d , userData , 0 )
164
+ func GetExtendedReport (d Device , reportData [64 ]byte ) (* pb.Attestation , error ) {
165
+ return GetExtendedReportAtVmpl (d , reportData , 0 )
166
166
}
167
167
168
168
// GuestFieldSelect represents which guest-provided information will be mixed into a derived key.
0 commit comments