JuliaLang / MbedTLS.jl

Wrapper around mbedtls
Other
41 stars 50 forks source link

These tests didn't do what you thought they did #227

Closed Keno closed 3 years ago

Keno commented 3 years ago

The rng assignment inside the closure was actually reassigning the local rng, which would then occaisionally segfault, because RandomDevice is immutable, so there's nothing that actually rooted it to the device object.

Side note: Somebody should probably add assertions that the various things we're trying to protect by rooting them in the context object are actually mutable. However, I've spent too much time on this already so I'll leave that to somebody else ;).