tls
TLS 1.2 Client (Minimal)
Functions
| Function | Description |
|---|---|
_tls_copy | |
_tls_socket_tcp | |
_tls_connect_raw | |
_tls_send | |
_tls_recv | |
_tls_close | |
_tls_getrandom | |
tcp_connect | Connect to host:port via TCP. Returns socket fd or -1. |
_tls_build_client_hello | Internal: build TLS ClientHello message. |
tls_connect | Connect to host:port with TLS 1.2 handshake. Returns TLS context or 0 on fail… |
tls_write | Write data over TLS connection. Returns bytes written. Simplified: sends as T… |
tls_read | Read data from TLS connection. Returns bytes read. |
tls_close | Close TLS connection. |
Details
_tls_copy
fn _tls_copy(dst: &i8, doff: i64, src: &i8, soff: i64, n: i64)_tls_socket_tcp
fn _tls_socket_tcp() -> i64_tls_connect_raw
fn _tls_connect_raw(fd: i64, addr: &i8, len: i64) -> i64_tls_send
fn _tls_send(fd: i64, buf: &i8, len: i64) -> i64_tls_recv
fn _tls_recv(fd: i64, buf: &i8, max: i64) -> i64_tls_close
fn _tls_close(fd: i64) -> i64_tls_getrandom
fn _tls_getrandom(buf: &i8, n: i64) -> i64tcp_connect
fn tcp_connect(host: &i8, hlen: i64, port: i64) -> i64Connect to host:port via TCP. Returns socket fd or -1.
_tls_build_client_hello
fn _tls_build_client_hello(ctx: &i64, buf: &i8) -> i64Internal: build TLS ClientHello message.
tls_connect
fn tls_connect(host: &i8, hlen: i64, port: i64) -> &i64Connect to host:port with TLS 1.2 handshake. Returns TLS context or 0 on failure.
tls_write
fn tls_write(ctx: &i64, data: &i8, len: i64) -> i64Write data over TLS connection. Returns bytes written. Simplified: sends as TLS application data record (unencrypted for now).
tls_read
fn tls_read(ctx: &i64, buf: &i8, max: i64) -> i64Read data from TLS connection. Returns bytes read.
tls_close
fn tls_close(ctx: &i64)Close TLS connection.