1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00
This commit is contained in:
Slavey Karadzhov
2016-02-19 11:41:45 +01:00
parent 885ff3e8f0
commit 63da8991c2
4 changed files with 44 additions and 0 deletions

View File

@ -1849,6 +1849,19 @@ EXP_FUNC int STDCALL ssl_get_config(int offset)
}
}
/**
* Sets the SNI hostname
*/
EXP_FUNC int STDCALL ssl_set_hostname(const SSL *ssl, const char* host_name) {
if(host_name == NULL || strlen(host_name) == 0 || strlen(host_name) > 255 ) {
return 0;
}
strncpy((char*)&ssl->host_name, host_name, strlen(host_name));
return 1;
}
#ifdef CONFIG_SSL_CERT_VERIFICATION
/**
* Authenticate a received certificate.