mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +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 4d6f84a14f)
			
			
This commit is contained in:
		
				
					committed by
					
						 Asterisk Development Team
						Asterisk Development Team
					
				
			
			
				
	
			
			
			
						parent
						
							18c0cafa10
						
					
				
				
					commit
					c9d07a3f74
				
			| @@ -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