Skip to content

Commit e159023

Browse files
authored
Merge pull request #64 from cxw620/use-rustls-kernel-connection-0
Updates repo metadata and formats the codes (part of #62)
2 parents f7bfb7c + 7d9d5cc commit e159023

File tree

6 files changed

+48
-39
lines changed

6 files changed

+48
-39
lines changed

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
[workspace]
22
members = ["ktls", "ktls-sys"]
33
resolver = "2"
4+
5+
[workspace.package]
6+
edition = "2021"
7+
rust-version = "1.75.0"
8+
authors = ["Amos Wenger <amos@bearcove.net>"]
9+
license = "MIT OR Apache-2.0"
10+
readme = "README.md"
11+
repository = "https://github.com/rustls/ktls"

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
[![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)
2-
[![Coverage Status (codecov.io)](https://codecov.io/gh/hapsoc/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/hapsoc/ktls/)
3-
[![license: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT)
1+
[![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)
2+
[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/ktls/)
3+
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT)
44

55
# ktls
66

77
This repository hosts both:
88

9-
* [ktls](./ktls): higher-level, safe wrappers over kTLS
10-
* [ktls-sys](./ktls-sys): the raw system interface for kTLS on Linux
9+
* [ktls](./ktls): high-level APIs for configuring kTLS (kernel TLS offload) on top of [rustls].
10+
* [ktls-sys](./ktls-sys): the raw system interface for kTLS on Linux (deprecated).
1111

1212
## License
1313

ktls-sys/Cargo.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
[package]
22
name = "ktls-sys"
33
version = "1.0.2"
4-
edition = "2021"
5-
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/rustls/ktls-sys"
7-
documentation = "https://docs.rs/ktls-sys"
8-
authors = ["Amos Wenger <amos@bearcove.net>"]
9-
readme = "README.md"
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
107
description = """
118
FFI bindings for `linux/tls.h`
129
"""
13-
rust-version = "1.75"
10+
license.workspace = true
11+
readme.workspace = true
12+
repository.workspace = true
1413

1514
[dependencies]

ktls-sys/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
[![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)
2-
[![Coverage Status (codecov.io)](https://codecov.io/gh/hapsoc/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/hapsoc/ktls/)
31
[![Crates.io](https://img.shields.io/crates/v/ktls-sys)](https://crates.io/crates/ktls-sys)
4-
[![license: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT)
2+
[![Docs.rs](https://docs.rs/ktls-sys/badge.svg)](https://docs.rs/ktls-sys)
3+
[![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)
4+
[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/ktls/)
5+
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT)
56

67
# ktls-sys
78

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

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

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

1415
## License
1516

ktls/Cargo.toml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
[package]
22
name = "ktls"
33
version = "6.0.2"
4-
edition = "2021"
5-
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/rustls/ktls"
7-
documentation = "https://docs.rs/ktls"
8-
authors = ["Amos Wenger <amos@bearcove.net>"]
9-
readme = "README.md"
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
107
description = """
118
Configures kTLS for tokio-rustls client and server connections.
129
"""
13-
rust-version = "1.75"
10+
license.workspace = true
11+
readme.workspace = true
12+
repository.workspace = true
1413

1514
[dependencies]
15+
futures-util = "0.3.30"
16+
ktls-sys = "1.0.1"
1617
libc = { version = "0.2.155", features = ["const-extern-fn"] }
17-
thiserror = "2"
18-
tracing = "0.1.40"
19-
tokio-rustls = { default-features = false, version = "0.26.0" }
20-
rustls = { version = "0.23.12", default-features = false }
21-
smallvec = "1.13.2"
2218
memoffset = "0.9.1"
19+
nix = { version = "0.29.0", features = ["socket", "uio", "net"] }
20+
num_enum = "0.7.3"
2321
pin-project-lite = "0.2.14"
22+
rustls = { version = "0.23.12", default-features = false }
23+
smallvec = "1.13.2"
24+
thiserror = "2"
2425
tokio = { version = "1.39.2", features = ["net", "macros", "io-util"] }
25-
ktls-sys = "1.0.1"
26-
num_enum = "0.7.3"
27-
futures-util = "0.3.30"
28-
nix = { version = "0.29.0", features = ["socket", "uio", "net"] }
26+
tokio-rustls = { default-features = false, version = "0.26.0" }
27+
tracing = "0.1.40"
2928

3029
[dev-dependencies]
3130
lazy_static = "1.5.0"

ktls/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
[![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)
2-
[![Coverage Status (codecov.io)](https://codecov.io/gh/hapsoc/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/hapsoc/ktls/)
31
[![Crates.io](https://img.shields.io/crates/v/ktls)](https://crates.io/crates/ktls)
4-
[![license: MIT/Apache-2.0](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT)
2+
[![Docs.rs](https://docs.rs/ktls/badge.svg)](https://docs.rs/ktls)
3+
[![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)
4+
[![Coverage Status (codecov.io)](https://codecov.io/gh/rustls/ktls/branch/main/graph/badge.svg)](https://codecov.io/gh/rustls/ktls/)
5+
[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT)
56

6-
# ktls
7+
# ktls - Kernel TLS offload (kTLS) support built on top of [rustls].
78

8-
Configures kTLS ([kernel TLS
9-
offload](https://www.kernel.org/doc/html/latest/networking/tls-offload.html))
10-
for any type that implements `AsRawFd`, given a rustls `ServerConnection`.
9+
This crate provides high-level APIs for configuring [kernel TLS offload] (kTLS).
1110

1211
## License
1312

1413
This project is primarily distributed under the terms of both the MIT license
1514
and the Apache License (Version 2.0).
1615

1716
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.
17+
18+
[kernel TLS offload]: https://www.kernel.org/doc/html/latest/networking/tls-offload.html
19+
[rustls]: https://docs.rs/rustls/latest/rustls/kernel/index.html

0 commit comments

Comments
 (0)