@@ -124,7 +124,7 @@ impl MithrilCertificateVerifier {
124
124
} ) )
125
125
} else {
126
126
let certificate = match certificate {
127
- CertificateToVerify :: Downloaded { certificate } => certificate,
127
+ CertificateToVerify :: Downloaded { certificate } => * certificate,
128
128
CertificateToVerify :: ToDownload { hash } => {
129
129
self . retriever . get_certificate_details ( & hash) . await ?
130
130
}
@@ -170,7 +170,7 @@ impl MithrilCertificateVerifier {
170
170
171
171
enum CertificateToVerify {
172
172
/// The certificate is already downloaded.
173
- Downloaded { certificate : Certificate } ,
173
+ Downloaded { certificate : Box < Certificate > } ,
174
174
/// The certificate is not downloaded yet (since its parent was cached).
175
175
ToDownload { hash : String } ,
176
176
}
@@ -186,7 +186,9 @@ impl CertificateToVerify {
186
186
187
187
impl From < Certificate > for CertificateToVerify {
188
188
fn from ( value : Certificate ) -> Self {
189
- Self :: Downloaded { certificate : value }
189
+ Self :: Downloaded {
190
+ certificate : Box :: new ( value) ,
191
+ }
190
192
}
191
193
}
192
194
@@ -375,7 +377,7 @@ mod tests {
375
377
. verify_with_cache_enabled (
376
378
"certificate_chain_validation_id" ,
377
379
CertificateToVerify :: Downloaded {
378
- certificate : genesis_certificate. clone ( ) ,
380
+ certificate : Box :: new ( genesis_certificate. clone ( ) ) ,
379
381
} ,
380
382
)
381
383
. await
@@ -411,7 +413,7 @@ mod tests {
411
413
. verify_with_cache_enabled (
412
414
"certificate_chain_validation_id" ,
413
415
CertificateToVerify :: Downloaded {
414
- certificate : certificate. clone ( ) ,
416
+ certificate : Box :: new ( certificate. clone ( ) ) ,
415
417
} ,
416
418
)
417
419
. await
0 commit comments