aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-11 20:49:17 +0000
committerlloyd <[email protected]>2012-01-11 20:49:17 +0000
commit4c6327c95bd01de54487b3159b77a5152ed39564 (patch)
treee76d05290c93a91b0886bad3be63c4329d0fbeb8 /src
parentd146e65c66bc157c5a884d0ea5ac6cb167a4c929 (diff)
Build fixes
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/gcc.txt4
-rw-r--r--src/tls/c_hello.cpp6
-rw-r--r--src/tls/tls_extensions.h13
-rw-r--r--src/tls/tls_messages.h8
4 files changed, 20 insertions, 11 deletions
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index 0852e5be1..3bc4cc5da 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -49,7 +49,9 @@ i586 -> "-mtune=generic -momit-leaf-frame-pointer"
# Translate to GCC-speak
nehalem -> "-march=corei7 -momit-leaf-frame-pointer"
-westmere -> "-march=corei7 -maes -momit-leaf-frame-pointer"
+#westmere -> "-march=corei7 -maes -momit-leaf-frame-pointer"
+westmere -> "-march=core2 -msse4.1 -msse4.2 -maes -momit-leaf-frame-pointer"
+
sandybridge -> "-march=corei7-avx -momit-leaf-frame-pointer"
atom32 -> "-march=atom -momit-leaf-frame-pointer"
diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp
index 6c4964fb1..2455eae3b 100644
--- a/src/tls/c_hello.cpp
+++ b/src/tls/c_hello.cpp
@@ -204,6 +204,7 @@ void Client_Hello::deserialize_sslv2(const MemoryRegion<byte>& buf)
m_fragment_size = 0;
m_next_protocol = false;
+ m_supports_session_ticket = false;
}
/*
@@ -257,6 +258,11 @@ void Client_Hello::deserialize(const MemoryRegion<byte>& buf)
{
m_fragment_size = frag->fragment_size();
}
+ else if(Session_Ticket* ticket = dynamic_cast<Session_Ticket*>(extn))
+ {
+ m_supports_session_ticket = true;
+ m_session_ticket = ticket->contents();
+ }
else if(Renegotation_Extension* reneg = dynamic_cast<Renegotation_Extension*>(extn))
{
// checked by TLS_Client / TLS_Server as they know the handshake state
diff --git a/src/tls/tls_extensions.h b/src/tls/tls_extensions.h
index 526436862..6d4e40434 100644
--- a/src/tls/tls_extensions.h
+++ b/src/tls/tls_extensions.h
@@ -183,12 +183,7 @@ class Session_Ticket : public TLS_Extension
TLS_Handshake_Extension_Type type() const
{ return TLSEXT_SESSION_TICKET; }
- /*
- * Decrypt the session ticket and return the session info;
- * used by server.
- */
- TLS_Session decrypt(const SymmetricKey& key,
- const MemoryRegion<byte>& key_name);
+ const MemoryVector<byte>& contents() const { return m_contents; }
/**
* Create empty extension, used by both client and server
@@ -199,14 +194,16 @@ class Session_Ticket : public TLS_Extension
* Extension with ticket, used by client
*/
Session_Ticket(const MemoryRegion<byte>& session_ticket) :
- m_contents(session_ticket);
+ m_contents(session_ticket) {}
/**
* Deserialize a session ticket
*/
- Session_Ticket(const TLS_Data_Reader& reader, u16ibt extension_size);
+ Session_Ticket(const TLS_Data_Reader& reader, u16bit extension_size);
MemoryVector<byte> serialize() const { return m_contents; }
+
+ bool empty() const { return false; }
private:
MemoryVector<byte> m_contents;
};
diff --git a/src/tls/tls_messages.h b/src/tls/tls_messages.h
index ed8073bda..94e17cb9b 100644
--- a/src/tls/tls_messages.h
+++ b/src/tls/tls_messages.h
@@ -79,9 +79,10 @@ class Client_Hello : public Handshake_Message
size_t fragment_size() const { return m_fragment_size; }
- bool supports_session_ticket() const { returnm m_supports_session_ticket; }
+ bool supports_session_ticket() const { return m_supports_session_ticket; }
- const MemoryRegion<byte> session_ticket() const { return m_session_ticket; }
+ const MemoryRegion<byte>& session_ticket() const
+ { return m_session_ticket; }
Client_Hello(Record_Writer& writer,
TLS_Handshake_Hash& hash,
@@ -123,6 +124,9 @@ class Client_Hello : public Handshake_Message
size_t m_fragment_size;
bool m_secure_renegotiation;
MemoryVector<byte> m_renegotiation_info;
+
+ bool m_supports_session_ticket;
+ MemoryVector<byte> m_session_ticket;
};
/**