Skip to main content

Module utils

Module utils 

Source

Structs§

ClientCertPaths
Client certificate and key paths for mTLS authentication
TlsFilePaths

Functions§

build_client_cert_with_custom_cn
Build a client certificate with a custom common name (CN) field Redis 8.6+ allows certificate-based authentication where the common name (CN) is mapped to an ACL username
build_keys_and_certs_for_tls
build_keys_and_certs_for_tls_ext
get_listener_on_free_port
get_random_available_port
Finds a random open port available for listening at, by spawning a TCP server with port “zero” (which prompts the OS to just use any available port). Between calling this function and trying to bind to this port, the port may be given to another process, so this must be used with care (since here we only use it for tests, it’s mostly okay).