mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
[openssl] Add support for SNI (sending the hostname)
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
new, free, \
|
||||
handshake, shutdown, clear, \
|
||||
read, send, pending, \
|
||||
set_fd, get_fd, \
|
||||
set_fd, set_hostname, get_fd, \
|
||||
set_bufflen, \
|
||||
get_verify_result, \
|
||||
get_state) \
|
||||
@@ -42,6 +42,7 @@
|
||||
send, \
|
||||
pending, \
|
||||
set_fd, \
|
||||
set_hostname, \
|
||||
get_fd, \
|
||||
set_bufflen, \
|
||||
get_verify_result, \
|
||||
|
@@ -259,6 +259,8 @@ struct ssl_method_func_st {
|
||||
|
||||
void (*ssl_set_fd)(SSL *ssl, int fd, int mode);
|
||||
|
||||
void (*ssl_set_hostname)(SSL *ssl, const char *hostname);
|
||||
|
||||
int (*ssl_get_fd)(const SSL *ssl, int mode);
|
||||
|
||||
void (*ssl_set_bufflen)(SSL *ssl, int len);
|
||||
|
@@ -145,6 +145,18 @@ int SSL_shutdown(SSL *ssl);
|
||||
*/
|
||||
int SSL_set_fd(SSL *ssl, int fd);
|
||||
|
||||
/**
|
||||
* @brief Set the hostname for SNI
|
||||
*
|
||||
* @param ssl - the SSL context point
|
||||
* @param hostname - pointer to the hostname
|
||||
*
|
||||
* @return result
|
||||
* 1 : OK
|
||||
* 0 : failed
|
||||
*/
|
||||
int SSL_set_tlsext_host_name(SSL* ssl, const char *hostname);
|
||||
|
||||
/**
|
||||
* @brief These functions load the private key into the SSL_CTX or SSL object
|
||||
*
|
||||
|
@@ -39,6 +39,8 @@ int ssl_pm_pending(const SSL *ssl);
|
||||
void ssl_pm_set_fd(SSL *ssl, int fd, int mode);
|
||||
int ssl_pm_get_fd(const SSL *ssl, int mode);
|
||||
|
||||
void ssl_pm_set_hostname(SSL *ssl, const char *hostname);
|
||||
|
||||
OSSL_HANDSHAKE_STATE ssl_pm_get_state(const SSL *ssl);
|
||||
|
||||
void ssl_pm_set_bufflen(SSL *ssl, int len);
|
||||
|
Reference in New Issue
Block a user