Skip to content

Commit 7cbf7c1

Browse files
authored
feat(tls): enable rustls key logging via SSLKEYLOGFILE
Pull-Request: #6357.
1 parent 7637c23 commit 7cbf7c1

5 files changed

Lines changed: 11 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ libp2p-swarm = { version = "0.47.1", path = "swarm" }
106106
libp2p-swarm-derive = { version = "=0.35.1", path = "swarm-derive" } # `libp2p-swarm-derive` may not be compatible with different `libp2p-swarm` non-breaking releases. E.g. `libp2p-swarm` might introduce a new enum variant `FromSwarm` (which is `#[non-exhaustive]`) in a non-breaking release. Older versions of `libp2p-swarm-derive` would not forward this enum variant within the `NetworkBehaviour` hierarchy. Thus the version pinning is required.
107107
libp2p-swarm-test = { version = "0.6.0", path = "swarm-test" }
108108
libp2p-tcp = { version = "0.44.1", path = "transports/tcp" }
109-
libp2p-tls = { version = "0.6.2", path = "transports/tls" }
109+
libp2p-tls = { version = "0.6.3", path = "transports/tls" }
110110
libp2p-uds = { version = "0.43.1", path = "transports/uds" }
111111
libp2p-upnp = { version = "0.6.0", path = "protocols/upnp" }
112112
libp2p-webrtc = { version = "0.9.0-alpha.2", path = "transports/webrtc" }
@@ -121,7 +121,7 @@ libp2p-yamux = { version = "0.47.0", path = "muxers/yamux" }
121121
asynchronous-codec = { version = "0.7.0" }
122122
env_logger = "0.11"
123123
futures = "0.3.30"
124-
futures-bounded = { version = "0.3", features = ["tokio"]}
124+
futures-bounded = { version = "0.3", features = ["tokio"] }
125125
futures-rustls = { version = "0.26.0", default-features = false }
126126
getrandom = "0.2"
127127
if-watch = "3.2.1"

transports/tls/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.6.3
2+
3+
- Enable rustls TLS key logging via `SSLKEYLOGFILE`.
4+
See [XXXX](https://github.com/libp2p/rust-libp2p/pull/XXXX).
5+
16
## 0.6.2
27

38
- Upgrade `rustls-webpki` to `v0.103`

transports/tls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libp2p-tls"
3-
version = "0.6.2"
3+
version = "0.6.3"
44
edition.workspace = true
55
rust-version = { workspace = true }
66
description = "TLS configuration based on libp2p TLS specs."

transports/tls/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ pub fn make_client_config(
6262
))
6363
.with_client_cert_resolver(cert_resolver);
6464
crypto.alpn_protocols = vec![P2P_ALPN.to_vec()];
65+
crypto.key_log = Arc::new(rustls::KeyLogFile::new());
6566

6667
Ok(crypto)
6768
}
@@ -86,6 +87,7 @@ pub fn make_server_config(
8687
.with_client_cert_verifier(Arc::new(verifier::Libp2pCertificateVerifier::new()))
8788
.with_cert_resolver(cert_resolver);
8889
crypto.alpn_protocols = vec![P2P_ALPN.to_vec()];
90+
crypto.key_log = Arc::new(rustls::KeyLogFile::new());
8991

9092
Ok(crypto)
9193
}

0 commit comments

Comments
 (0)