bool handshake_complete(const Botan::TLS::Session& session) { std::cout << "Handshake complete, " << session.version().to_string() << " using " << session.ciphersuite().to_string() << std::endl; if(!session.session_id().empty()) std::cout << "Session ID " << Botan::hex_encode(session.session_id()) << std::endl; if(!session.session_ticket().empty()) std::cout << "Session ticket " << Botan::hex_encode(session.session_ticket()) << std::endl; return true; }
virtual void save(const B::Session & session) { std::vector<byte> encrypted_value = session.encrypt(key, *rng); const std::vector<byte>& session_id = session.session_id(); save_p( (char*) &(session_id[0]), session_id.size(), (char*) &(encrypted_value[0]), encrypted_value.size() ); }