ssl(7)

πŸ“¦
version 25.3.2.8 Β· 4 versions
, in ubuntu noble

✨ 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 the version option to ssl:connect/[2,3] and ssl: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 the version option to ssl:connect/[2,3] and ssl: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 by client_session_cb and server_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 the ssl_session_cache_api behavior. defaults to ssl_client_session_cache_db ✨
  • server_session_cb = atom() <optional> β€” Since OTP-23.3. name of the server session cache callback module that implements the ssl_session_cache_api behavior. defaults to ssl_server_session_cache_db ✨
  • session_cb_init_args = proplist:proplist() <optional> β€” Deprecated Since OTP-23.3, replaced by client_session_cb_init_args and server_session_cb_init_args πŸ’€
  • client_session_cb_init_args = proplist:proplist() <optional> β€” list of extra user-defined arguments to the init function in the session cache callback module. defaults to [] 🌸
  • server_session_cb_init_args = proplist:proplist() <optional> β€” list of extra user-defined arguments to the init function 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 to 1000. 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 to 1000. 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 to false πŸ™ˆ
  • 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 to 5000 milliseconds. 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 than 0. defaults to 3 🎟️
  • server_session_ticket_lifetime = integer() <optional> β€” lifetime of session tickets sent by the server. servers must not use any value greater than 604800 seconds (7 days). expired tickets are automatically removed. defaults to 7200 seconds (2 hours) ⏳
  • server_session_ticket_store_size = integer() <optional> β€” sets the maximum size of the server session ticket store (stateful tickets). defaults to 1000. 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 to 16384. 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 to 7200 seconds (2 hours) ⏳
  • client_session_ticket_store_size = integer() <optional> β€” sets the maximum size of the client session ticket store. defaults to 1000. 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