>
NOTE: THIS CRATE IS UNDER ACTIVE DEVELOPMENT AND WORK IN PROGRESS. !!!DO NOT USE IT YET!!!
The [LibreSSL] project provides a free TLS and crypto stack that was forked from [OpenSSL] in 2014. The goals are to provide a modernized codebase, improved security, and to apply best practice development processes.
[LibreSSL] provides C APIs that are compatible to [OpenSSL]'s [libssl] and [libcrypto] libraries. It also provides [libtls], a new TLS library that is designed to make it easier to write foolproof applications.
This crate provides Rust language bindings for [libtls] only, as the other [LibreSSL] APIs can be used with the existing [rust-openssl] crate. [LibreSSL] versions 2.9.0 through 3.0.2 (or later) are supported.
```rust use libtls::config::{self, TlsConfig}; use libtls::error;
fn tlsserverconfig() -> error::Result
fn main() { let tlsconfig = tlsserver_config().unwrap(); } ```
The same configuration can be created using the TlsConfigBuilder
builder pattern:
rust
fn tls_server_config() -> error::Result<TlsConfig> {
let tls_config = TlsConfigBuilder::new()
.keypair_file("tests/eccert.crt", "tests/eccert.key", None)
.protocols(libtls_sys::TLS_PROTOCOL_TLSv1_2)
.build()?;
Ok(tls_config)
}
Licensed under an OpenBSD-ISC-style license, see [LICENSE] for details.