diff options
| author | bentley <> | 2014-10-12 09:33:04 +0000 |
|---|---|---|
| committer | bentley <> | 2014-10-12 09:33:04 +0000 |
| commit | 78332233d01faa45e0bb0b1583d47cb5ad1ddc19 (patch) | |
| tree | a5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_CTX_add_session.3 | |
| parent | 4e737c824fafe5f105e5f4849a9db2569b5d53d8 (diff) | |
| download | openbsd-78332233d01faa45e0bb0b1583d47cb5ad1ddc19.tar.gz openbsd-78332233d01faa45e0bb0b1583d47cb5ad1ddc19.tar.bz2 openbsd-78332233d01faa45e0bb0b1583d47cb5ad1ddc19.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_CTX_add_session.3')
| -rw-r--r-- | src/lib/libssl/doc/SSL_CTX_add_session.3 | 87 |
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 | ||
| 22 | adds the session | ||
| 23 | .Fa c | ||
| 24 | to the context | ||
| 25 | .Fa ctx . | ||
| 26 | The reference count for session | ||
| 27 | .Fa c | ||
| 28 | is incremented by 1. | ||
| 29 | If a session with the same session id already exists, | ||
| 30 | the old session is removed by calling | ||
| 31 | .Xr SSL_SESSION_free 3 . | ||
| 32 | .Pp | ||
| 33 | .Fn SSL_CTX_remove_session | ||
| 34 | removes the session | ||
| 35 | .Fa c | ||
| 36 | from the context | ||
| 37 | .Fa ctx . | ||
| 38 | .Xr SSL_SESSION_free 3 | ||
| 39 | is called once for | ||
| 40 | .Fa c . | ||
| 41 | .Pp | ||
| 42 | .Fn SSL_add_session | ||
| 43 | and | ||
| 44 | .Fn SSL_remove_session | ||
| 45 | are synonyms for their | ||
| 46 | .Fn SSL_CTX_* | ||
| 47 | counterparts. | ||
| 48 | .Sh NOTES | ||
| 49 | When adding a new session to the internal session cache, it is examined | ||
| 50 | whether a session with the same session id already exists. | ||
| 51 | In this case it is assumed that both sessions are identical. | ||
| 52 | If the same session is stored in a different | ||
| 53 | .Vt SSL_SESSION | ||
| 54 | object, the old session is removed and replaced by the new session. | ||
| 55 | If the session is actually identical (the | ||
| 56 | .Vt SSL_SESSION | ||
| 57 | object is identical), | ||
| 58 | .Fn SSL_CTX_add_session | ||
| 59 | is a no-op, and the return value is 0. | ||
| 60 | .Pp | ||
| 61 | If a server | ||
| 62 | .Vt SSL_CTX | ||
| 63 | is configured with the | ||
| 64 | .Dv SSL_SESS_CACHE_NO_INTERNAL_STORE | ||
| 65 | flag then the internal cache will not be populated automatically by new | ||
| 66 | sessions negotiated by the SSL/TLS implementation, even though the internal | ||
| 67 | cache will be searched automatically for session-resume requests (the | ||
| 68 | latter can be suppressed by | ||
| 69 | .Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP ) . | ||
| 70 | So the application can use | ||
| 71 | .Fn SSL_CTX_add_session | ||
| 72 | directly to have full control over the sessions that can be resumed if desired. | ||
| 73 | .Sh RETURN VALUES | ||
| 74 | The following values are returned by all functions: | ||
| 75 | .Bl -tag -width Ds | ||
| 76 | .It 0 | ||
| 77 | The operation failed. | ||
| 78 | In case of the add operation, it was tried to add the same (identical) session | ||
| 79 | twice. | ||
| 80 | In case of the remove operation, the session was not found in the cache. | ||
| 81 | .It 1 | ||
| 82 | The 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 | ||
