table of contents
- buster 1:21.2.6+dfsg-1
- testing 1:23.2.6+dfsg-1
- unstable 1:23.2.6+dfsg-1
- experimental 1:24.0.5+dfsg-1
ssl_session_cache_api(3erl) | Erlang Module Definition | ssl_session_cache_api(3erl) |
NAME¶
ssl_session_cache_api - TLS session cache APIDESCRIPTION¶
Defines the API for the TLS session cache so that the data storage scheme can be replaced by defining a new callback module implementing this API.DATA TYPES¶
The following data types are used in the functions for ssl_session_cache_api:- cache_ref() =:
- opaque()
- key() =:
- {partialkey(), session_id()}
- partialkey() =:
- opaque()
- session_id() =:
- binary()
- session() =:
- opaque()
EXPORTS¶
delete(Cache, Key) -> _Types:
Key = key()
Deletes a cache entry. Is only called from the cache handling process.
foldl(Fun, Acc0, Cache) -> Acc
Types:
Calls Fun(Elem, AccIn) on successive elements of the cache, starting with AccIn == Acc0. Fun/2 must return a new accumulator, which is passed to the next call. The function returns the final value of the accumulator. Acc0 is returned if the cache is empty.
init(Args) -> opaque()
Types:
Includes property {role, client | server}. Currently this is the only predefined property, there can also be user-defined properties. See also application environment variable session_cb_init_args.
Performs possible initializations of the cache and returns a reference to it that is used as parameter to the other API functions. Is called by the cache handling processes init function, hence putting the same requirements on it as a normal process init function. This function is called twice when starting the SSL application, once with the role client and once with the role server, as the SSL application must be prepared to take on both roles.
lookup(Cache, Key) -> Entry
Types:
Key = key()
Entry = session() | undefined
Looks up a cache entry. Is to be callable from any process.
select_session(Cache, PartialKey) -> [session()]
Types:
PartialKey = partialkey()
Session = session()
Selects sessions that can be reused. Is to be callable from any process.
size(Cache) -> integer()
Types:
Returns the number of sessions in the cache. If size exceeds the maximum number of sessions, the current cache entries will be invalidated regardless of their remaining lifetime. Is to be callable from any process.
terminate(Cache) -> _
Types:
Takes care of possible cleanup that is needed when the cache handling process terminates.
update(Cache, Key, Session) -> _
Types:
Key = key()
Session = session()
Caches a new session or updates an already cached one. Is only called from the cache handling process.
ssl 9.1.2 | Ericsson AB |