aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/finished.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-23 15:30:29 +0000
committerlloyd <[email protected]>2012-01-23 15:30:29 +0000
commita445f7f4a1089fc034c35c500e1572eb9518f44f (patch)
tree3231b324a290cb9c67e9a0512a40acad8fa024a1 /src/tls/finished.cpp
parent8bba8bab6077ee184c102d6634b288e7dd32b1dc (diff)
Since this branch is hugely API breaking already, go ahead and put
everything into a new namespace (Botan::TLS), removing the TLS_ prefixes on everything.
Diffstat (limited to 'src/tls/finished.cpp')
-rw-r--r--src/tls/finished.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tls/finished.cpp b/src/tls/finished.cpp
index ecb7c315a..f7f8a7eb8 100644
--- a/src/tls/finished.cpp
+++ b/src/tls/finished.cpp
@@ -15,6 +15,8 @@
namespace Botan {
+namespace TLS {
+
namespace {
KDF* choose_tls_prf(Version_Code version)
@@ -31,7 +33,7 @@ KDF* choose_tls_prf(Version_Code version)
/*
* Compute the verify_data
*/
-MemoryVector<byte> finished_compute_verify(TLS_Handshake_State* state,
+MemoryVector<byte> finished_compute_verify(Handshake_State* state,
Connection_Side side)
{
if(state->version == SSL_V3)
@@ -39,7 +41,7 @@ MemoryVector<byte> finished_compute_verify(TLS_Handshake_State* state,
const byte SSL_CLIENT_LABEL[] = { 0x43, 0x4C, 0x4E, 0x54 };
const byte SSL_SERVER_LABEL[] = { 0x53, 0x52, 0x56, 0x52 };
- TLS_Handshake_Hash hash = state->hash; // don't modify state
+ Handshake_Hash hash = state->hash; // don't modify state
MemoryVector<byte> ssl3_finished;
@@ -80,7 +82,7 @@ MemoryVector<byte> finished_compute_verify(TLS_Handshake_State* state,
* Create a new Finished message
*/
Finished::Finished(Record_Writer& writer,
- TLS_Handshake_State* state,
+ Handshake_State* state,
Connection_Side side)
{
verification_data = finished_compute_verify(state, side);
@@ -106,10 +108,12 @@ Finished::Finished(const MemoryRegion<byte>& buf)
/*
* Verify a Finished message
*/
-bool Finished::verify(TLS_Handshake_State* state,
+bool Finished::verify(Handshake_State* state,
Connection_Side side)
{
return (verification_data == finished_compute_verify(state, side));
}
}
+
+}