From 11c10cb42e21ae08a788729932cd0d1e5bd81d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Oliveira?= Date: Thu, 9 Jan 2025 16:15:54 +0000 Subject: [PATCH] fix websocket doc --- transports/websocket/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transports/websocket/src/lib.rs b/transports/websocket/src/lib.rs index fbed8fddc66..64272596775 100644 --- a/transports/websocket/src/lib.rs +++ b/transports/websocket/src/lib.rs @@ -83,8 +83,8 @@ use rw_stream_sink::RwStreamSink; /// ); /// /// let rcgen_cert = generate_simple_self_signed(vec!["localhost".to_string()]).unwrap(); -/// let priv_key = websocket::tls::PrivateKey::new(rcgen_cert.serialize_private_key_der()); -/// let cert = websocket::tls::Certificate::new(rcgen_cert.serialize_der().unwrap()); +/// let priv_key = websocket::tls::PrivateKey::new(rcgen_cert.key_pair.serialize_der()); +/// let cert = websocket::tls::Certificate::new(rcgen_cert.cert.der().to_vec()); /// transport.set_tls_config(websocket::tls::Config::new(priv_key, vec![cert]).unwrap()); /// /// let id = transport