mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +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.
This commit is contained in:
@@ -106,6 +106,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