aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-08-28 20:32:34 -0400
committerJack Lloyd <[email protected]>2015-08-28 20:32:34 -0400
commit1b5819fb2f1eca1ef6a58a9a3c8a6cd6291a6c17 (patch)
tree018988f1f1b3f553a4b7d94a07fa65922a832b20 /src
parent080d673eb8594d4dc54607d6f55eefd88ce4cc6d (diff)
Avoid a crash in the TLS server if the client sends ALPN but no next
protocol handler was specified to the Server constructor. GH #252
Diffstat (limited to 'src')
-rw-r--r--src/lib/tls/tls_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/tls/tls_server.cpp b/src/lib/tls/tls_server.cpp
index 2f5a0e00d..330135e63 100644
--- a/src/lib/tls/tls_server.cpp
+++ b/src/lib/tls/tls_server.cpp
@@ -371,7 +371,7 @@ void Server::process_handshake_msg(const Handshake_State* active_state,
catch(...) {}
m_next_protocol = "";
- if(state.client_hello()->supports_alpn())
+ if(m_choose_next_protocol && state.client_hello()->supports_alpn())
m_next_protocol = m_choose_next_protocol(state.client_hello()->next_protocols());
if(resuming)