Man page - tls_server(3)
Packages contas this manual
- tls_config_clear_keys(3)
- tls_config_set_ca_path(3)
- tls_accept_cbs(3)
- tls_peer_ocsp_cert_status(3)
- tls_accept_fds(3)
- tls_config_set_cert_mem(3)
- tls_unload_file(3)
- tls_configure(3)
- tls_config_prefer_ciphers_server(3)
- tls_config_set_keypair_ocsp_mem(3)
- tls_free(3)
- tls_connect_fds(3)
- tls_peer_cert_issuer(3)
- tls_config_free(3)
- tls_config_set_verify_depth(3)
- tls_config_set_cert_file(3)
- tls_ocsp_process_response(3)
- tls_peer_ocsp_revocation_time(3)
- tls_config_set_keypair_file(3)
- tls_config_add_keypair_ocsp_mem(3)
- tls_connect_socket(3)
- tls_config_set_ca_mem(3)
- tls_config_set_ecdhecurves(3)
- tls_config_parse_protocols(3)
- tls_config_add_ticket_key(3)
- tls_init(3)
- tls_config_verify_client_optional(3)
- tls_config_verify_client(3)
- tls_config_set_key_mem(3)
- tls_config_set_ocsp_staple_file(3)
- tls_config_set_alpn(3)
- tls_config_prefer_ciphers_client(3)
- tls_server(3)
- tls_config_set_crl_file(3)
- tls_peer_ocsp_crl_reason(3)
- tls_config_add_keypair_file(3)
- tls_conn_version(3)
- tls_config_set_ocsp_staple_mem(3)
- tls_peer_ocsp_next_update(3)
- tls_handshake(3)
- tls_read(3)
- tls_config_insecure_noverifycert(3)
- tls_config_set_protocols(3)
- tls_config_set_keypair_mem(3)
- tls_conn_cipher_strength(3)
- tls_connect(3)
- tls_peer_cert_notafter(3)
- tls_config_set_ca_file(3)
- tls_write(3)
- tls_peer_cert_hash(3)
- tls_connect_servername(3)
- tls_config_add_keypair_mem(3)
- tls_config_add_keypair_ocsp_file(3)
- tls_config_ocsp_require_stapling(3)
- tls_config_insecure_noverifyname(3)
- tls_peer_cert_subject(3)
- tls_conn_session_resumed(3)
- tls_config_set_session_fd(3)
- tls_conn_alpn_selected(3)
- tls_peer_ocsp_url(3)
- tls_close(3)
- tls_config_error(3)
- tls_conn_servername(3)
- tls_config_set_session_id(3)
- tls_config_set_ciphers(3)
- tls_config_insecure_noverifytime(3)
- tls_peer_ocsp_this_update(3)
- tls_connect_cbs(3)
- tls_conn_cipher(3)
- tls_peer_cert_notbefore(3)
- tls_peer_ocsp_response_status(3)
- tls_client(3)
- tls_peer_ocsp_result(3)
- tls_config_verify(3)
- tls_peer_cert_chain_pem(3)
- tls_config_set_crl_mem(3)
- tls_default_ca_cert_file(3)
- tls_config_new(3)
- tls_accept_socket(3)
- tls_config_set_dheparams(3)
- tls_config_set_session_lifetime(3)
- tls_config_set_keypair_ocsp_file(3)
- tls_peer_cert_contains_name(3)
- tls_load_file(3)
- tls_reset(3)
- tls_error(3)
- tls_peer_cert_provided(3)
- tls_config_set_key_file(3)
apt-get install libtls-dev
Manual
| TLS_CLIENT(3) | Library Functions Manual | TLS_CLIENT(3) |
NAME
tls_client,
tls_server, tls_configure,
tls_reset, tls_free —
configure a TLS connection
SYNOPSIS
#include
<tls.h>
struct tls *
tls_client(void);
struct tls *
tls_server(void);
int
tls_configure(struct tls *ctx,
struct tls_config *config);
void
tls_free(struct
tls *ctx);
void
tls_reset(struct
tls *ctx);
DESCRIPTION
A TLS connection is represented as a struct
tls object called a “context”. A new context is created
by either the
tls_client()
or
tls_server()
functions. tls_client() is used in TLS client
programs, tls_server() in TLS server programs.
The context can then be configured with the
function
tls_configure().
The same tls_config object can be used to configure
multiple contexts.
After configuration,
tls_connect(3) can be called on objects created with
tls_client(),
and tls_accept_socket(3) on objects created with
tls_server().
After use, a TLS context should be closed with
tls_close(3), and then freed by calling
tls_free().
If tls_free() is called with an argument of
NULL, no action occurs.
A TLS context can be reset by calling
tls_reset(),
allowing for it to be reused. This is essentially equivalent to calling
tls_free(), followed by a call to the same function
that was used to originally allocate the TLS context.
RETURN VALUES
tls_client() and
tls_server() return NULL on
error or an out of memory condition.
tls_configure() returns 0 on success or -1
on error.
SEE ALSO
tls_accept_socket(3), tls_config_new(3), tls_connect(3), tls_init(3)
HISTORY
These functions appeared in OpenBSD 5.6 and got their final names in OpenBSD 5.7.
AUTHORS
Joel Sing <jsing@openbsd.org>
| August 12, 2017 | Debian |