| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "SSL_CTX_SET_TLSEXT_USE_SRTP 3SSL" |
| 58 |
.TH SSL_CTX_SET_TLSEXT_USE_SRTP 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
SSL_CTX_set_tlsext_use_srtp, |
| 65 |
SSL_set_tlsext_use_srtp, |
| 66 |
SSL_get_srtp_profiles, |
| 67 |
SSL_get_selected_srtp_profile |
| 68 |
\&\- Configure and query SRTP support |
| 69 |
.SH SYNOPSIS |
| 70 |
.IX Header "SYNOPSIS" |
| 71 |
.Vb 1 |
| 72 |
\& #include <openssl/srtp.h> |
| 73 |
\& |
| 74 |
\& int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); |
| 75 |
\& int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); |
| 76 |
\& |
| 77 |
\& STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); |
| 78 |
\& SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); |
| 79 |
.Ve |
| 80 |
.SH DESCRIPTION |
| 81 |
.IX Header "DESCRIPTION" |
| 82 |
SRTP is the Secure Real-Time Transport Protocol. OpenSSL implements support for |
| 83 |
the "use_srtp" DTLS extension defined in RFC5764. This provides a mechanism for |
| 84 |
establishing SRTP keying material, algorithms and parameters using DTLS. This |
| 85 |
capability may be used as part of an implementation that conforms to RFC5763. |
| 86 |
OpenSSL does not implement SRTP itself or RFC5763. Note that OpenSSL does not |
| 87 |
support the use of SRTP Master Key Identifiers (MKIs). Also note that this |
| 88 |
extension is only supported in DTLS. Any SRTP configuration will be ignored if a |
| 89 |
TLS connection is attempted. |
| 90 |
.PP |
| 91 |
An OpenSSL client wishing to send the "use_srtp" extension should call |
| 92 |
\&\fBSSL_CTX_set_tlsext_use_srtp()\fR to set its use for all SSL objects subsequently |
| 93 |
created from an SSL_CTX. Alternatively a client may call |
| 94 |
\&\fBSSL_set_tlsext_use_srtp()\fR to set its use for an individual SSL object. The |
| 95 |
\&\fBprofiles\fR parameters should point to a NUL-terminated, colon delimited list of |
| 96 |
SRTP protection profile names. |
| 97 |
.PP |
| 98 |
The currently supported protection profile names are: |
| 99 |
.IP SRTP_AES128_CM_SHA1_80 4 |
| 100 |
.IX Item "SRTP_AES128_CM_SHA1_80" |
| 101 |
This corresponds to SRTP_AES128_CM_HMAC_SHA1_80 defined in RFC5764. |
| 102 |
.IP SRTP_AES128_CM_SHA1_32 4 |
| 103 |
.IX Item "SRTP_AES128_CM_SHA1_32" |
| 104 |
This corresponds to SRTP_AES128_CM_HMAC_SHA1_32 defined in RFC5764. |
| 105 |
.IP SRTP_AEAD_AES_128_GCM 4 |
| 106 |
.IX Item "SRTP_AEAD_AES_128_GCM" |
| 107 |
This corresponds to the profile of the same name defined in RFC7714. |
| 108 |
.IP SRTP_AEAD_AES_256_GCM 4 |
| 109 |
.IX Item "SRTP_AEAD_AES_256_GCM" |
| 110 |
This corresponds to the profile of the same name defined in RFC7714. |
| 111 |
.IP SRTP_DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM 4 |
| 112 |
.IX Item "SRTP_DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM" |
| 113 |
This corresponds to the profile of the same name defined in RFC8723. |
| 114 |
.IP SRTP_DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM 4 |
| 115 |
.IX Item "SRTP_DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM" |
| 116 |
This corresponds to the profile of the same name defined in RFC8723. |
| 117 |
.IP SRTP_ARIA_128_CTR_HMAC_SHA1_80 4 |
| 118 |
.IX Item "SRTP_ARIA_128_CTR_HMAC_SHA1_80" |
| 119 |
This corresponds to the profile of the same name defined in RFC8269. |
| 120 |
.IP SRTP_ARIA_128_CTR_HMAC_SHA1_32 4 |
| 121 |
.IX Item "SRTP_ARIA_128_CTR_HMAC_SHA1_32" |
| 122 |
This corresponds to the profile of the same name defined in RFC8269. |
| 123 |
.IP SRTP_ARIA_256_CTR_HMAC_SHA1_80 4 |
| 124 |
.IX Item "SRTP_ARIA_256_CTR_HMAC_SHA1_80" |
| 125 |
This corresponds to the profile of the same name defined in RFC8269. |
| 126 |
.IP SRTP_ARIA_256_CTR_HMAC_SHA1_32 4 |
| 127 |
.IX Item "SRTP_ARIA_256_CTR_HMAC_SHA1_32" |
| 128 |
This corresponds to the profile of the same name defined in RFC8269. |
| 129 |
.IP SRTP_AEAD_ARIA_128_GCM 4 |
| 130 |
.IX Item "SRTP_AEAD_ARIA_128_GCM" |
| 131 |
This corresponds to the profile of the same name defined in RFC8269. |
| 132 |
.IP SRTP_AEAD_ARIA_256_GCM 4 |
| 133 |
.IX Item "SRTP_AEAD_ARIA_256_GCM" |
| 134 |
This corresponds to the profile of the same name defined in RFC8269. |
| 135 |
.PP |
| 136 |
Supplying an unrecognised protection profile name will result in an error. |
| 137 |
.PP |
| 138 |
An OpenSSL server wishing to support the "use_srtp" extension should also call |
| 139 |
\&\fBSSL_CTX_set_tlsext_use_srtp()\fR or \fBSSL_set_tlsext_use_srtp()\fR to indicate the |
| 140 |
protection profiles that it is willing to negotiate. |
| 141 |
.PP |
| 142 |
The currently configured list of protection profiles for either a client or a |
| 143 |
server can be obtained by calling \fBSSL_get_srtp_profiles()\fR. This returns a stack |
| 144 |
of SRTP_PROTECTION_PROFILE objects. The memory pointed to in the return value of |
| 145 |
this function should not be freed by the caller. |
| 146 |
.PP |
| 147 |
After a handshake has been completed the negotiated SRTP protection profile (if |
| 148 |
any) can be obtained (on the client or the server) by calling |
| 149 |
\&\fBSSL_get_selected_srtp_profile()\fR. This function will return NULL if no SRTP |
| 150 |
protection profile was negotiated. The memory returned from this function should |
| 151 |
not be freed by the caller. |
| 152 |
.PP |
| 153 |
If an SRTP protection profile has been successfully negotiated then the SRTP |
| 154 |
keying material (on both the client and server) should be obtained via a call to |
| 155 |
\&\fBSSL_export_keying_material\fR\|(3). This call should provide a label value of |
| 156 |
"EXTRACTOR\-dtls_srtp" and a NULL context value (use_context is 0). The total |
| 157 |
length of keying material obtained should be equal to two times the sum of the |
| 158 |
master key length and the salt length as defined for the protection profile in |
| 159 |
use. This provides the client write master key, the server write master key, the |
| 160 |
client write master salt and the server write master salt in that order. |
| 161 |
.PP |
| 162 |
These functions cannot be used with QUIC SSL objects. |
| 163 |
\&\fBSSL_CTX_set_tlsext_use_srtp()\fR fails if called on a QUIC SSL context. |
| 164 |
\&\fBSSL_set_tlsext_use_srtp()\fR fails if called on a QUIC SSL object. |
| 165 |
.SH "RETURN VALUES" |
| 166 |
.IX Header "RETURN VALUES" |
| 167 |
\&\fBSSL_CTX_set_tlsext_use_srtp()\fR and \fBSSL_set_tlsext_use_srtp()\fR return 0 on success |
| 168 |
or 1 on error. |
| 169 |
.PP |
| 170 |
\&\fBSSL_get_srtp_profiles()\fR returns a stack of SRTP_PROTECTION_PROFILE objects on |
| 171 |
success or NULL on error or if no protection profiles have been configured. |
| 172 |
.PP |
| 173 |
\&\fBSSL_get_selected_srtp_profile()\fR returns a pointer to an SRTP_PROTECTION_PROFILE |
| 174 |
object if one has been negotiated or NULL otherwise. |
| 175 |
.SH "SEE ALSO" |
| 176 |
.IX Header "SEE ALSO" |
| 177 |
\&\fBssl\fR\|(7), |
| 178 |
\&\fBSSL_export_keying_material\fR\|(3) |
| 179 |
.SH COPYRIGHT |
| 180 |
.IX Header "COPYRIGHT" |
| 181 |
Copyright 2017\-2023 The OpenSSL Project Authors. All Rights Reserved. |
| 182 |
.PP |
| 183 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 184 |
this file except in compliance with the License. You can obtain a copy |
| 185 |
in the file LICENSE in the source distribution or at |
| 186 |
<https://www.openssl.org/source/license.html>. |