Registry / networking / tokio-openssl

tokio-openssl

JSON →
library0.6.5rscratesunverified

An implementation of SSL streams for Tokio backed by OpenSSL.

# Cargo.toml [dependencies] tokio-openssl = "0.6.5"
INSTALL
IMPORT
SIG · TOKIO-OPENSSL
T
tokio-openssl
networkingrustv0.6.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SslStream
✓ use tokio_openssl::SslStream;

Create a TLS connection using OpenSSL with Tokio.

use tokio_openssl::SslStream; use openssl::ssl::{SslConnector, SslMethod}; use tokio::net::TcpStream; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let connector = SslConnector::builder(SslMethod::tls())?.build(); let stream = TcpStream::connect("example.com:443").await?; let mut ssl_stream = SslStream::new(connector.configure()?, stream)?; ssl_stream.connect().await?; Ok(()) }
Debug
Known issues
gotchaRequires OpenSSL development libraries installed on the system.
fix
Install OpenSSL (libssl-dev on Ubuntu, openssl-devel on Fedora).
affects: >=0.6.0
Upgrade
Version history
0.6.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
28
Resources
tokio-openssl — cargo add tokio-openssl · libregistry