|SSL_CTX_SET_TLSEXT_USE_SRTP(3)||Library Functions Manual||SSL_CTX_SET_TLSEXT_USE_SRTP(3)|
Configure and query SRTP support
*ctx, const char *profiles);
*ssl, const char *profiles);
SRTP is the Secure Real-Time Transport Protocol. OpenSSL implements support for the "use_srtp" DTLS extension defined in RFC5764. This provides a mechanism for establishing SRTP keying material, algorithms and parameters using DTLS. This capability may be used as part of an implementation that conforms to RFC5763. OpenSSL does not implement SRTP itself or RFC5763. Note that OpenSSL does not support the use of SRTP Master Key Identifiers (MKIs). Also note that this extension is only supported in DTLS. Any SRTP configuration is ignored if a TLS connection is attempted.
An OpenSSL client wishing to send the "use_srtp"
extension should call
to set its use for all SSL objects subsequently
created from ctx. Alternatively a client may call
SSL_set_tlsext_use_srtp() to set its use for an
individual SSL object. The
profiles parameter should point to a NUL-terminated,
colon delimited list of SRTP protection profile names.
The currently supported protection profile names are:
Supplying an unrecognised protection profile name results in an error.
An OpenSSL server wishing to support the "use_srtp"
extension should also call
SSL_set_tlsext_use_srtp() to indicate the protection
profiles that it is willing to negotiate.
The currently configured list of protection profiles for either a
client or a server can be obtained by calling
SSL_get_srtp_profiles(). This returns a stack of
SRTP_PROTECTION_PROFILE objects. The memory pointed to
in the return value of this function should not be freed by the caller.
After a handshake has been completed, the negotiated SRTP
protection profile (if any) can be obtained (on the client or the server) by
NULL if no SRTP protection profile
was negotiated. The memory returned from this function should not be freed
by the caller.
If an SRTP protection profile has been successfully negotiated,
then the SRTP keying material (on both the client and server) should be
obtained by calling
with a label of “EXTRACTOR-dtls_srtp”, a
NULL, and a
use_context argument of 0. The total length of keying
material obtained should be equal to two times the sum of the master key
length and the salt length as defined for the protection profile in use.
This provides the client write master key, the server write master key, the
client write master salt and the server write master salt in that order.
Contrary to OpenSSL conventions,
SSL_set_tlsext_use_srtp() return 0 on success or 1
SSL_get_srtp_profiles() returns a stack of
SRTP_PROTECTION_PROFILE objects on success or
NULL on error or if no protection profiles have been
SSL_get_selected_srtp_profile() returns a
pointer to an SRTP_PROTECTION_PROFILE object if one
has been negotiated or
These functions first appeared in OpenSSL 1.0.1 and have been available since OpenBSD 5.3.
|June 12, 2019||OpenBSD-current|