| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b5012f3 commit e2c5f41
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2131,18 +2131,13 @@ int SSLWrap<Base>::SSLCertCallback(SSL* s, void* arg) { | |||
| 2131 | 2131 | ||
| 2132 | 2132 | Local<Object> info = Object::New(env->isolate()); | |
| 2133 | 2133 | ||
| 2134 | - SSL_SESSION* sess = SSL_get_session(s); | ||
| 2135 | - if (sess != nullptr) { | ||
| 2136 | - if (sess->tlsext_hostname == nullptr) { | ||
| 2137 | - info->Set(env->servername_string(), String::Empty(env->isolate())); | ||
| 2138 | - } else { | ||
| 2139 | - Local<String> servername = OneByteString(env->isolate(), | ||
| 2140 | - sess->tlsext_hostname, | ||
| 2141 | - strlen(sess->tlsext_hostname)); | ||
| 2142 | - info->Set(env->servername_string(), servername); | ||
| 2143 | - } | ||
| 2144 | - info->Set(env->tls_ticket_string(), | ||
| 2145 | - Boolean::New(env->isolate(), sess->tlsext_ticklen != 0)); | ||
| 2134 | + const char* servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); | ||
| 2135 | + if (servername == nullptr) { | ||
| 2136 | + info->Set(env->servername_string(), String::Empty(env->isolate())); | ||
| 2137 | + } else { | ||
| 2138 | + Local<String> str = OneByteString(env->isolate(), servername, | ||
| 2139 | + strlen(servername)); | ||
| 2140 | + info->Set(env->servername_string(), str); | ||
| 2146 | 2141 | } | |
| 2147 | 2142 | ||
| 2148 | 2143 | bool ocsp = false; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments