|
Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
|
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()). | |
| int(* | ctx_set_cipher_preference )(Compy_CryptoTlsCtx *ctx, int pref) |
| Apply a ciphersuite preference preset to the context. | |
TLS operations provided by the compiled backend.
| Compy_CryptoTlsConn *(* Compy_CryptoTlsOps::accept) (Compy_CryptoTlsCtx *ctx, int fd) |
Perform server-side TLS handshake on fd.
Returns NULL on failure.
| int(* Compy_CryptoTlsOps::ctx_set_cipher_preference) (Compy_CryptoTlsCtx *ctx, int pref) |
Apply a ciphersuite preference preset to the context.
Optional: backends that leave this NULL signal that cipher preference is unsupported. The pref value is a Compy_TlsCipherPreference cast to int; kept as int here so this private header does not depend on the public tls.h enum for ABI stability.
Must be callable before the first accept() on the context. Returns 0 on success, -1 on unknown preset or backend error.
| 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.
| int(* Compy_CryptoTlsOps::shutdown) (Compy_CryptoTlsConn *conn) |
Graceful TLS shutdown.
Returns 0 on success.
| ssize_t(* Compy_CryptoTlsOps::write) (Compy_CryptoTlsConn *conn, const void *data, size_t len) |
Write plaintext data through TLS.
Returns bytes written or -1.