1 .\" $OpenBSD: tls_config_set_session_id.3,v 1.3 2017/01/28 00:59:36 schwarze Exp $
3 .\" Copyright (c) 2017 Claudio Jeker <claudio@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: January 28 2017 $
18 .Dt TLS_CONFIG_SET_SESSION_ID 3
21 .Nm tls_config_set_session_id ,
22 .Nm tls_config_set_session_lifetime ,
23 .Nm tls_config_add_ticket_key
24 .Nd configure resuming of TLS handshakes
28 .Fo tls_config_set_session_id
29 .Fa "struct tls_config *config"
30 .Fa "const unsigned char *session_id"
34 .Fo tls_config_set_session_lifetime
35 .Fa "struct tls_config *config"
39 .Fo tls_config_add_ticket_key
40 .Fa "struct tls_config *config"
42 .Fa "unsigned char *key"
46 .Fn tls_config_set_session_id
47 sets the session identifier that will be used by the TLS server when
49 By default a random value is used.
51 .Fn tls_config_set_session_lifetime
52 sets the lifetime to be used for TLS sessions.
53 Session support is disabled if a lifetime of zero is specified, which is the
56 .Fn tls_config_add_ticket_key
57 adds a key used for the encryption and authentication of TLS tickets.
58 By default keys are generated and rotated automatically based on their lifetime.
59 This function should only be used to synchronise ticket encryption key across
61 Re-adding a known key will result in an error, unless it is the most recently
64 These functions return 0 on success or -1 on error.
66 .Xr tls_accept_socket 3 ,
67 .Xr tls_config_set_protocols 3 ,
72 These functions appeared in
75 .An Claudio Jeker Aq Mt claudio@openbsd.org