Skip to content

Conversation

@holtrop
Copy link

@holtrop holtrop commented Sep 17, 2025

Description

Rust wrapper: add wolfssl::wolfcrypt::random module

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@holtrop holtrop self-assigned this Sep 17, 2025
@holtrop
Copy link
Author

holtrop commented Sep 18, 2025

retest this please (RequestAbortedException)

@holtrop holtrop marked this pull request as ready for review September 18, 2025 11:32
@holtrop holtrop assigned wolfSSL-Bot and unassigned holtrop Sep 18, 2025
@holtrop holtrop requested a review from MarkAtwood September 18, 2025 16:44
Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests built and ran

    Finished `test` profile [unoptimized + debuginfo] target(s) in 24.53s
     Running unittests src/lib.rs (target/debug/deps/wolfssl-5c61f245a066f4a3)
wolfssl-5c61f245a066f4a3(50440,0x7ff858b77dc0) malloc: nano zone abandoned due to inability to reserve vm space.

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/test_random.rs (target/debug/deps/test_random-34b337d6eff36f51)
test_random-34b337d6eff36f51(50441,0x7ff858b77dc0) malloc: nano zone abandoned due to inability to reserve vm space.

running 5 tests
test test_rng_new_with_nonce_and_drop ... ok
test test_rng_generate_block_u32 ... ok
test test_rng_new_and_drop ... ok
test test_rng_generate_byte ... ok
test test_rng_generate_block_u8 ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests wolfssl

running 1 test
test src/wolfcrypt/random.rs - wolfcrypt::random (line 12) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

I tried with using a sanitizer as well:

RUSTFLAGS="-Z sanitizer=leak" make -C ./wrapper/rust test

@holtrop
Copy link
Author

holtrop commented Sep 19, 2025

Tests built and ran

    Finished `test` profile [unoptimized + debuginfo] target(s) in 24.53s
     Running unittests src/lib.rs (target/debug/deps/wolfssl-5c61f245a066f4a3)
wolfssl-5c61f245a066f4a3(50440,0x7ff858b77dc0) malloc: nano zone abandoned due to inability to reserve vm space.

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/test_random.rs (target/debug/deps/test_random-34b337d6eff36f51)
test_random-34b337d6eff36f51(50441,0x7ff858b77dc0) malloc: nano zone abandoned due to inability to reserve vm space.

running 5 tests
test test_rng_new_with_nonce_and_drop ... ok
test test_rng_generate_block_u32 ... ok
test test_rng_new_and_drop ... ok
test test_rng_generate_byte ... ok
test test_rng_generate_block_u8 ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests wolfssl

running 1 test
test src/wolfcrypt/random.rs - wolfcrypt::random (line 12) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

I tried with using a sanitizer as well:

RUSTFLAGS="-Z sanitizer=leak" make -C ./wrapper/rust test

Oh that is a good point, I should add this step to CI.

@holtrop
Copy link
Author

holtrop commented Sep 19, 2025

retest this please (SSL_read input error 5, fatal I/O error in TLS layer)

@JacobBarthelmeh JacobBarthelmeh merged commit 65d4e01 into wolfSSL:master Sep 25, 2025
324 of 326 checks passed
@holtrop holtrop deleted the rust-wc-random branch October 2, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants