Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: macOS Build and Test

on:
push:
branches: [ '*' ]
branches: [ 'main' ]
pull_request:
branches: [ '*' ]
branches: [ 'main' ]

jobs:
macos-build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Ubuntu Build and Test

on:
push:
branches: [ '*' ]
branches: [ 'main' ]
pull_request:
branches: [ '*' ]
branches: [ 'main' ]

jobs:
ubuntu-build:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/rustls-wolfcrypt-provider/Cargo.lock
/wolfcrypt-rs/target
/wolfcrypt-rs/Cargo.lock
/wolfcrypt-rs/wolfssl-5.7.4-stable/
/wolfcrypt-rs/wolfssl-*/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ provider itself operates independently of `std`.

## Status

This is in an alpha stage, particularly because the Rustls API is not yet stable.
This code currently works with Rustls = 0.23.16.
This is in an alpha stage, particularly because the Rustls API is not yet stable.
This code currently works with Rustls = 0.23.22.

## Repo Structure

Expand Down
12 changes: 6 additions & 6 deletions rustls-wolfcrypt-provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
rustls = { version = "0.23.18", default-features = false, features = ["tls12"] }
rustls = { version = "0.23.22", default-features = false, features = ["tls12"] }
chacha20poly1305 = { version = "0.10", default-features = false, features = ["alloc"] }
der = { version = "0.7", default-features = false }
ecdsa = { version = "0.16.9", default-features = false, features = ["alloc"] }
Expand All @@ -16,9 +16,9 @@ sha2 = { version = "0.10", default-features = false }
signature = { version = "2", default-features = false }
webpki = { package = "rustls-webpki", version = "0.102", features = ["alloc"], default-features = false }
foreign-types = { version = "0.5.0", default-features = false }
rustls-pki-types = { version = "1.10.0", default-features = false }
log = { version = "0.4.22", default-features = false }
env_logger = { version = "0.11.5", default-features = false }
rustls-pki-types = { version = "1.11.0", default-features = false }
log = { version = "0.4.25", default-features = false }
env_logger = { version = "0.11.6", default-features = false }
wolfcrypt-rs = { path = "../wolfcrypt-rs" }
rustls-pemfile = { version = "2.2.0", default-features = false }
hex = { version = "0.4.3", default-features = false, features = ["alloc"]}
Expand All @@ -33,9 +33,9 @@ hex-literal = "0.4.1"
[dev-dependencies]
rcgen = { version = "0.13" }
serial_test = { version = "3.2.0", default-features = false }
tokio = { version = "1.41", features = ["macros", "rt", "net", "io-util", "io-std"], default-features = false }
tokio = { version = "1.43", features = ["macros", "rt", "net", "io-util", "io-std"], default-features = false }
webpki-roots = { version = "0.26", default-features = false }
rustls = { version = "0.23.18", features = ["std", "tls12"] }
rustls = { version = "0.23.22", features = ["std", "tls12"] }
rustls-pemfile = { version = "2.2.0", default-features = false, features = ["std"]}

[features]
Expand Down
4 changes: 2 additions & 2 deletions rustls-wolfcrypt-provider/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ fn init_thread_pool() {
* Starts background job for wolfssl server (localhost:4443).
* */
fn start_wolfssl_server(current_dir_string: String, tls_version: &str) -> Child {
if let Err(e) = env::set_current_dir("../wolfcrypt-rs/wolfssl-5.7.4-stable/") {
if let Err(e) = env::set_current_dir("../wolfcrypt-rs/wolfssl-5.7.6-stable/") {
panic!("Error changing directory: {}", e);
} else {
println!("Changed directory to wolfssl-5.7.4-stable.");
println!("Changed directory to wolfssl-5.7.6-stable.");

Command::new("./examples/server/server")
.arg("-d")
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
std = []

[build-dependencies]
bindgen = "0.70.1"
bindgen = "0.71.1"

[profile.release]
strip = true
Expand Down
16 changes: 8 additions & 8 deletions wolfcrypt-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::process::Command;
fn main() {
// We check if the release was already fetched, if not,
// we fetch it and setup it.
if fs::metadata("wolfssl-5.7.4-stable").is_err() {
if fs::metadata("wolfssl-5.7.6-stable").is_err() {
setup_wolfssl();
}

Expand Down Expand Up @@ -40,8 +40,8 @@ fn setup_wolfssl() {
let output = Command::new("curl")
.arg("-L")
.arg("-o")
.arg("wolfssl-5.7.4-stable.zip")
.arg("https://github.com/wolfSSL/wolfssl/archive/refs/tags/v5.7.4-stable.zip")
.arg("wolfssl-5.7.6-stable.zip")
.arg("https://github.com/wolfSSL/wolfssl/archive/refs/tags/v5.7.6-stable.zip")
.output()
.expect("Failed to execute curl command");

Expand All @@ -50,25 +50,25 @@ fn setup_wolfssl() {

// Step 2: Unzip the downloaded file
let output = Command::new("unzip")
.arg("wolfssl-5.7.4-stable.zip")
.arg("wolfssl-5.7.6-stable.zip")
.output()
.expect("Failed to execute unzip command");

if output.status.success() {
println!("Unzipping completed successfully.");

// Step 3: Remove the ZIP file
if let Err(e) = fs::remove_file("wolfssl-5.7.4-stable.zip") {
if let Err(e) = fs::remove_file("wolfssl-5.7.6-stable.zip") {
eprintln!("Error removing ZIP file: {}", e);
} else {
println!("Removed ZIP file successfully.");
}

// Step 4: Change the current working directory to the unzipped folder
if let Err(e) = env::set_current_dir("wolfssl-5.7.4-stable") {
if let Err(e) = env::set_current_dir("wolfssl-5.7.6-stable") {
eprintln!("Error changing directory: {}", e);
} else {
println!("Changed directory to wolfssl-5.7.4-stable.");
println!("Changed directory to wolfssl-5.7.6-stable.");

// Step 5: Execute ./autogen.sh
let output = Command::new("./autogen.sh")
Expand Down Expand Up @@ -151,6 +151,6 @@ fn setup_wolfssl() {
if let Err(e) = env::set_current_dir("../") {
eprintln!("Error changing directory: {}", e);
} else {
println!("Changed directory to wolfssl-5.7.4-stable.");
println!("Changed directory to wolfssl-5.7.6-stable.");
}
}
15 changes: 11 additions & 4 deletions wolfcrypt-rs/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/*
* These are used to suppress all the errors that rust complains
* about our symbols and/or macro (since they don't follow rust's style
* convention).
* */
* Allow attributes to suppress warnings in bindgen-generated code.
* These warnings arise from:
* - Naming conventions that don't match Rust style (e.g. from C symbols)
* - Auto-generated unsafe code patterns
* - Type/casting patterns common in C FFI but discouraged in pure Rust
*
* Since this code is auto-generated, these warnings cannot be fixed manually
* and must be suppressed.
*/
#![allow(dead_code)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
Expand All @@ -11,4 +16,6 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::too_many_arguments)]
#![allow(improper_ctypes)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::ptr_offset_with_cast)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));