1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
.\" $OpenBSD: SSL_SESSION_new.3,v 1.2 2017/04/10 15:37:55 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 10 2017 $
.Dt SSL_SESSION_NEW 3
.Os
.Sh NAME
.Nm SSL_SESSION_new
.Nd construct a new SSL_SESSION object
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft SSL_SESSION *
.Fn SSL_SESSION_new void
.Sh DESCRIPTION
.Fn SSL_SESSION_new
allocates and initializes an new
.Vt SSL_SESSION
object.
The reference count is set to 1, the time to the current time, and
the timeout to five minutes.
.Pp
When the object is no longer needed, it can be destructed with
.Xr SSL_SESSION_free 3 .
.Pp
.Fn SSL_SESSION_new
is used internally, for example by
.Xr SSL_connect 3 .
.Sh RETURN VALUES
.Fn SSL_SESSION_new
returns the new
.Vt SSL_SESSION
object or
.Dv NULL
if insufficient memory is available.
.Pp
After failure,
.Xr ERR_get_error 3
returns
.Dv ERR_R_MALLOC_FAILURE .
.Sh SEE ALSO
.Xr d2i_SSL_SESSION 3 ,
.Xr PEM_read_SSL_SESSION 3 ,
.Xr SSL_connect 3 ,
.Xr SSL_copy_session_id 3 ,
.Xr SSL_CTX_add_session 3 ,
.Xr SSL_CTX_sess_set_get_cb 3 ,
.Xr SSL_get_session 3 ,
.Xr SSL_SESSION_free 3 ,
.Xr SSL_SESSION_get0_peer 3 ,
.Xr SSL_SESSION_get_compress_id 3 ,
.Xr SSL_SESSION_get_ex_new_index 3 ,
.Xr SSL_SESSION_get_id 3 ,
.Xr SSL_SESSION_get_time 3 ,
.Xr SSL_SESSION_print 3 ,
.Xr SSL_SESSION_set1_id_context 3 ,
.Xr SSL_set_session 3
|