aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_server.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-03-20 04:32:15 +0000
committerlloyd <[email protected]>2015-03-20 04:32:15 +0000
commitb01ce65e09e50ec624bdbf62bf2c1433f0d6f637 (patch)
tree8aa46632eb381b44de64d106b62f8efad49c173d /src/lib/tls/tls_server.h
parent181e75b66d5fbffdce04d37014c260b4fab5dec8 (diff)
Add ALPN (RFC 7301) and remove NPN
Diffstat (limited to 'src/lib/tls/tls_server.h')
-rw-r--r--src/lib/tls/tls_server.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/tls/tls_server.h b/src/lib/tls/tls_server.h
index 4b15e837b..4f2a11ba4 100644
--- a/src/lib/tls/tls_server.h
+++ b/src/lib/tls/tls_server.h
@@ -22,6 +22,8 @@ namespace TLS {
class BOTAN_DLL Server : public Channel
{
public:
+ typedef std::function<std::string (std::vector<std::string>)> next_protocol_fn;
+
/**
* Server initialization
*/
@@ -33,7 +35,7 @@ class BOTAN_DLL Server : public Channel
Credentials_Manager& creds,
const Policy& policy,
RandomNumberGenerator& rng,
- const std::vector<std::string>& protocols = std::vector<std::string>(),
+ next_protocol_fn next_proto = next_protocol_fn(),
bool is_datagram = false,
size_t reserved_io_buffer_size = 16*1024
);
@@ -63,7 +65,7 @@ class BOTAN_DLL Server : public Channel
const Policy& m_policy;
Credentials_Manager& m_creds;
- std::vector<std::string> m_possible_protocols;
+ next_protocol_fn m_choose_next_protocol;
std::string m_next_protocol;
};