Files
wolfssl/wrapper/rust
Josh Holtrop a8fa845fa9 Rust wrapper: ecc: fix possible resource leak in some error cases
Fix F-1062.

If wolfSSL returns an error after initializing ECC struct with
wc_ecc_init_ex(), wc_ecc_free() might not have been called in all cases.

Move construction of the ECC struct earlier ahead of further wolfSSL
calls after wc_ecc_init_ex() so if those subsequent wolfSSL calls return
an error the Drop impl for ECC will be called to deinitialize.
2026-04-14 20:50:07 -04:00
..
2026-02-04 14:32:05 -05:00

wolfSSL Rust Wrapper

The wolfSSL Rust wrapper currently consists of a single Rust crate named wolfssl-wolfcrypt. The wolfssl-wolfcrypt crate is a Rust wrapper for the wolfCrypt cryptographic algorithms portion of the wolfSSL C library.

Locally building and testing the wolfSSL Rust Wrapper

First, configure and build wolfssl C library.

Then build the wolfssl Rust wrapper with:

make -C wrapper/rust

Run tests with:

make -C wrapper/rust test

Repository Directory Structure

Repository Directory Description
/wrapper/rust Top level container for all Rust wrapper functionality.
/wrapper/rust/wolfssl-wolfcrypt Top level for the wolfssl-wolfcrypt library crate.
/wrapper/rust/wolfssl-wolfcrypt/src Source directory for wolfssl-wolfcrypt crate top-level modules.