Skip to main content

Module tls

Module tls 

Source
Expand description

TLS configuration and connection handling.

This module provides TLS support for secure connections to Hyper servers using a pure Rust TLS implementation (rustls).

§Certificate Formats

ItemFormat
CA CertPEM
Client CertPEM
Client KeyPEM (PKCS#8 or PKCS#1)
  • PEM format: Base64-encoded with -----BEGIN/END CERTIFICATE----- headers
  • PKCS#8: Key format with -----BEGIN PRIVATE KEY----- header
  • PKCS#1: RSA-specific format with -----BEGIN RSA PRIVATE KEY----- header

§Example

use hyperdb_api_core::client::{Client, Config};
use hyperdb_api_core::client::tls::TlsConfig;

let config = Config::new()
    .with_host("secure-hyper.example.com")
    .with_port(7484)
    .with_tls(TlsConfig::default()); // TODO: with_tls not yet on Config

let client = Client::connect(&config)?;

Modules§

rustls_impl
TLS implementation using the rustls crate.

Structs§

TlsConfig
TLS configuration options.

Enums§

TlsMode
TLS mode for the connection.