Skip to content

Commit 9810a8c

Browse files
Merge pull request #6991 from lealem47/gh6983
Option to enable DTLS-SRTP in CMake
2 parents dda72dc + 846b91e commit 9810a8c

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,18 @@ if(NOT WOLFSSL_SINGLE_THREADED)
269269
endif()
270270
endif()
271271

272+
# DTLS-SRTP
273+
add_option("WOLFSSL_SRTP"
274+
"Enables wolfSSL DTLS-SRTP (default: disabled)"
275+
"no" "yes;no")
276+
277+
if(WOLFSSL_SRTP)
278+
list(APPEND WOLFSSL_DEFINITIONS
279+
"-DWOLFSSL_SRTP")
280+
set(WOLFSSL_DTLS "yes")
281+
set(WOLFSSL_KEYING_MATERIAL "yes")
282+
endif()
283+
272284

273285
# DTLS
274286
add_option("WOLFSSL_DTLS"

cmake/functions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function(generate_build_flags)
5353
if(WOLFSSL_SCTP OR WOLFSSL_USER_SETTINGS)
5454
set(BUILD_SCTP "yes" PARENT_SCOPE)
5555
endif()
56-
if(WOLFSSL_DTLS_CID OR WOLFSSL_USER_SETTINGS)
56+
if(WOLFSSL_DTLS_CID OR WOLFSSL_USER_SETTINGS OR WOLFSSL_DTLS)
5757
set(BUILD_DTLS_COMMON "yes" PARENT_SCOPE)
5858
endif()
5959
set(BUILD_MCAST ${WOLFSSL_MCAST} PARENT_SCOPE)

0 commit comments

Comments
 (0)