API reference Dodo 0.1.4

std/tls/openssl

Public declarations, types, methods, and source contracts for std/tls/openssl.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/tls/openssl"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
io std/io openssl.dodo
native std/tls/native openssl.dodo
ptr core/ptr openssl.dodo
tls std/tls openssl.dodo

Config

Struct · Source

All configuration bytes are copied/parsed during construction. PEM key bytes remain the caller’s secret and must be wiped by the caller when appropriate.

pub struct Config {
    pub hostname: &[u8]
    pub trust_pem: &[u8]
    pub certificate_pem: &[u8]
    pub private_key_pem: &[u8]
    // RFC 7301 wire format: one-byte length followed by protocol bytes.
    pub alpn: &[u8]
    pub system_roots: bool
    pub require_client_certificate: bool
    // -1 uses the backend's platform wall clock; >=0 is explicit Unix seconds.
    pub verification_time: i64
}

Config.client

Function · Source

pub fn client(hostname: &[u8]) -> Config from(hostname)

Config.server

Function · Source

pub fn server(certificate: &[u8], key: &[u8]) -> Config from(certificate, key)

Engine

Struct · Source

Owns context, certificate/key references, SSL session, two 32KiB ciphertext rings and a 16KiB plaintext retry buffer. No borrowed configuration survives. Deliberately not Send/Sync: serialize all calls on the owning execution lane.

pub struct Engine {
    // Private implementation fields omitted.
}

Engine.client

Function · Source

pub fn client(config: &Config) -> Engine!tls.Error

Engine.server

Function · Source

pub fn server(config: &Config) -> Engine!tls.Error

Engine.handshake

Function · Source

pub fn handshake(&mut self) -> tls.State!tls.Error

Engine.feed

Function · Source

pub fn feed(&mut self, source: &[u8]) -> usize!tls.Error

Engine.drain

Function · Source

pub fn drain(&mut self, destination: &mut[u8]) -> usize!tls.Error

Engine.read_plain

Function · Source

pub fn read_plain(&mut self, destination: &mut[u8]) -> tls.Progress!tls.Error

Engine.write_plain

Function · Source

pub fn write_plain(&mut self, source: &[u8]) -> tls.Progress!tls.Error

Engine.flush

Function · Source

pub fn flush(&mut self) -> tls.State!tls.Error

Engine.shutdown

Function · Source

pub fn shutdown(&mut self) -> tls.State!tls.Error

Engine.eof

Function · Source

pub fn eof(&mut self)

Engine.selected_alpn

Function · Source

pub fn selected_alpn(&self, destination: &mut[u8]) -> usize!tls.Error

Engine.abort

Function · Source

Immediate abort, no I/O. Idempotent; all later operations fail Closed.

pub fn abort(&mut self)

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?