11use attestation_report:: QEType ;
2+ use dcap_quote_verifier:: verifier:: Status ;
23use flex_error:: * ;
34use lcp_types:: Time ;
45use sgx_types:: { sgx_quote3_error_t, sgx_status_t} ;
@@ -19,7 +20,7 @@ define_error! {
1920 descr: String ,
2021 }
2122 |e| {
22- format_args!( "InvalidUtf8 : bytes={:?} descr={}" , e. bytes, e. descr)
23+ format_args!( "Invalid utf8 : bytes={:?} descr={}" , e. bytes, e. descr)
2324 } ,
2425
2526 InvalidU32String {
@@ -28,7 +29,7 @@ define_error! {
2829 descr: String ,
2930 }
3031 |e| {
31- format_args!( "InvalidU32String : string={} descr={}" , e. string, e. descr)
32+ format_args!( "Invalid u32 string : string={} descr={}" , e. string, e. descr)
3233 } ,
3334
3435 Base64Decode {
@@ -43,7 +44,7 @@ define_error! {
4344 value: String ,
4445 }
4546 |e| {
46- format_args!( "InvalidPercentDecode : value={}" , e. value)
47+ format_args!( "Invalid percent decode : value={}" , e. value)
4748 } ,
4849
4950 IoError {
@@ -60,7 +61,7 @@ define_error! {
6061
6162 InvalidIasServerName
6263 |_| {
63- format_args!( "InvalidServerName " )
64+ format_args!( "Invalid IAS server name " )
6465 } ,
6566
6667 HttpParseError
@@ -80,7 +81,7 @@ define_error! {
8081 status: reqwest:: StatusCode ,
8182 }
8283 |e| {
83- format_args!( "InvalidHTTPStatus : url={} status={}" , e. url, e. status)
84+ format_args!( "Invalid HTTP status : url={} status={}" , e. url, e. status)
8485 } ,
8586
8687 Pem
@@ -95,15 +96,15 @@ define_error! {
9596 port: u16 ,
9697 }
9798 |e| {
98- format_args!( "CannotLookupAddress : host={} port={}" , e. host, e. port)
99+ format_args!( "Cannot lookup address : host={} port={}" , e. host, e. port)
99100 } ,
100101
101102 TooOldReportTimestamp {
102103 now: Time ,
103104 timestamp: Time
104105 }
105106 |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)
107108 } ,
108109
109110 AttestationReport
@@ -123,35 +124,35 @@ define_error! {
123124 descr: String
124125 }
125126 |e| {
126- format_args!( "UnexpectedIASReportResponse error: {}" , e. descr)
127+ format_args!( "Unexpected IAS Report response error: {}" , e. descr)
127128 } ,
128129
129130 UnexpectedSigrlResponse {
130131 descr: String
131132 }
132133 |e| {
133- format_args!( "UnexpectedSigrlResponse error: {}" , e. descr)
134+ format_args!( "Unexpected sigrl response error: {}" , e. descr)
134135 } ,
135136
136137 UnexpectedIasReportCertificateResponse {
137138 descr: String
138139 }
139140 |e| {
140- format_args!( "UnexpectedIASReportCertificateResponse error: {}" , e. descr)
141+ format_args!( "Unexpected IAS certificate response error: {}" , e. descr)
141142 } ,
142143
143144 UnexpectedReport {
144145 descr: String
145146 }
146147 |e| {
147- format_args!( "UnexpectedReport error: {}" , e. descr)
148+ format_args!( "Unexpected report error: {}" , e. descr)
148149 } ,
149150
150151 UnexpectedQuote {
151152 descr: String
152153 }
153154 |e| {
154- format_args!( "UnexpectedQuoteError : {}" , e. descr)
155+ format_args!( "Unexpected quote error : {}" , e. descr)
155156 } ,
156157
157158 UnexpectedQeType {
@@ -162,6 +163,20 @@ define_error! {
162163 format_args!( "Unexpected QE type: expected={:?} actual={:?}" , e. expected, e. actual)
163164 } ,
164165
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+
165180 SgxError {
166181 status: sgx_status_t,
167182 descr: String
0 commit comments