diff options
author | bentley <> | 2014-10-12 09:33:04 +0000 |
---|---|---|
committer | bentley <> | 2014-10-12 09:33:04 +0000 |
commit | 82b7f378b6907ab315a6e50322d2a0a8794a0aa9 (patch) | |
tree | a5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_get_session.3 | |
parent | 0a63f0cf49369e1926567ab62e04e3355cedf0cd (diff) | |
download | openbsd-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.3 | 94 |
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 * | ||
12 | SSL_get_session "const SSL *ssl" | ||
13 | .Ft SSL_SESSION * | ||
14 | SSL_get0_session "const SSL *ssl" | ||
15 | .Ft SSL_SESSION * | ||
16 | SSL_get1_session "SSL *ssl" | ||
17 | .Sh DESCRIPTION | ||
18 | .Fn SSL_get_session | ||
19 | returns a pointer to the | ||
20 | .Vt SSL_SESSION | ||
21 | actually used in | ||
22 | .Fa ssl . | ||
23 | The reference count of the | ||
24 | .Vt SSL_SESSION | ||
25 | is not incremented, so that the pointer can become invalid by other operations. | ||
26 | .Pp | ||
27 | .Fn SSL_get0_session | ||
28 | is the same as | ||
29 | .Fn SSL_get_session . | ||
30 | .Pp | ||
31 | .Fn SSL_get1_session | ||
32 | is the same as | ||
33 | .Fn SSL_get_session , | ||
34 | but the reference count of the | ||
35 | .Vt SSL_SESSION | ||
36 | is incremented by one. | ||
37 | .Sh NOTES | ||
38 | The | ||
39 | Fa ssl | ||
40 | session contains all information required to re-establish the connection | ||
41 | without a new handshake. | ||
42 | .Pp | ||
43 | .Fn SSL_get0_session | ||
44 | returns a pointer to the actual session. | ||
45 | As the reference counter is not incremented, | ||
46 | the pointer is only valid while the connection is in use. | ||
47 | If | ||
48 | .Xr SSL_clear 3 | ||
49 | or | ||
50 | .Xr SSL_free 3 | ||
51 | is called, the session may be removed completely (if considered bad), | ||
52 | and the pointer obtained will become invalid. | ||
53 | Even if the session is valid, | ||
54 | it can be removed at any time due to timeout during | ||
55 | .Xr SSL_CTX_flush_sessions 3 . | ||
56 | .Pp | ||
57 | If the data is to be kept, | ||
58 | .Fn SSL_get1_session | ||
59 | will increment the reference count, so that the session will not be implicitly | ||
60 | removed by other operations but stays in memory. | ||
61 | In order to remove the session | ||
62 | .Xr SSL_SESSION_free 3 | ||
63 | must be explicitly called once to decrement the reference count again. | ||
64 | .Pp | ||
65 | .Vt SSL_SESSION | ||
66 | objects keep internal link information about the session cache list when being | ||
67 | inserted into one | ||
68 | .Vt SSL_CTX | ||
69 | object's session cache. | ||
70 | One | ||
71 | .Vt SSL_SESSION | ||
72 | object, regardless of its reference count, must therefore only be used with one | ||
73 | .Vt SSL_CTX | ||
74 | object (and the | ||
75 | .Vt SSL | ||
76 | objects created from this | ||
77 | .Vt SSL_CTX | ||
78 | object). | ||
79 | .Sh RETURN VALUES | ||
80 | The following return values can occur: | ||
81 | .Bl -tag -width Ds | ||
82 | .It Dv NULL | ||
83 | There is no session available in | ||
84 | .Fa ssl . | ||
85 | .It Pointer to an Vt SSL | ||
86 | The return value points to the data of an | ||
87 | .Vt SSL | ||
88 | session. | ||
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 | ||