File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -256,9 +256,10 @@ impl Keys {
256256 let Some ( attestation) = info. attestation else {
257257 bail ! ( "Source KMS certificate does not contain attestation" ) ;
258258 } ;
259- * attestation_slot_out
259+ let mut slot = attestation_slot_out
260260 . lock ( )
261- . expect ( "source attestation mutex poisoned" ) = Some ( attestation) ;
261+ . map_err ( |_| anyhow:: anyhow!( "source attestation mutex poisoned" ) ) ?;
262+ * slot = Some ( attestation) ;
262263 Ok ( ( ) )
263264 } ) )
264265 . maybe_pccs_url ( pccs_url. clone ( ) )
@@ -277,9 +278,9 @@ impl Keys {
277278 . context ( "Failed to create client" ) ?;
278279 kms_client = KmsClient :: new ( ra_client) ;
279280 let source_attestation = source_attestation_slot
280- . expect ( "source attestation slot missing" )
281+ . context ( "source attestation slot missing" ) ?
281282 . lock ( )
282- . expect ( "source attestation mutex poisoned" )
283+ . map_err ( |_| anyhow :: anyhow! ( "source attestation mutex poisoned" ) ) ?
283284 . clone ( )
284285 . context ( "Missing source KMS attestation" ) ?;
285286 ensure_remote_kms_allowed ( cfg, & source_attestation)
You can’t perform that action at this time.
0 commit comments