1
1
use attestation_report:: QEType ;
2
+ use dcap_quote_verifier:: verifier:: Status ;
2
3
use flex_error:: * ;
3
4
use lcp_types:: Time ;
4
5
use sgx_types:: { sgx_quote3_error_t, sgx_status_t} ;
@@ -19,7 +20,7 @@ define_error! {
19
20
descr: String ,
20
21
}
21
22
|e| {
22
- format_args!( "InvalidUtf8 : bytes={:?} descr={}" , e. bytes, e. descr)
23
+ format_args!( "Invalid utf8 : bytes={:?} descr={}" , e. bytes, e. descr)
23
24
} ,
24
25
25
26
InvalidU32String {
@@ -28,7 +29,7 @@ define_error! {
28
29
descr: String ,
29
30
}
30
31
|e| {
31
- format_args!( "InvalidU32String : string={} descr={}" , e. string, e. descr)
32
+ format_args!( "Invalid u32 string : string={} descr={}" , e. string, e. descr)
32
33
} ,
33
34
34
35
Base64Decode {
@@ -43,7 +44,7 @@ define_error! {
43
44
value: String ,
44
45
}
45
46
|e| {
46
- format_args!( "InvalidPercentDecode : value={}" , e. value)
47
+ format_args!( "Invalid percent decode : value={}" , e. value)
47
48
} ,
48
49
49
50
IoError {
@@ -60,7 +61,7 @@ define_error! {
60
61
61
62
InvalidIasServerName
62
63
|_| {
63
- format_args!( "InvalidServerName " )
64
+ format_args!( "Invalid IAS server name " )
64
65
} ,
65
66
66
67
HttpParseError
@@ -80,7 +81,7 @@ define_error! {
80
81
status: reqwest:: StatusCode ,
81
82
}
82
83
|e| {
83
- format_args!( "InvalidHTTPStatus : url={} status={}" , e. url, e. status)
84
+ format_args!( "Invalid HTTP status : url={} status={}" , e. url, e. status)
84
85
} ,
85
86
86
87
Pem
@@ -95,15 +96,15 @@ define_error! {
95
96
port: u16 ,
96
97
}
97
98
|e| {
98
- format_args!( "CannotLookupAddress : host={} port={}" , e. host, e. port)
99
+ format_args!( "Cannot lookup address : host={} port={}" , e. host, e. port)
99
100
} ,
100
101
101
102
TooOldReportTimestamp {
102
103
now: Time ,
103
104
timestamp: Time
104
105
}
105
106
|e| {
106
- format_args!( "TooOldReportTimestamp : the timestamp of the report is too old: now={:?} attestation_time={:?}" , e. now, e. timestamp)
107
+ format_args!( "Too old report timestamp : the timestamp of the report is too old: now={:?} attestation_time={:?}" , e. now, e. timestamp)
107
108
} ,
108
109
109
110
AttestationReport
@@ -123,35 +124,35 @@ define_error! {
123
124
descr: String
124
125
}
125
126
|e| {
126
- format_args!( "UnexpectedIASReportResponse error: {}" , e. descr)
127
+ format_args!( "Unexpected IAS Report response error: {}" , e. descr)
127
128
} ,
128
129
129
130
UnexpectedSigrlResponse {
130
131
descr: String
131
132
}
132
133
|e| {
133
- format_args!( "UnexpectedSigrlResponse error: {}" , e. descr)
134
+ format_args!( "Unexpected sigrl response error: {}" , e. descr)
134
135
} ,
135
136
136
137
UnexpectedIasReportCertificateResponse {
137
138
descr: String
138
139
}
139
140
|e| {
140
- format_args!( "UnexpectedIASReportCertificateResponse error: {}" , e. descr)
141
+ format_args!( "Unexpected IAS certificate response error: {}" , e. descr)
141
142
} ,
142
143
143
144
UnexpectedReport {
144
145
descr: String
145
146
}
146
147
|e| {
147
- format_args!( "UnexpectedReport error: {}" , e. descr)
148
+ format_args!( "Unexpected report error: {}" , e. descr)
148
149
} ,
149
150
150
151
UnexpectedQuote {
151
152
descr: String
152
153
}
153
154
|e| {
154
- format_args!( "UnexpectedQuoteError : {}" , e. descr)
155
+ format_args!( "Unexpected quote error : {}" , e. descr)
155
156
} ,
156
157
157
158
UnexpectedQeType {
@@ -162,6 +163,20 @@ define_error! {
162
163
format_args!( "Unexpected QE type: expected={:?} actual={:?}" , e. expected, e. actual)
163
164
} ,
164
165
166
+ TcbStatusNotAllowed {
167
+ tcb_status: Status ,
168
+ }
169
+ |e| {
170
+ format_args!( "TCB status Not allowed: tcb_status={:?}" , e. tcb_status)
171
+ } ,
172
+
173
+ AdvisoryIdsNotAllowed {
174
+ advisory_ids: Vec <String >,
175
+ }
176
+ |e| {
177
+ format_args!( "Advisory Ids Not allowed: advisory_ids={:?}" , e. advisory_ids)
178
+ } ,
179
+
165
180
SgxError {
166
181
status: sgx_status_t,
167
182
descr: String
0 commit comments