aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_server.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-04-25 14:30:52 +0000
committerlloyd <[email protected]>2012-04-25 14:30:52 +0000
commit28c64de10a4a6621e79879fe3047983bb8da9904 (patch)
tree46587772bebc38ee512111a0d23862f1f9837433 /src/tls/tls_server.cpp
parentb72a44475d06263e1492f8913310b5f29515cba6 (diff)
Huge pile of post merge fixups, mtn really fucked that merge
Diffstat (limited to 'src/tls/tls_server.cpp')
-rw-r--r--src/tls/tls_server.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp
index 9da4ca3b8..1e8c73ec3 100644
--- a/src/tls/tls_server.cpp
+++ b/src/tls/tls_server.cpp
@@ -22,7 +22,7 @@ bool check_for_resume(Session& session_info,
Session_Manager& session_manager,
Credentials_Manager& credentials,
Client_Hello* client_hello,
- u32bit session_ticket_lifetime)
+ std::chrono::seconds session_ticket_lifetime)
{
const MemoryVector<byte>& client_session_id = client_hello->session_id();
const MemoryVector<byte>& session_ticket = client_hello->session_ticket();
@@ -45,7 +45,7 @@ bool check_for_resume(Session& session_info,
session_ticket,
credentials.psk("tls-server", "session-ticket", ""));
- if(session_ticket_lifetime &&
+ if(session_ticket_lifetime != std::chrono::seconds(0) &&
session_info.session_age() > session_ticket_lifetime)
return false; // ticket has expired
}
@@ -184,9 +184,9 @@ get_server_certs(const std::string& hostname,
/*
* TLS Server Constructor
*/
-Server::Server(std::tr1::function<void (const byte[], size_t)> output_fn,
- std::tr1::function<void (const byte[], size_t, Alert)> proc_fn,
- std::tr1::function<bool (const Session&)> handshake_fn,
+Server::Server(std::function<void (const byte[], size_t)> output_fn,
+ std::function<void (const byte[], size_t, Alert)> proc_fn,
+ std::function<bool (const Session&)> handshake_fn,
Session_Manager& session_manager,
Credentials_Manager& creds,
const Policy& policy,
@@ -302,7 +302,7 @@ void Server::process_handshake_msg(Handshake_Type type,
session_manager,
creds,
state->client_hello,
- policy.session_ticket_lifetime());
+ std::chrono::seconds(policy.session_ticket_lifetime()));
bool have_session_ticket_key = false;