Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
Loading...
Searching...
No Matches
Compy_CryptoTlsOps Struct Reference

TLS operations provided by the compiled backend. More...

#include <crypto.h>

Data Fields

Compy_CryptoTlsCtx *(* ctx_new )(const char *cert_path, const char *key_path)
 Create a server TLS context from PEM cert and key files.
 
void(* ctx_free )(Compy_CryptoTlsCtx *ctx)
 Free a TLS context.
 
Compy_CryptoTlsConn *(* accept )(Compy_CryptoTlsCtx *ctx, int fd)
 Perform server-side TLS handshake on fd.
 
void(* conn_free )(Compy_CryptoTlsConn *conn)
 Free a TLS connection.
 
ssize_t(* write )(Compy_CryptoTlsConn *conn, const void *data, size_t len)
 Write plaintext data through TLS.
 
ssize_t(* read )(Compy_CryptoTlsConn *conn, void *buf, size_t len)
 Read decrypted data from TLS.
 
int(* shutdown )(Compy_CryptoTlsConn *conn)
 Graceful TLS shutdown.
 
size_t(* pending )(Compy_CryptoTlsConn *conn)
 Bytes buffered internally by the TLS library (for filled()).
 

Detailed Description

TLS operations provided by the compiled backend.

Field Documentation

◆ accept

Compy_CryptoTlsConn *(* Compy_CryptoTlsOps::accept) (Compy_CryptoTlsCtx *ctx, int fd)

Perform server-side TLS handshake on fd.

Returns NULL on failure.

◆ read

ssize_t(* Compy_CryptoTlsOps::read) (Compy_CryptoTlsConn *conn, void *buf, size_t len)

Read decrypted data from TLS.

Returns bytes read, 0 on EOF, -1 on error.

◆ shutdown

int(* Compy_CryptoTlsOps::shutdown) (Compy_CryptoTlsConn *conn)

Graceful TLS shutdown.

Returns 0 on success.

◆ write

ssize_t(* Compy_CryptoTlsOps::write) (Compy_CryptoTlsConn *conn, const void *data, size_t len)

Write plaintext data through TLS.

Returns bytes written or -1.


The documentation for this struct was generated from the following file: