File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -475,14 +475,10 @@ mod test {
475475 // check verification result - this is an invalid signature
476476 // defined in openssl crypto/cms/cms.h
477477 const CMS_R_CERTIFICATE_VERIFY_ERROR : i32 = 100 ;
478- match res {
479- Err ( es) => {
480- let error_array = es. errors ( ) ;
481- assert_eq ! ( 1 , error_array. len( ) ) ;
482- let code = error_array[ 0 ] . code ( ) ;
483- assert_eq ! ( ffi:: ERR_GET_REASON ( code) , CMS_R_CERTIFICATE_VERIFY_ERROR ) ;
484- }
485- _ => panic ! ( "expected CMS verification error, got Ok()" ) ,
486- }
478+ let es = res. unwrap_err ( ) ;
479+ let error_array = es. errors ( ) ;
480+ assert_eq ! ( 1 , error_array. len( ) ) ;
481+ let code = error_array[ 0 ] . reason_code ( ) ;
482+ assert_eq ! ( code, CMS_R_CERTIFICATE_VERIFY_ERROR ) ;
487483 }
488484}
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ impl Provider {
5555 retain_fallbacks as _ ,
5656 ) ) ?;
5757
58+ // OSSL_PROVIDER_try_load seems to leave errors on the stack, even
59+ // when it succeeds.
60+ let _ = ErrorStack :: get ( ) ;
61+
5862 Ok ( Provider :: from_ptr ( p) )
5963 }
6064 }
You can’t perform that action at this time.
0 commit comments