1SSL_CTX_SET_TLSEXT_USE_SRTP(3)      OpenSSL     SSL_CTX_SET_TLSEXT_USE_SRTP(3)
2
3
4

NAME

6       SSL_CTX_set_tlsext_use_srtp, SSL_set_tlsext_use_srtp,
7       SSL_get_srtp_profiles, SSL_get_selected_srtp_profile - Configure and
8       query SRTP support
9

SYNOPSIS

11        #include <openssl/srtp.h>
12
13        int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles);
14        int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles);
15
16        STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl);
17        SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s);
18

DESCRIPTION

20       SRTP is the Secure Real-Time Transport Protocol. OpenSSL implements
21       support for the "use_srtp" DTLS extension defined in RFC5764. This
22       provides a mechanism for establishing SRTP keying material, algorithms
23       and parameters using DTLS. This capability may be used as part of an
24       implementation that conforms to RFC5763.  OpenSSL does not implement
25       SRTP itself or RFC5763. Note that OpenSSL does not support the use of
26       SRTP Master Key Identifiers (MKIs). Also note that this extension is
27       only supported in DTLS. Any SRTP configuration will be ignored if a TLS
28       connection is attempted.
29
30       An OpenSSL client wishing to send the "use_srtp" extension should call
31       SSL_CTX_set_tlsext_use_srtp() to set its use for all SSL objects
32       subsequently created from an SSL_CTX. Alternatively a client may call
33       SSL_set_tlsext_use_srtp() to set its use for an individual SSL object.
34       The profiles parameters should point to a NUL-terminated, colon
35       delimited list of SRTP protection profile names.
36
37       The currently supported protection profile names are:
38
39       SRTP_AES128_CM_SHA1_80
40           This corresponds to SRTP_AES128_CM_HMAC_SHA1_80 defined in RFC5764.
41
42       SRTP_AES128_CM_SHA1_32
43           This corresponds to SRTP_AES128_CM_HMAC_SHA1_32 defined in RFC5764.
44
45       SRTP_AEAD_AES_128_GCM
46           This corresponds to the profile of the same name defined in
47           RFC7714.
48
49       SRTP_AEAD_AES_256_GCM
50           This corresponds to the profile of the same name defined in
51           RFC7714.
52
53       Supplying an unrecognised protection profile name will result in an
54       error.
55
56       An OpenSSL server wishing to support the "use_srtp" extension should
57       also call SSL_CTX_set_tlsext_use_srtp() or SSL_set_tlsext_use_srtp() to
58       indicate the protection profiles that it is willing to negotiate.
59
60       The currently configured list of protection profiles for either a
61       client or a server can be obtained by calling SSL_get_srtp_profiles().
62       This returns a stack of SRTP_PROTECTION_PROFILE objects. The memory
63       pointed to in the return value of this function should not be freed by
64       the caller.
65
66       After a handshake has been completed the negotiated SRTP protection
67       profile (if any) can be obtained (on the client or the server) by
68       calling SSL_get_selected_srtp_profile(). This function will return NULL
69       if no SRTP protection profile was negotiated. The memory returned from
70       this function should not be freed by the caller.
71
72       If an SRTP protection profile has been successfully negotiated then the
73       SRTP keying material (on both the client and server) should be obtained
74       via a call to SSL_export_keying_material(3). This call should provide a
75       label value of "EXTRACTOR-dtls_srtp" and a NULL context value
76       (use_context is 0). The total length of keying material obtained should
77       be equal to two times the sum of the master key length and the salt
78       length as defined for the protection profile in use. This provides the
79       client write master key, the server write master key, the client write
80       master salt and the server write master salt in that order.
81

RETURN VALUES

83       SSL_CTX_set_tlsext_use_srtp() and SSL_set_tlsext_use_srtp() return 0 on
84       success or 1 on error.
85
86       SSL_get_srtp_profiles() returns a stack of SRTP_PROTECTION_PROFILE
87       objects on success or NULL on error or if no protection profiles have
88       been configured.
89
90       SSL_get_selected_srtp_profile() returns a pointer to an
91       SRTP_PROTECTION_PROFILE object if one has been negotiated or NULL
92       otherwise.
93

SEE ALSO

95       SSL_export_keying_material(3)
96
98       Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
99
100       Licensed under the OpenSSL license (the "License").  You may not use
101       this file except in compliance with the License.  You can obtain a copy
102       in the file LICENSE in the source distribution or at
103       <https://www.openssl.org/source/license.html>.
104
105
106
1071.1.1i                            2021-07-22    SSL_CTX_SET_TLSEXT_USE_SRTP(3)
Impressum