parallaxsecond / rust-cryptoki

Rust wrapper for the PKCS #11 API, Cryptoki
https://docs.rs/cryptoki/
Apache License 2.0
71 stars 60 forks source link

Do not call C_Finalize if not initialized #208

Open Geobert opened 5 months ago

Geobert commented 5 months ago

Hi,

I’m in a mixed env with Rust code used in a C++ program. C++ side initialize the pkcs11 lib so Rust side can’t. If Rust side calls C_Finalize, I get a random crash, which, I think, is because of a double free?