[openssl] Add support for SNI (sending the hostname)

This commit is contained in:
Kedar Sovani
2017-10-02 14:00:13 +05:30
parent 3420baa01b
commit b65f47c586
7 changed files with 40 additions and 2 deletions

View File

@@ -367,6 +367,13 @@ void ssl_pm_set_fd(SSL *ssl, int fd, int mode)
ssl_pm->fd.fd = fd;
}
void ssl_pm_set_hostname(SSL *ssl, const char *hostname)
{
struct ssl_pm *ssl_pm = (struct ssl_pm *)ssl->ssl_pm;
mbedtls_ssl_set_hostname(&ssl_pm->ssl, hostname);
}
int ssl_pm_get_fd(const SSL *ssl, int mode)
{
struct ssl_pm *ssl_pm = (struct ssl_pm *)ssl->ssl_pm;