mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-06 13:07:21 +00:00
tcptls/iostream: Add support for setting SNI on client TLS connections
If the hostname field of the ast_tcptls_session_args structure is
set (which it is for websocket client connections), that hostname
will now automatically be used in an SNI TLS extension in the client
hello.
Resolves: #713
UserNote: Secure websocket client connections now send SNI in
the TLS client hello.
(cherry picked from commit 7223dfe244
)
This commit is contained in:
committed by
Asterisk Development Team
parent
d1cde2a864
commit
10c5aa65e8
@@ -116,6 +116,17 @@ void ast_iostream_set_timeout_sequence(struct ast_iostream *stream, struct timev
|
||||
*/
|
||||
void ast_iostream_set_exclusive_input(struct ast_iostream *stream, int exclusive_input);
|
||||
|
||||
/*!
|
||||
* \brief Set the iostream's SNI hostname for TLS client connections
|
||||
*
|
||||
* \param stream A pointer to an iostream
|
||||
* \param sni_hostname The hostname to use for SNI when in client mode
|
||||
*
|
||||
* \retval 0 if the hostname was set successfully.
|
||||
* \retval -1 if memory could not be allocated for the hostname.
|
||||
*/
|
||||
int ast_iostream_set_sni_hostname(struct ast_iostream *stream, const char *sni_hostname);
|
||||
|
||||
/*!
|
||||
* \brief Get an iostream's file descriptor.
|
||||
*
|
||||
|
Reference in New Issue
Block a user