asio_dtls
asio_dtls copied to clipboard
How to add DTLS extensions?
There is no interface to enable it at the Moment.
But you can use the native handle like this:
#include <openssl/srtp.h>
asio::ssl::dtls::context ctx(asio::ssl::dtls::context::dtls_client);
int res = SSL_CTX_set_tlsext_use_srtp(ctx.native_handle(), "SRTP_AEAD_AES_256_GCM");
if(res != 0)
{
asio::error_code ec = asio::error_code(
static_cast<int>(::ERR_get_error()),
asio::error::get_ssl_category());
// Handle Error
}
// Create DTLS Socket, ...