sfackler / rust-openssl

OpenSSL bindings for Rust
1.38k stars 742 forks source link

Ensure Rsa::check_key doesn't leave errors on the stack #2279

Closed alex closed 1 month ago

sfackler commented 1 month ago

It looks like this is flaky on LibreSSL: https://github.com/sfackler/rust-openssl/actions/runs/10544624544/job/29213875028?pr=2282

botovq commented 1 month ago

As long as you don't ensure that the error stack is clean after every single test, I think you need to make sure you clean the stack before running a test that cares about it. Otherwise the assert isn't asserting what you want it to assert.

In this case, I'm pretty sure it's the md_ctx::test::verify_fail that left an error behind that the assert then picked up.