[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

@@ -734,6 +734,19 @@ int SSL_set_wfd(SSL *ssl, int fd)
return 1;
}
/**
* @brief SET TLS Hostname
*/
int SSL_set_tlsext_host_name(SSL* ssl, const char *hostname)
{
SSL_ASSERT1(ssl);
SSL_ASSERT1(hostname);
SSL_METHOD_CALL(set_hostname, ssl, hostname);
return 1;
}
/**
* @brief get SSL version
*/
@@ -1593,3 +1606,4 @@ int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, unsigned
ctx->ssl_alpn.alpn_list[i] = NULL;
return 0;
}