You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/11/17 02:15:48 UTC

[trafficserver] branch master updated: Fix a crash that a SSL callback gets netvc from a wrong place

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new e2bccd5  Fix a crash that a SSL callback gets netvc from a wrong place
e2bccd5 is described below

commit e2bccd5384a4a3e769f994ee794888f3efacb335
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Fri Nov 17 10:34:57 2017 +0900

    Fix a crash that a SSL callback gets netvc from a wrong place
    
    SSLNetVConnection has to be obtained with SSLNetVCAccess
---
 iocore/net/SSLUtils.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 37452e2..7c55cd5 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -416,7 +416,7 @@ extern SNIActionPerformer sni_action_performer;
 static int
 ssl_servername_only_callback(SSL *ssl, int * /* ad */, void * /*arg*/)
 {
-  SSLNetVConnection *netvc = reinterpret_cast<SSLNetVConnection *>(SSL_get_app_data(ssl));
+  SSLNetVConnection *netvc = SSLNetVCAccess(ssl);
   const char *servername   = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
   Debug("ssl", "Requested servername is %s", servername);
   if (servername != nullptr) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].