summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_CTX_add_session.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_CTX_add_session.3')
-rw-r--r--src/lib/libssl/doc/SSL_CTX_add_session.387
1 files changed, 87 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_CTX_add_session.3 b/src/lib/libssl/doc/SSL_CTX_add_session.3
new file mode 100644
index 0000000000..74b4481496
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_CTX_add_session.3
@@ -0,0 +1,87 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_CTX_ADD_SESSION 3
3.Os
4.Sh NAME
5.Nm SSL_CTX_add_session ,
6.Nm SSL_add_session ,
7.Nm SSL_CTX_remove_session ,
8.Nm SSL_remove_session
9.Nd manipulate session cache
10.Sh SYNOPSIS
11.In openssl/ssl.h
12.Ft int
13.Fn SSL_CTX_add_session "SSL_CTX *ctx" "SSL_SESSION *c"
14.Ft int
15.Fn SSL_add_session "SSL_CTX *ctx" "SSL_SESSION *c"
16.Ft int
17.Fn SSL_CTX_remove_session "SSL_CTX *ctx" "SSL_SESSION *c"
18.Ft int
19.Fn SSL_remove_session "SSL_CTX *ctx" "SSL_SESSION *c"
20.Sh DESCRIPTION
21.Fn SSL_CTX_add_session
22adds the session
23.Fa c
24to the context
25.Fa ctx .
26The reference count for session
27.Fa c
28is incremented by 1.
29If a session with the same session id already exists,
30the old session is removed by calling
31.Xr SSL_SESSION_free 3 .
32.Pp
33.Fn SSL_CTX_remove_session
34removes the session
35.Fa c
36from the context
37.Fa ctx .
38.Xr SSL_SESSION_free 3
39is called once for
40.Fa c .
41.Pp
42.Fn SSL_add_session
43and
44.Fn SSL_remove_session
45are synonyms for their
46.Fn SSL_CTX_*
47counterparts.
48.Sh NOTES
49When adding a new session to the internal session cache, it is examined
50whether a session with the same session id already exists.
51In this case it is assumed that both sessions are identical.
52If the same session is stored in a different
53.Vt SSL_SESSION
54object, the old session is removed and replaced by the new session.
55If the session is actually identical (the
56.Vt SSL_SESSION
57object is identical),
58.Fn SSL_CTX_add_session
59is a no-op, and the return value is 0.
60.Pp
61If a server
62.Vt SSL_CTX
63is configured with the
64.Dv SSL_SESS_CACHE_NO_INTERNAL_STORE
65flag then the internal cache will not be populated automatically by new
66sessions negotiated by the SSL/TLS implementation, even though the internal
67cache will be searched automatically for session-resume requests (the
68latter can be suppressed by
69.Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP ) .
70So the application can use
71.Fn SSL_CTX_add_session
72directly to have full control over the sessions that can be resumed if desired.
73.Sh RETURN VALUES
74The following values are returned by all functions:
75.Bl -tag -width Ds
76.It 0
77The operation failed.
78In case of the add operation, it was tried to add the same (identical) session
79twice.
80In case of the remove operation, the session was not found in the cache.
81.It 1
82The operation succeeded.
83.El
84.Sh SEE ALSO
85.Xr ssl 3 ,
86.Xr SSL_CTX_set_session_cache_mode 3 ,
87.Xr SSL_SESSION_free 3