From 5ee3046bc9b8517bb6de5eda34f03ee907f9ff16 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 28 Dec 2011 16:08:42 +0000 Subject: Working though hacking client verify (server side only). Only supports TLS 1.0/1.1, SSLv3 uses a different hash format. Only RSA certs tested so far. --- src/tls/tls_messages.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/tls/tls_messages.h') diff --git a/src/tls/tls_messages.h b/src/tls/tls_messages.h index c4920066e..880f77c98 100644 --- a/src/tls/tls_messages.h +++ b/src/tls/tls_messages.h @@ -28,7 +28,7 @@ class Record_Reader; class HandshakeMessage { public: - void send(Record_Writer&, HandshakeHash&) const; + void send(Record_Writer&, TLS_Handshake_Hash&) const; virtual Handshake_Type type() const = 0; @@ -68,7 +68,7 @@ class Client_Hello : public HandshakeMessage bool offered_suite(u16bit) const; Client_Hello(RandomNumberGenerator& rng, - Record_Writer&, const TLS_Policy&, HandshakeHash&); + Record_Writer&, const TLS_Policy&, TLS_Handshake_Hash&); Client_Hello(const MemoryRegion& buf, Handshake_Type type) @@ -108,7 +108,7 @@ class Client_Key_Exchange : public HandshakeMessage Client_Key_Exchange(RandomNumberGenerator& rng, Record_Writer& output, - HandshakeHash& hash, + TLS_Handshake_Hash& hash, const Public_Key* my_key, Version_Code using_version, Version_Code pref_version); @@ -137,7 +137,7 @@ class Certificate : public HandshakeMessage bool empty() const { return certs.empty(); } Certificate(Record_Writer&, const std::vector&, - HandshakeHash&); + TLS_Handshake_Hash&); Certificate(const MemoryRegion& buf) { deserialize(buf); } private: MemoryVector serialize() const; @@ -157,7 +157,7 @@ class Certificate_Req : public HandshakeMessage std::vector acceptable_CAs() const { return names; } Certificate_Req(Record_Writer& writer, - HandshakeHash& hash, + TLS_Handshake_Hash& hash, const std::vector& allowed_cas, const std::vector& types = std::vector()); @@ -180,11 +180,11 @@ class Certificate_Verify : public HandshakeMessage Handshake_Type type() const { return CERTIFICATE_VERIFY; } bool verify(const X509_Certificate& cert, - HandshakeHash& hash); + TLS_Handshake_Hash& hash); Certificate_Verify(RandomNumberGenerator& rng, Record_Writer& writer, - HandshakeHash& hash, + TLS_Handshake_Hash& hash, const Private_Key* key); Certificate_Verify(const MemoryRegion& buf) { deserialize(buf); } @@ -204,17 +204,17 @@ class Finished : public HandshakeMessage Handshake_Type type() const { return FINISHED; } bool verify(const MemoryRegion&, Version_Code, - const HandshakeHash&, Connection_Side); + const TLS_Handshake_Hash&, Connection_Side); Finished(Record_Writer&, Version_Code, Connection_Side, - const MemoryRegion&, HandshakeHash&); + const MemoryRegion&, TLS_Handshake_Hash&); Finished(const MemoryRegion& buf) { deserialize(buf); } private: MemoryVector serialize() const; void deserialize(const MemoryRegion&); MemoryVector compute_verify(const MemoryRegion&, - HandshakeHash, Connection_Side, + TLS_Handshake_Hash, Connection_Side, Version_Code); Connection_Side side; @@ -264,7 +264,7 @@ class Server_Hello : public HandshakeMessage const Client_Hello& other, const MemoryRegion& session_id, Version_Code version, - HandshakeHash& hash); + TLS_Handshake_Hash& hash); Server_Hello(RandomNumberGenerator& rng, Record_Writer& writer, @@ -272,7 +272,7 @@ class Server_Hello : public HandshakeMessage u16bit ciphersuite, byte compression, Version_Code ver, - HandshakeHash& hash); + TLS_Handshake_Hash& hash); Server_Hello(const MemoryRegion& buf) { deserialize(buf); } private: @@ -300,7 +300,7 @@ class Server_Key_Exchange : public HandshakeMessage Server_Key_Exchange(RandomNumberGenerator& rng, Record_Writer&, const Public_Key*, const Private_Key*, const MemoryRegion&, - const MemoryRegion&, HandshakeHash&); + const MemoryRegion&, TLS_Handshake_Hash&); Server_Key_Exchange(const MemoryRegion& buf) { deserialize(buf); } private: @@ -320,7 +320,7 @@ class Server_Hello_Done : public HandshakeMessage public: Handshake_Type type() const { return SERVER_HELLO_DONE; } - Server_Hello_Done(Record_Writer&, HandshakeHash&); + Server_Hello_Done(Record_Writer&, TLS_Handshake_Hash&); Server_Hello_Done(const MemoryRegion& buf) { deserialize(buf); } private: MemoryVector serialize() const; -- cgit v1.2.3