ssl(7)
β¨ NAME β¨
ssl β the Erlang application that gives you secure communication over sockets, no cap π«Ά
πΈ DESCRIPTION πΈ
bestie. the ssl application is literally an implementation of the SSL, TLS and DTLS protocols, all up in Erlang. it's giving cryptography main character energy π₯
for the current statement of standards compliance, go check the User's Guide, okay? π
π¦ DEPENDENCIES π¦
the SSL application uses the public_key, asn1 and Crypto application to handle public keys and encryption β so yeah, these applications must be loaded for the SSL application to work. it's a whole friend group, they don't function without each other π
in an embedded environment this means they must be started with application:start/[1,2] before the SSL application is started. order matters, periodt π
π CONFIGURATION π
the application environment configuration parameters in this section are defined for the SSL application. for more info about configuration parameters, see the application(3erl) manual page in Kernel β¨
the environment parameters can be set on the command line, for example:
erl -ssl protocol_version "['tlsv1.2', 'tlsv1.1']"
okay now the options, one by one, all of them, don't scroll past, i know you want to π
protocol_version = ssl:tls_version() | [ssl:tls_version()] <optional>β the protocol supported by started clients and servers. if this option is not set, it defaults to all TLS protocols currently supported, more might be configurable, by the SSL application. this option can be overridden by theversionoption tossl:connect/[2,3]andssl:listen/2πdtls_protocol_version = ssl:dtls_version() | [ssl:dtls_version()] <optional>β the protocol supported by started clients and servers. if this option is not set, it defaults to all DTLS protocols currently supported, more might be configurable, by the SSL application. this option can be overridden by theversionoption tossl:connect/[2,3]andssl:listen/2πsession_lifetime = integer() <optional>β maximum lifetime of the session data in seconds. defaults to 24 hours, which is the maximum recommended lifetime by RFC 5246. however sessions may be invalidated earlier due to the maximum limitation of the session cache table. so like, don't get too attached π₯²session_cb = atom() <optional>β Deprecated Since OTP-23.3, replaced byclient_session_cbandserver_session_cb. it's giving "we don't do that anymore" πclient_session_cb = atom() <optional>β Since OTP-23.3. name client of the session cache callback module that implements thessl_session_cache_apibehavior. defaults tossl_client_session_cache_dbβ¨server_session_cb = atom() <optional>β Since OTP-23.3. name of the server session cache callback module that implements thessl_session_cache_apibehavior. defaults tossl_server_session_cache_dbβ¨session_cb_init_args = proplist:proplist() <optional>β Deprecated Since OTP-23.3, replaced byclient_session_cb_init_argsandserver_session_cb_init_argsπclient_session_cb_init_args = proplist:proplist() <optional>β list of extra user-defined arguments to theinitfunction in the session cache callback module. defaults to[]πΈserver_session_cb_init_args = proplist:proplist() <optional>β list of extra user-defined arguments to theinitfunction in the session cache callback module. defaults to[]πΈsession_cache_client_max = integer() <optional>β limits the growth of the clients session cache, that is how many sessions towards servers that are cached to be used by new client connections. if the maximum number of sessions is reached, the current cache entries will be invalidated regardless of their remaining lifetime. defaults to1000. recommended ssl-8.2.1 or later for this option to work as intended πsession_cache_server_max = integer() <optional>β limits the growth of the servers session cache, that is how many client sessions are cached by the server. if the maximum number of sessions is reached, the current cache entries will be invalidated regardless of their remaining lifetime. defaults to1000. recommended ssl-8.2.1 or later for this option to work as intended πssl_pem_cache_clean = integer() <optional>β number of milliseconds between PEM cache validations. defaults to 2 minutes β°
Note: the cache can be reloaded by calling ssl:clear_pem_cache/0.
bypass_pem_cache = boolean() <optional>β introduced in ssl-8.0.2. disables the PEM-cache. can be used as a workaround for the PEM-cache bottleneck before ssl-8.1.1. defaults tofalseπalert_timeout = integer() <optional>β number of milliseconds between sending of a fatal alert and closing the connection. waiting a little while improves the peers chances to properly receiving the alert so it may shutdown gracefully. defaults to5000milliseconds. be polite, let them say goodbye π₯Ίinternal_active_n = integer() <optional>β for TLS connections this value is used to handle the internal socket. as the implementation was changed from an active once to an active N behavior (N =100), for performance reasons, this option exist for possible tweaking or restoring of the old behavior (internal_active_n = 1) in unforeseen scenarios. the option will not affect erlang distribution over TLS that will always run in active N mode. added in ssl-9.1 (OTP-21.2) π§server_session_tickets_amount = integer() <optional>β number of session tickets sent by the server. it must be greater than0. defaults to3ποΈserver_session_ticket_lifetime = integer() <optional>β lifetime of session tickets sent by the server. servers must not use any value greater than604800seconds (7 days). expired tickets are automatically removed. defaults to7200seconds (2 hours) β³server_session_ticket_store_size = integer() <optional>β sets the maximum size of the server session ticket store (stateful tickets). defaults to1000. size limit is enforced by dropping old tickets ποΈserver_session_ticket_max_early_data = integer() <optional>β sets the maximum size of the early data that the server accepts and also configures its NewSessionTicket messages to include this same size limit in their early_data_indication extension. defaults to16384. size limit is enforced by both client and server π€client_session_ticket_lifetime = integer() <optional>β lifetime of session tickets in the client ticket store. expired tickets are automatically removed. defaults to7200seconds (2 hours) β³client_session_ticket_store_size = integer() <optional>β sets the maximum size of the client session ticket store. defaults to1000. size limit is enforced by dropping old tickets ποΈ
π ERROR LOGGER AND EVENT HANDLERS π
the SSL application uses OTP logger, bestie. TLS/DTLS alerts are logged on notice level. unexpected errors are logged on error level. these log entries will by default end up in the default Erlang log π
the option log_level may be used to in run-time to set the log level of a specific TLS connection, which is handy when you want to use level debug to inspect the TLS handshake setup. literally so useful for snooping on your handshake drama πβ¨
π SEE ALSO π
and that's the whole page, bestie!! this one ships from Ericsson AB, it's ssl version 10.9.1.3, and it lives in section ssl(7) of the manual. go forth and be secure ππ¦πβ¨π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms