Registry / networking / native-tls

native-tls

JSON →
library0.2.18rscratesunverified

A wrapper over a platform's native TLS implementation for secure networking.

# Cargo.toml [dependencies] native-tls = "0.2.18"
INSTALL
IMPORT
SIG · NATIVE-TLS
N
native-tls
networkingrustv0.2.18
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.

TlsConnector
use native_tls::TlsConnector;

Creates a TLS connector and connects to a server.

use native_tls::TlsConnector; fn main() -> Result<(), Box<dyn std::error::Error>> { let connector = TlsConnector::new()?; let stream = std::net::TcpStream::connect("example.com:443")?; let mut tls_stream = connector.connect("example.com", stream)?; Ok(()) }
Debug
Known issues
gotchaRequires OpenSSL on Linux, which may need system libraries installed.
fix
Install OpenSSL development headers (e.g., libssl-dev on Ubuntu).
affects: >=0.2.0
Upgrade
Version history
0.2.18latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
native-tls — cargo add native-tls · libregistry