aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/rec_read.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-30 20:20:42 +0000
committerlloyd <[email protected]>2011-12-30 20:20:42 +0000
commitdeb92d7f6d43206c04f332625d6b1e1a2abc444d (patch)
tree06c331d7f51071750091e013c6f853c015eacd18 /src/tls/rec_read.cpp
parent766f5eeb5c99936e7ddcf3e4c82095f087b6e928 (diff)
Add a function for getting the version number of an active connection.
Add a new callback that is called with the session info when a handshake completes. Currently only called on the server side as the client doesn't have session resumption yet. Rename CipherSuite to TLS_Cipher_Suite.
Diffstat (limited to 'src/tls/rec_read.cpp')
-rw-r--r--src/tls/rec_read.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tls/rec_read.cpp b/src/tls/rec_read.cpp
index 63c08cad5..f6cc1057d 100644
--- a/src/tls/rec_read.cpp
+++ b/src/tls/rec_read.cpp
@@ -42,9 +42,19 @@ void Record_Reader::set_version(Version_Code version)
}
/*
+* Get the version in use
+*/
+Version_Code Record_Reader::get_version() const
+ {
+ return static_cast<Version_Code>(
+ (static_cast<u16bit>(major) << 8) | minor);
+ }
+
+/*
* Set the keys for reading
*/
-void Record_Reader::set_keys(const CipherSuite& suite, const SessionKeys& keys,
+void Record_Reader::activate(const TLS_Cipher_Suite& suite,
+ const SessionKeys& keys,
Connection_Side side)
{
cipher.reset();