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
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[workspace]
members = ["ktls", "ktls-sys"]
resolver = "2"

[workspace.package]
edition = "2021"
rust-version = "1.75.0"
authors = ["Amos Wenger <amos@bearcove.net>"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/rustls/ktls"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
13 changes: 6 additions & 7 deletions ktls-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <amos@bearcove.net>"]
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]
9 changes: 5 additions & 4 deletions ktls-sys/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[![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

`linux/tls.h` bindings, for TLS kernel offload.

Generated with `bindgen tls.h -o src/bindings.rs`

See <https://github.com/bearcove/ktls> for a higher-level / safer interface.
See <https://github.com/rustls/ktls> for a higher-level / safer interface.

## License

Expand Down
31 changes: 15 additions & 16 deletions ktls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <amos@bearcove.net>"]
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"
Expand Down
16 changes: 9 additions & 7 deletions ktls/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
[![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

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
Loading