Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
tls_config_set_protocols, tls_config_parse_protocols, tls_config_set_alpn, tls_config_set_ciphers, tls_config_set_dheparams, tls_config_set_ecdhecurves, tls_config_prefer_ciphers_client, tls_config_prefer_ciphers_server — TLS protocol and cipher selectionSYNOPSIS
#include <tls.h>tls_config_set_protocols(struct tls_config *config, uint32_t protocols);
tls_config_parse_protocols(uint32_t *protocols, const char *protostr);
tls_config_set_alpn(struct tls_config *config, const char *alpn);
tls_config_set_ciphers(struct tls_config *config, const char *ciphers);
tls_config_set_dheparams(struct tls_config *config, const char *params);
tls_config_set_ecdhecurves(struct tls_config *config, const char *curves);
tls_config_prefer_ciphers_client(struct tls_config *config);
tls_config_prefer_ciphers_server(struct tls_config *config);
DESCRIPTION
These functions modify a configuration by setting parameters. The configuration options apply to both clients and servers, unless noted otherwise.- TLS_PROTOCOL_TLSv1_2
- TLS_PROTOCOL_TLSv1_3
- tlsv1.2
- tlsv1.3
- all
- (all supported protocols)
- default
- (an alias for secure)
- legacy
- (an alias for all)
- secure
- (currently TLSv1.2 and TLSv1.3)
- secure (or alias default)
- compat
- legacy
- insecure (or alias all)
- none
- auto
- legacy
RETURN VALUES
These functions return 0 on success or -1 on error.SEE ALSO
tls_config_ocsp_require_stapling(3), tls_config_set_session_id(3), tls_config_verify(3), tls_init(3), tls_load_file(3)HISTORY
tls_config_set_ciphers() appeared in OpenBSD 5.6 and got its final name in OpenBSD 5.7.AUTHORS
<jsing@openbsd.org> with contributions from<tedu@openbsd.org> (tls_config_set_ciphers()) and
<reyk@openbsd.org> (tls_config_set_ecdhecurve())