summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_get_session.3
diff options
context:
space:
mode:
authorbentley <>2014-10-12 09:33:04 +0000
committerbentley <>2014-10-12 09:33:04 +0000
commit82b7f378b6907ab315a6e50322d2a0a8794a0aa9 (patch)
treea5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_get_session.3
parent0a63f0cf49369e1926567ab62e04e3355cedf0cd (diff)
downloadopenbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.tar.gz
openbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.tar.bz2
openbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.zip
Convert libssl manpages from pod to mdoc(7).
libcrypto has not been started yet. ok schwarze@ miod@
Diffstat (limited to 'src/lib/libssl/doc/SSL_get_session.3')
-rw-r--r--src/lib/libssl/doc/SSL_get_session.394
1 files changed, 94 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_get_session.3 b/src/lib/libssl/doc/SSL_get_session.3
new file mode 100644
index 0000000000..fe9a6d48ef
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_get_session.3
@@ -0,0 +1,94 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_GET_SESSION 3
3.Os
4.Sh NAME
5.Nm SSL_get_session ,
6.Nm SSL_get0_session ,
7.Nm SSL_get1_session
8.Nd retrieve TLS/SSL session data
9.Sh SYNOPSIS
10.In openssl/ssl.h
11.Ft SSL_SESSION *
12SSL_get_session "const SSL *ssl"
13.Ft SSL_SESSION *
14SSL_get0_session "const SSL *ssl"
15.Ft SSL_SESSION *
16SSL_get1_session "SSL *ssl"
17.Sh DESCRIPTION
18.Fn SSL_get_session
19returns a pointer to the
20.Vt SSL_SESSION
21actually used in
22.Fa ssl .
23The reference count of the
24.Vt SSL_SESSION
25is not incremented, so that the pointer can become invalid by other operations.
26.Pp
27.Fn SSL_get0_session
28is the same as
29.Fn SSL_get_session .
30.Pp
31.Fn SSL_get1_session
32is the same as
33.Fn SSL_get_session ,
34but the reference count of the
35.Vt SSL_SESSION
36is incremented by one.
37.Sh NOTES
38The
39Fa ssl
40session contains all information required to re-establish the connection
41without a new handshake.
42.Pp
43.Fn SSL_get0_session
44returns a pointer to the actual session.
45As the reference counter is not incremented,
46the pointer is only valid while the connection is in use.
47If
48.Xr SSL_clear 3
49or
50.Xr SSL_free 3
51is called, the session may be removed completely (if considered bad),
52and the pointer obtained will become invalid.
53Even if the session is valid,
54it can be removed at any time due to timeout during
55.Xr SSL_CTX_flush_sessions 3 .
56.Pp
57If the data is to be kept,
58.Fn SSL_get1_session
59will increment the reference count, so that the session will not be implicitly
60removed by other operations but stays in memory.
61In order to remove the session
62.Xr SSL_SESSION_free 3
63must be explicitly called once to decrement the reference count again.
64.Pp
65.Vt SSL_SESSION
66objects keep internal link information about the session cache list when being
67inserted into one
68.Vt SSL_CTX
69object's session cache.
70One
71.Vt SSL_SESSION
72object, regardless of its reference count, must therefore only be used with one
73.Vt SSL_CTX
74object (and the
75.Vt SSL
76objects created from this
77.Vt SSL_CTX
78object).
79.Sh RETURN VALUES
80The following return values can occur:
81.Bl -tag -width Ds
82.It Dv NULL
83There is no session available in
84.Fa ssl .
85.It Pointer to an Vt SSL
86The return value points to the data of an
87.Vt SSL
88session.
89.El
90.Sh SEE ALSO
91.Xr ssl 3 ,
92.Xr SSL_clear 3 ,
93.Xr SSL_free 3 ,
94.Xr SSL_SESSION_free 3