Skip to content

Commit

Permalink
prepare 0.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
youyuanwu committed Nov 29, 2024
1 parent 09c8e10 commit eb4d4ec
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
]

[workspace.dependencies]
tonic-tls = { path = "tonic-tls" }
tonic-tls = { path = "tonic-tls" , default-features = true}

tokio = "1"
tokio-rustls = { version = "0.26", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion tonic-tls-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rcgen.workspace = true
tokio-util.workspace = true
tokio-stream.workspace = true
prost.workspace = true
tonic-tls = { workspace = true, features = ["native", "rustls", "openssl", "schannel"] }
tonic-tls = { workspace = true }
futures.workspace = true
tokio-native-tls.workspace = true
tokio-schannel.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions tonic-tls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "tonic-tls"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
license = "MIT"
authors = ["youyuanwu@outlook.com"]
repository = "https://github.com/youyuanwu/tonic-tls"
documentation = "https://github.com/youyuanwu/tonic-tls"
documentation = "https://docs.rs/tonic-tls/latest/tonic_tls/"
description = "Tls wrappers for tonic."
categories = ["web-programming", "network-programming"]
keywords = ["gRPC", "tls", "rustls", "native-tls"]
Expand Down Expand Up @@ -37,7 +37,7 @@ tokio-schannel = { workspace = true, optional = true}
schannel = { workspace = true, optional = true }

[features]
default = []
default = ["native", "rustls", "openssl", "schannel" ]
native = ["dep:tokio-native-tls"]
rustls = ["dep:tokio-rustls"]
openssl = ["dep:tokio-openssl", "dep:openssl"]
Expand Down
2 changes: 1 addition & 1 deletion tonic-tls/src/openssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ where
///
/// This type will be accessible through [request extensions](tonic::Request::extensions).
///
/// See [`Connected`](tonic::transport::server::Connected) for more details.
/// See [`Connected`] for more details.
#[derive(Debug, Clone)]
pub struct SslConnectInfo<T> {
inner: T,
Expand Down
2 changes: 1 addition & 1 deletion tonic-tls/src/rustls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ where
///
/// This type will be accessible through [request extensions](tonic::Request::extensions).
///
/// See [`Connected`](tonic::transport::server::Connected) for more details.
/// See [`Connected`] for more details.
#[derive(Debug, Clone)]
pub struct SslConnectInfo<T> {
inner: T,
Expand Down
12 changes: 3 additions & 9 deletions tonic-tls/src/schannel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,8 @@ impl<S: Connected + AsyncRead + AsyncWrite> Connected for TlsStream<S> {
fn connect_info(&self) -> Self::ConnectInfo {
let inner = self.inner.get_ref();
let conn = inner.get_ref().get_ref().connect_info();
let certs = inner
.peer_certificate()
.ok()
.and_then(|x| Some(Arc::new(x)));
SslConnectInfo {
inner: conn,
certs: certs.into(),
}
let certs = inner.peer_certificate().ok().map(Arc::new);
SslConnectInfo { inner: conn, certs }
}
}

Expand Down Expand Up @@ -122,7 +116,7 @@ where
///
/// This type will be accessible through [request extensions](tonic::Request::extensions).
///
/// See [`Connected`](tonic::transport::server::Connected) for more details.
/// See [`Connected`] for more details.
#[derive(Debug, Clone)]
pub struct SslConnectInfo<T> {
inner: T,
Expand Down

0 comments on commit eb4d4ec

Please sign in to comment.