diff --git a/Cargo.toml b/Cargo.toml index a2572f3..3ce492d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,11 @@ [workspace] members = ["ktls", "ktls-sys"] resolver = "2" + +[workspace.package] +edition = "2021" +rust-version = "1.75.0" +authors = ["Amos Wenger "] +license = "MIT OR Apache-2.0" +readme = "README.md" +repository = "https://github.com/rustls/ktls" diff --git a/README.md b/README.md index f56866d..9280c1a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -[![test pipeline](https://github.com/hapsoc/ktls/actions/workflows/test.yml/badge.svg)](https://github.com/hapsoc/ktls/actions/workflows/test.yml?query=branch%3Amain) -[![Coverage Status (codecov.io)](https://codecov.io/gh/hapsoc/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/hapsoc/ktls/) -[![license: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT) +[![Test pipeline](https://github.com/rustls/ktls/actions/workflows/test.yml/badge.svg)](https://github.com/rustls/ktls/actions/workflows/test.yml?query=branch%3Amain) +[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/ktls/) +[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT) # ktls This repository hosts both: - * [ktls](./ktls): higher-level, safe wrappers over kTLS - * [ktls-sys](./ktls-sys): the raw system interface for kTLS on Linux + * [ktls](./ktls): high-level APIs for configuring kTLS (kernel TLS offload) on top of [rustls]. + * [ktls-sys](./ktls-sys): the raw system interface for kTLS on Linux (deprecated). ## License diff --git a/ktls-sys/Cargo.toml b/ktls-sys/Cargo.toml index b94ea41..02f36d9 100644 --- a/ktls-sys/Cargo.toml +++ b/ktls-sys/Cargo.toml @@ -1,15 +1,14 @@ [package] name = "ktls-sys" version = "1.0.2" -edition = "2021" -license = "MIT OR Apache-2.0" -repository = "https://github.com/rustls/ktls-sys" -documentation = "https://docs.rs/ktls-sys" -authors = ["Amos Wenger "] -readme = "README.md" +edition.workspace = true +rust-version.workspace = true +authors.workspace = true description = """ FFI bindings for `linux/tls.h` """ -rust-version = "1.75" +license.workspace = true +readme.workspace = true +repository.workspace = true [dependencies] diff --git a/ktls-sys/README.md b/ktls-sys/README.md index 2cee2cd..2ad47b1 100644 --- a/ktls-sys/README.md +++ b/ktls-sys/README.md @@ -1,7 +1,8 @@ -[![test pipeline](https://github.com/hapsoc/ktls/actions/workflows/test.yml/badge.svg)](https://github.com/hapsoc/ktls/actions/workflows/test.yml?query=branch%3Amain) -[![Coverage Status (codecov.io)](https://codecov.io/gh/hapsoc/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/hapsoc/ktls/) [![Crates.io](https://img.shields.io/crates/v/ktls-sys)](https://crates.io/crates/ktls-sys) -[![license: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT) +[![Docs.rs](https://docs.rs/ktls-sys/badge.svg)](https://docs.rs/ktls-sys) +[![Test pipeline](https://github.com/rustls/ktls/actions/workflows/test.yml/badge.svg)](https://github.com/rustls/ktls/actions/workflows/test.yml?query=branch%3Amain) +[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/ktls/) +[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT) # ktls-sys @@ -9,7 +10,7 @@ Generated with `bindgen tls.h -o src/bindings.rs` -See for a higher-level / safer interface. +See for a higher-level / safer interface. ## License diff --git a/ktls/Cargo.toml b/ktls/Cargo.toml index d0656fa..73217ca 100644 --- a/ktls/Cargo.toml +++ b/ktls/Cargo.toml @@ -1,31 +1,30 @@ [package] name = "ktls" version = "6.0.2" -edition = "2021" -license = "MIT OR Apache-2.0" -repository = "https://github.com/rustls/ktls" -documentation = "https://docs.rs/ktls" -authors = ["Amos Wenger "] -readme = "README.md" +edition.workspace = true +rust-version.workspace = true +authors.workspace = true description = """ Configures kTLS for tokio-rustls client and server connections. """ -rust-version = "1.75" +license.workspace = true +readme.workspace = true +repository.workspace = true [dependencies] +futures-util = "0.3.30" +ktls-sys = "1.0.1" libc = { version = "0.2.155", features = ["const-extern-fn"] } -thiserror = "2" -tracing = "0.1.40" -tokio-rustls = { default-features = false, version = "0.26.0" } -rustls = { version = "0.23.12", default-features = false } -smallvec = "1.13.2" memoffset = "0.9.1" +nix = { version = "0.29.0", features = ["socket", "uio", "net"] } +num_enum = "0.7.3" pin-project-lite = "0.2.14" +rustls = { version = "0.23.12", default-features = false } +smallvec = "1.13.2" +thiserror = "2" tokio = { version = "1.39.2", features = ["net", "macros", "io-util"] } -ktls-sys = "1.0.1" -num_enum = "0.7.3" -futures-util = "0.3.30" -nix = { version = "0.29.0", features = ["socket", "uio", "net"] } +tokio-rustls = { default-features = false, version = "0.26.0" } +tracing = "0.1.40" [dev-dependencies] lazy_static = "1.5.0" diff --git a/ktls/README.md b/ktls/README.md index 59c8897..aab7ffc 100644 --- a/ktls/README.md +++ b/ktls/README.md @@ -1,13 +1,12 @@ -[![test pipeline](https://github.com/hapsoc/ktls/actions/workflows/test.yml/badge.svg)](https://github.com/hapsoc/ktls/actions/workflows/test.yml?query=branch%3Amain) -[![Coverage Status (codecov.io)](https://codecov.io/gh/hapsoc/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/hapsoc/ktls/) [![Crates.io](https://img.shields.io/crates/v/ktls)](https://crates.io/crates/ktls) -[![license: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT) +[![Docs.rs](https://docs.rs/ktls/badge.svg)](https://docs.rs/ktls) +[![Test pipeline](https://github.com/rustls/ktls/actions/workflows/test.yml/badge.svg)](https://github.com/rustls/ktls/actions/workflows/test.yml?query=branch%3Amain) +[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/ktls/) +[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT) -# ktls +# ktls - Kernel TLS offload (kTLS) support built on top of [rustls]. -Configures kTLS ([kernel TLS -offload](https://www.kernel.org/doc/html/latest/networking/tls-offload.html)) -for any type that implements `AsRawFd`, given a rustls `ServerConnection`. +This crate provides high-level APIs for configuring [kernel TLS offload] (kTLS). ## License @@ -15,3 +14,6 @@ This project is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0). See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details. + +[kernel TLS offload]: https://www.kernel.org/doc/html/latest/networking/tls-offload.html +[rustls]: https://docs.rs/rustls/latest/rustls/kernel/index.html