Empty SNI names are not valid
(Imported from upstream's 4d6fe78f65be650c84e14777c90e7a088f7a44ce) Change-Id: Id28e0d49da2490e454dcb8603ccb93a506dfafaf Reviewed-on: https://boringssl-review.googlesource.com/7206 Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
e412bbd9a1
commit
e52d22d5f9
@ -359,7 +359,9 @@ int SSL_set_tlsext_host_name(SSL *ssl, const char *name) {
|
||||
if (name == NULL) {
|
||||
return 1;
|
||||
}
|
||||
if (strlen(name) > TLSEXT_MAXLEN_host_name) {
|
||||
|
||||
size_t len = strlen(name);
|
||||
if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
|
||||
OPENSSL_PUT_ERROR(SSL, SSL_R_SSL3_EXT_INVALID_SERVERNAME);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user