Skip to content

Commit

Permalink
add new feature for enabling ring as crypto provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeshadow committed Mar 27, 2024
1 parent c44979f commit 84e15c1
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ http2 = ["h2", "itoa", "xitca-http/http2"]
http3 = ["h3", "h3-quinn", "quinn/tls-rustls", "itoa", "async-stream", "rustls_0dot21", "webpki_roots_0dot25"]
openssl = ["xitca-tls/openssl"]
rustls = ["xitca-tls/rustls", "webpki-roots"]
rustls-ring-crypto = ["xitca-tls/rustls-ring-crypto", "webpki-roots"]
compress = ["http-encoding"]
json = ["serde", "serde_json"]
websocket = ["http-ws"]
Expand Down Expand Up @@ -46,7 +47,7 @@ async-stream = { version = "0.3", optional = true }
itoa = { version = "1", optional = true }

# tls support shared
xitca-tls = { version = "0.2.1", optional = true }
xitca-tls = { version = "0.2.2", optional = true }

# rustls, http3 and dangerous features shared support
webpki-roots = { version = "0.26", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion http/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# unreleased 0.4.1
## Change
- update `xitca-io` to `0.2.1`.
- update `xitca-tls` to `0.2.1`.
- update `xitca-tls` to `0.2.2`.

# 0.4.0
## Add
Expand Down
2 changes: 1 addition & 1 deletion http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tracing = { version = "0.1.40", default-features = false }
native-tls = { version = "0.2.7", features = ["alpn"], optional = true }

# tls support shared
xitca-tls = { version = "0.2.1", optional = true }
xitca-tls = { version = "0.2.2", optional = true }

# http/1 support
httparse = { version = "1.8", optional = true }
Expand Down
4 changes: 3 additions & 1 deletion tls/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# unreleased
# unreleased 0.2.2
## Add
- `rustls-ring-crypto` feature

# 0.2.1
## Add
Expand Down
9 changes: 5 additions & 4 deletions tls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xitca-tls"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
license = "Apache-2.0"
description = "tls utility for xitca"
Expand All @@ -11,11 +11,12 @@ readme= "README.md"

[features]
openssl = ["dep:openssl"]
rustls = ["dep:rustls"]
rustls-uring = ["rustls", "xitca-io/runtime-uring"]
rustls = ["rustls_crate/default"]
rustls-ring-crypto = ["rustls_crate/ring"]
rustls-uring = ["rustls_crate/default", "xitca-io/runtime-uring"]

[dependencies]
xitca-io = { version = "0.2.1", features = ["runtime"] }

rustls = { version = "0.23", optional = true }
rustls_crate = { package = "rustls", version = "0.23", default-features = false, optional = true }
openssl = { version = "0.10", optional = true }
2 changes: 1 addition & 1 deletion tls/src/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use core::{

use std::io;

pub use rustls::*;
pub use rustls_crate::*;

use xitca_io::io::{AsyncIo, Interest, Ready};

Expand Down
3 changes: 2 additions & 1 deletion tls/src/rustls_uring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ use core::{

use std::{io, net::Shutdown};

use rustls::{ConnectionCommon, SideData};
pub use rustls_crate::*;

use xitca_io::{
bytes::{Buf, BytesMut},
io_uring::{AsyncBufRead, AsyncBufWrite, IoBuf, IoBufMut},
Expand Down

0 comments on commit 84e15c1

Please sign in to comment.