aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_handshake_state.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-30 20:35:27 +0000
committerlloyd <[email protected]>2011-12-30 20:35:27 +0000
commit2920f1be500d53414b863ec61ca9c2008336479f (patch)
treefb2dd5c855016521c69d2b1885a7f081e7d3ea8f /src/tls/tls_handshake_state.h
parentdeb92d7f6d43206c04f332625d6b1e1a2abc444d (diff)
Rename the session type to 'TLS_Session'. Split the manager out into
its own file. Rename tls_state to tls_handshake_state.
Diffstat (limited to 'src/tls/tls_handshake_state.h')
-rw-r--r--src/tls/tls_handshake_state.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/tls/tls_handshake_state.h b/src/tls/tls_handshake_state.h
new file mode 100644
index 000000000..1602ca17c
--- /dev/null
+++ b/src/tls/tls_handshake_state.h
@@ -0,0 +1,60 @@
+/*
+* TLS Handshake State
+* (C) 2004-2006 Jack Lloyd
+*
+* Released under the terms of the Botan license
+*/
+
+#ifndef BOTAN_TLS_HANDSHAKE_STATE_H__
+#define BOTAN_TLS_HANDSHAKE_STATE_H__
+
+#include <botan/internal/tls_messages.h>
+#include <botan/internal/tls_session_key.h>
+#include <botan/secqueue.h>
+
+namespace Botan {
+
+/**
+* SSL/TLS Handshake State
+*/
+class Handshake_State
+ {
+ public:
+ Handshake_State();
+ ~Handshake_State();
+
+ bool received_handshake_msg(Handshake_Type handshake_msg) const;
+
+ void confirm_transition_to(Handshake_Type handshake_msg);
+ void set_expected_next(Handshake_Type handshake_msg);
+
+ Client_Hello* client_hello;
+ Server_Hello* server_hello;
+ Certificate* server_certs;
+ Server_Key_Exchange* server_kex;
+ Certificate_Req* cert_req;
+ Server_Hello_Done* server_hello_done;
+
+ Certificate* client_certs;
+ Client_Key_Exchange* client_kex;
+ Certificate_Verify* client_verify;
+ Finished* client_finished;
+ Finished* server_finished;
+
+ Public_Key* kex_pub;
+ Private_Key* kex_priv;
+
+ TLS_Cipher_Suite suite;
+ SessionKeys keys;
+ TLS_Handshake_Hash hash;
+
+ SecureQueue queue;
+
+ Version_Code version;
+ private:
+ u32bit hand_expecting_mask, hand_received_mask;
+ };
+
+}
+
+#endif