aboutsummaryrefslogtreecommitdiffstats
path: root/src/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl')
-rw-r--r--src/ssl/c_kex.cpp2
-rw-r--r--src/ssl/cert_req.cpp2
-rw-r--r--src/ssl/cert_ver.cpp2
-rw-r--r--src/ssl/finished.cpp2
-rw-r--r--src/ssl/handshake_hash.cpp2
-rw-r--r--src/ssl/handshake_hash.h6
-rw-r--r--src/ssl/handshake_state.cpp2
-rw-r--r--src/ssl/hello.cpp4
-rw-r--r--src/ssl/rec_read.cpp2
-rw-r--r--src/ssl/rec_wri.cpp2
-rw-r--r--src/ssl/s_kex.cpp2
-rw-r--r--src/ssl/socket.h6
-rw-r--r--src/ssl/tls_alerts.h6
-rw-r--r--src/ssl/tls_client.cpp10
-rw-r--r--src/ssl/tls_client.h12
-rw-r--r--src/ssl/tls_connection.h6
-rw-r--r--src/ssl/tls_exceptn.h2
-rw-r--r--src/ssl/tls_magic.h6
-rw-r--r--src/ssl/tls_messages.h4
-rw-r--r--src/ssl/tls_policy.cpp82
-rw-r--r--src/ssl/tls_policy.h39
-rw-r--r--src/ssl/tls_record.h6
-rw-r--r--src/ssl/tls_server.cpp6
-rw-r--r--src/ssl/tls_server.h10
-rw-r--r--src/ssl/tls_session_key.cpp2
-rw-r--r--src/ssl/tls_session_key.h6
-rw-r--r--src/ssl/tls_state.h6
-rw-r--r--src/ssl/tls_suites.cpp2
-rw-r--r--src/ssl/tls_suites.h6
-rw-r--r--src/ssl/unix_socket/unx_sock.cpp2
-rw-r--r--src/ssl/unix_socket/unx_sock.h8
31 files changed, 103 insertions, 152 deletions
diff --git a/src/ssl/c_kex.cpp b/src/ssl/c_kex.cpp
index 298b22a89..bc16f4e86 100644
--- a/src/ssl/c_kex.cpp
+++ b/src/ssl/c_kex.cpp
@@ -1,5 +1,5 @@
/**
-* Client Key Exchange Message Source File
+* Client Key Exchange Message
* (C) 2004-2008 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/cert_req.cpp b/src/ssl/cert_req.cpp
index fcd161c95..4431a4a39 100644
--- a/src/ssl/cert_req.cpp
+++ b/src/ssl/cert_req.cpp
@@ -1,5 +1,5 @@
/**
-* Certificate Request Message Source File
+* Certificate Request Message
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/cert_ver.cpp b/src/ssl/cert_ver.cpp
index c75a96c4c..8fccb7508 100644
--- a/src/ssl/cert_ver.cpp
+++ b/src/ssl/cert_ver.cpp
@@ -1,5 +1,5 @@
/**
-* Certificate Verify Message Source File
+* Certificate Verify Message
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/finished.cpp b/src/ssl/finished.cpp
index 91193c6be..edbd4a3fe 100644
--- a/src/ssl/finished.cpp
+++ b/src/ssl/finished.cpp
@@ -1,5 +1,5 @@
/**
-* Finished Message Source File
+* Finished Message
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/handshake_hash.cpp b/src/ssl/handshake_hash.cpp
index 9690a0edb..d94fa0178 100644
--- a/src/ssl/handshake_hash.cpp
+++ b/src/ssl/handshake_hash.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Handshake Hash Source File
+* TLS Handshake Hash
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/handshake_hash.h b/src/ssl/handshake_hash.h
index 4e7c1f528..8d6b11e79 100644
--- a/src/ssl/handshake_hash.h
+++ b/src/ssl/handshake_hash.h
@@ -1,12 +1,12 @@
/**
-* TLS Handshake Hash Source File
+* TLS Handshake Hash
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_HANDSHAKE_HASH__
-#define BOTAN_HANDSHAKE_HASH__
+#ifndef BOTAN_TLS_HANDSHAKE_HASH__
+#define BOTAN_TLS_HANDSHAKE_HASH__
#include <botan/secmem.h>
diff --git a/src/ssl/handshake_state.cpp b/src/ssl/handshake_state.cpp
index 82d901921..314625057 100644
--- a/src/ssl/handshake_state.cpp
+++ b/src/ssl/handshake_state.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Handshaking Source File
+* TLS Handshaking
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/hello.cpp b/src/ssl/hello.cpp
index 4f7676bb3..c3e89c6cf 100644
--- a/src/ssl/hello.cpp
+++ b/src/ssl/hello.cpp
@@ -63,7 +63,7 @@ void Hello_Request::deserialize(const MemoryRegion<byte>& buf)
* Create a new Client Hello message
*/
Client_Hello::Client_Hello(RandomNumberGenerator& rng,
- Record_Writer& writer, const Policy* policy,
+ Record_Writer& writer, const TLS_Policy* policy,
HandshakeHash& hash)
{
c_random.resize(32);
@@ -166,7 +166,7 @@ bool Client_Hello::offered_suite(u16bit ciphersuite) const
* Create a new Server Hello message
*/
Server_Hello::Server_Hello(RandomNumberGenerator& rng,
- Record_Writer& writer, const Policy* policy,
+ Record_Writer& writer, const TLS_Policy* policy,
const std::vector<X509_Certificate>& certs,
const Client_Hello& c_hello, Version_Code ver,
HandshakeHash& hash)
diff --git a/src/ssl/rec_read.cpp b/src/ssl/rec_read.cpp
index c881119cd..95059dbf2 100644
--- a/src/ssl/rec_read.cpp
+++ b/src/ssl/rec_read.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Record Reading Source File
+* TLS Record Reading
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/rec_wri.cpp b/src/ssl/rec_wri.cpp
index 4345241ee..258b4ec17 100644
--- a/src/ssl/rec_wri.cpp
+++ b/src/ssl/rec_wri.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Record Writing Source File
+* TLS Record Writing
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/s_kex.cpp b/src/ssl/s_kex.cpp
index e1decfe84..335b3f707 100644
--- a/src/ssl/s_kex.cpp
+++ b/src/ssl/s_kex.cpp
@@ -1,5 +1,5 @@
/**
-* Server Key Exchange Message Source File
+* Server Key Exchange Message
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/socket.h b/src/ssl/socket.h
index ca358919c..3d893ea77 100644
--- a/src/ssl/socket.h
+++ b/src/ssl/socket.h
@@ -1,12 +1,12 @@
/**
-* Socket Interface Header File
+* Socket Interface
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_SOCKET_H__
-#define BOTAN_SOCKET_H__
+#ifndef BOTAN_TLS_SOCKET_H__
+#define BOTAN_TLS_SOCKET_H__
#include <botan/types.h>
#include <string>
diff --git a/src/ssl/tls_alerts.h b/src/ssl/tls_alerts.h
index 8bc112761..894bca4af 100644
--- a/src/ssl/tls_alerts.h
+++ b/src/ssl/tls_alerts.h
@@ -1,12 +1,12 @@
/**
-* Alert Message Header File
+* Alert Message
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_ALERT_H__
-#define BOTAN_ALERT_H__
+#ifndef BOTAN_TLS_ALERT_H__
+#define BOTAN_TLS_ALERT_H__
#include <botan/tls_exceptn.h>
diff --git a/src/ssl/tls_client.cpp b/src/ssl/tls_client.cpp
index 9302311c9..3cad7ef77 100644
--- a/src/ssl/tls_client.cpp
+++ b/src/ssl/tls_client.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Client Source File
+* TLS Client
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
@@ -82,8 +82,8 @@ void client_check_state(Handshake_Type new_msg, Handshake_State* state)
* TLS Client Constructor
*/
TLS_Client::TLS_Client(RandomNumberGenerator& r,
- Socket& sock, const Policy* pol) :
- rng(r), writer(sock), reader(sock), policy(pol ? pol : new Policy)
+ Socket& sock, const TLS_Policy* pol) :
+ rng(r), writer(sock), reader(sock), policy(pol ? pol : new TLS_Policy)
{
peer_id = sock.peer_id();
@@ -95,8 +95,8 @@ TLS_Client::TLS_Client(RandomNumberGenerator& r,
*/
TLS_Client::TLS_Client(RandomNumberGenerator& r,
Socket& sock, const X509_Certificate& cert,
- const PKCS8_PrivateKey& key, const Policy* pol) :
- rng(r), writer(sock), reader(sock), policy(pol ? pol : new Policy)
+ const PKCS8_PrivateKey& key, const TLS_Policy* pol) :
+ rng(r), writer(sock), reader(sock), policy(pol ? pol : new TLS_Policy)
{
peer_id = sock.peer_id();
diff --git a/src/ssl/tls_client.h b/src/ssl/tls_client.h
index 720531c67..27172029c 100644
--- a/src/ssl/tls_client.h
+++ b/src/ssl/tls_client.h
@@ -1,12 +1,12 @@
/**
-* TLS Client Header File
+* TLS Client
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_CLIENT_H__
-#define BOTAN_CLIENT_H__
+#ifndef BOTAN_TLS_CLIENT_H__
+#define BOTAN_TLS_CLIENT_H__
#include <botan/tls_connection.h>
#include <botan/tls_state.h>
@@ -32,12 +32,12 @@ class BOTAN_DLL TLS_Client : public TLS_Connection
bool is_closed() const;
TLS_Client(RandomNumberGenerator& rng,
- Socket&, const Policy* = 0);
+ Socket&, const TLS_Policy* = 0);
// FIXME: support multiple cert/key pairs
TLS_Client(RandomNumberGenerator& rng,
Socket&, const X509_Certificate&, const PKCS8_PrivateKey&,
- const Policy* = 0);
+ const TLS_Policy* = 0);
~TLS_Client();
private:
@@ -54,7 +54,7 @@ class BOTAN_DLL TLS_Client : public TLS_Connection
Record_Writer writer;
Record_Reader reader;
- const Policy* policy;
+ const TLS_Policy* policy;
std::vector<X509_Certificate> certs, peer_certs;
std::vector<PKCS8_PrivateKey*> keys;
diff --git a/src/ssl/tls_connection.h b/src/ssl/tls_connection.h
index aa46b5847..ff55cceab 100644
--- a/src/ssl/tls_connection.h
+++ b/src/ssl/tls_connection.h
@@ -1,12 +1,12 @@
/**
-* TLS Connection Header File
+* TLS Connection
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_CONNECTION_H__
-#define BOTAN_CONNECTION_H__
+#ifndef BOTAN_TLS_CONNECTION_H__
+#define BOTAN_TLS_CONNECTION_H__
#include <botan/x509cert.h>
#include <vector>
diff --git a/src/ssl/tls_exceptn.h b/src/ssl/tls_exceptn.h
index ed9d990a2..3ba852875 100644
--- a/src/ssl/tls_exceptn.h
+++ b/src/ssl/tls_exceptn.h
@@ -1,5 +1,5 @@
/**
-* Exceptions Header File
+* Exceptions
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/tls_magic.h b/src/ssl/tls_magic.h
index 2b894a862..0d98f643e 100644
--- a/src/ssl/tls_magic.h
+++ b/src/ssl/tls_magic.h
@@ -1,12 +1,12 @@
/**
-* SSL/TLS Protocol Constants Header File
+* SSL/TLS Protocol Constants
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_PROTOCOL_MAGIC_H__
-#define BOTAN_PROTOCOL_MAGIC_H__
+#ifndef BOTAN_TLS_PROTOCOL_MAGIC_H__
+#define BOTAN_TLS_PROTOCOL_MAGIC_H__
namespace Botan {
diff --git a/src/ssl/tls_messages.h b/src/ssl/tls_messages.h
index 87bfdde05..4750a1d1d 100644
--- a/src/ssl/tls_messages.h
+++ b/src/ssl/tls_messages.h
@@ -52,7 +52,7 @@ class BOTAN_DLL Client_Hello : public HandshakeMessage
bool offered_suite(u16bit) const;
Client_Hello(RandomNumberGenerator& rng,
- Record_Writer&, const Policy*, HandshakeHash&);
+ Record_Writer&, const TLS_Policy*, HandshakeHash&);
Client_Hello(const MemoryRegion<byte>& buf) { deserialize(buf); }
private:
@@ -215,7 +215,7 @@ class BOTAN_DLL Server_Hello : public HandshakeMessage
SecureVector<byte> random() const { return s_random; }
Server_Hello(RandomNumberGenerator& rng,
- Record_Writer&, const Policy*,
+ Record_Writer&, const TLS_Policy*,
const std::vector<X509_Certificate>&,
const Client_Hello&, Version_Code, HandshakeHash&);
diff --git a/src/ssl/tls_policy.cpp b/src/ssl/tls_policy.cpp
index 42e855379..88fe27631 100644
--- a/src/ssl/tls_policy.cpp
+++ b/src/ssl/tls_policy.cpp
@@ -1,5 +1,5 @@
/**
-* Policies Source File
+* Policies
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
@@ -13,7 +13,7 @@ namespace Botan {
/**
* Return allowed ciphersuites
*/
-std::vector<u16bit> Policy::ciphersuites() const
+std::vector<u16bit> TLS_Policy::ciphersuites() const
{
return suite_list(allow_static_rsa(), allow_edh_rsa(), allow_edh_dsa());
}
@@ -21,8 +21,9 @@ std::vector<u16bit> Policy::ciphersuites() const
/**
* Return allowed ciphersuites
*/
-std::vector<u16bit> Policy::suite_list(bool use_rsa, bool use_edh_rsa,
- bool use_edh_dsa) const
+std::vector<u16bit> TLS_Policy::suite_list(bool use_rsa,
+ bool use_edh_rsa,
+ bool use_edh_dsa) const
{
std::vector<u16bit> suites;
@@ -51,7 +52,7 @@ std::vector<u16bit> Policy::suite_list(bool use_rsa, bool use_edh_rsa,
if(suites.size() == 0)
throw TLS_Exception(INTERNAL_ERROR,
- "Policy error: All ciphersuites disabled");
+ "TLS_Policy error: All ciphersuites disabled");
return suites;
}
@@ -59,7 +60,7 @@ std::vector<u16bit> Policy::suite_list(bool use_rsa, bool use_edh_rsa,
/**
* Return allowed compression algorithms
*/
-std::vector<byte> Policy::compression() const
+std::vector<byte> TLS_Policy::compression() const
{
std::vector<byte> algs;
algs.push_back(NO_COMPRESSION);
@@ -69,8 +70,9 @@ std::vector<byte> Policy::compression() const
/**
* Choose which ciphersuite to use
*/
-u16bit Policy::choose_suite(const std::vector<u16bit>& c_suites,
- bool have_rsa, bool have_dsa) const
+u16bit TLS_Policy::choose_suite(const std::vector<u16bit>& c_suites,
+ bool have_rsa,
+ bool have_dsa) const
{
bool use_static_rsa = allow_static_rsa() && have_rsa;
bool use_edh_rsa = allow_edh_rsa() && have_rsa;
@@ -90,7 +92,7 @@ u16bit Policy::choose_suite(const std::vector<u16bit>& c_suites,
/**
* Choose which compression algorithm to use
*/
-byte Policy::choose_compression(const std::vector<byte>& c_comp) const
+byte TLS_Policy::choose_compression(const std::vector<byte>& c_comp) const
{
std::vector<byte> s_comp = compression();
@@ -103,74 +105,18 @@ byte Policy::choose_compression(const std::vector<byte>& c_comp) const
}
/**
-* Return the minimum acceptable SSL/TLS version
-*/
-Version_Code Policy::min_version() const
- {
- return SSL_V3;
- }
-
-/**
-* Return the preferable SSL/TLS version
-*/
-Version_Code Policy::pref_version() const
- {
- return TLS_V10;
- }
-
-/**
-* Check if static RSA keying is allowed
-*/
-bool Policy::allow_static_rsa() const
- {
- return true;
- }
-
-/**
-* Check if RSA with empheral DH is allowed
-*/
-bool Policy::allow_edh_rsa() const
- {
- return true;
- }
-
-/**
-* Check if DSA with empheral DH is allowed
-*/
-bool Policy::allow_edh_dsa() const
- {
- return true;
- }
-
-/**
-* Check if client authentication is required
-*/
-bool Policy::require_client_auth() const
- {
- return false;
- }
-
-/**
* Return the group to use for empheral DH
*/
-DL_Group Policy::dh_group() const
+DL_Group TLS_Policy::dh_group() const
{
return DL_Group("IETF-1024");
}
/**
-* Return the size to use for an empheral RSA key
-*/
-u32bit Policy::rsa_export_keysize() const
- {
- return 512;
- }
-
-/**
* Default certificate check
*/
-bool Policy::check_cert(const std::vector<X509_Certificate>&,
- const std::string&) const
+bool TLS_Policy::check_cert(const std::vector<X509_Certificate>&,
+ const std::string&) const
{
return true;
}
diff --git a/src/ssl/tls_policy.h b/src/ssl/tls_policy.h
index 081cebaea..98297181c 100644
--- a/src/ssl/tls_policy.h
+++ b/src/ssl/tls_policy.h
@@ -1,12 +1,12 @@
/**
-* Policies Header File
+* Policies
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_POLICY_H__
-#define BOTAN_POLICY_H__
+#ifndef BOTAN_TLS_POLICY_H__
+#define BOTAN_TLS_POLICY_H__
#include <botan/tls_magic.h>
#include <botan/x509cert.h>
@@ -16,35 +16,40 @@
namespace Botan {
/**
-* Policy Base Class
+* TLS_Policy Base Class
+* Inherit and overload as desired to suite local policy concerns
*/
-class BOTAN_DLL Policy
+class BOTAN_DLL TLS_Policy
{
public:
std::vector<u16bit> ciphersuites() const;
virtual std::vector<byte> compression() const;
- virtual u16bit choose_suite(const std::vector<u16bit>&,
- bool, bool) const;
- virtual byte choose_compression(const std::vector<byte>&) const;
+ virtual u16bit choose_suite(const std::vector<u16bit>& client_suites,
+ bool rsa_ok,
+ bool dsa_ok) const;
- virtual bool allow_static_rsa() const;
- virtual bool allow_edh_rsa() const;
- virtual bool allow_edh_dsa() const;
- virtual bool require_client_auth() const;
+ virtual byte choose_compression(const std::vector<byte>& client) const;
+
+ virtual bool allow_static_rsa() const { return true; }
+ virtual bool allow_edh_rsa() const { return true; }
+ virtual bool allow_edh_dsa() const { return true; }
+ virtual bool require_client_auth() const { return false; }
virtual DL_Group dh_group() const;
- virtual u32bit rsa_export_keysize() const;
+ virtual u32bit rsa_export_keysize() const { return 512; }
- virtual Version_Code min_version() const;
- virtual Version_Code pref_version() const;
+ virtual Version_Code min_version() const { return SSL_V3; }
+ virtual Version_Code pref_version() const { return TLS_V10; }
virtual bool check_cert(const std::vector<X509_Certificate>&,
const std::string&) const;
- virtual ~Policy() {}
+ virtual ~TLS_Policy() {}
private:
- virtual std::vector<u16bit> suite_list(bool, bool, bool) const;
+ virtual std::vector<u16bit> suite_list(bool use_rsa,
+ bool use_edh_rsa,
+ bool use_edh_dsa) const;
};
}
diff --git a/src/ssl/tls_record.h b/src/ssl/tls_record.h
index 420ec7d50..3bec2e8ef 100644
--- a/src/ssl/tls_record.h
+++ b/src/ssl/tls_record.h
@@ -1,12 +1,12 @@
/**
-* TLS Record Handling Header File
+* TLS Record Handling
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_RECORDS_H__
-#define BOTAN_RECORDS_H__
+#ifndef BOTAN_TLS_RECORDS_H__
+#define BOTAN_TLS_RECORDS_H__
#include <botan/tls_session_key.h>
#include <botan/socket.h>
diff --git a/src/ssl/tls_server.cpp b/src/ssl/tls_server.cpp
index 6ee4f51d2..84d961423 100644
--- a/src/ssl/tls_server.cpp
+++ b/src/ssl/tls_server.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Server Source File
+* TLS Server
* (C) 2004-2008 Jack Lloyd
*
* Released under the terms of the Botan license
@@ -87,8 +87,8 @@ void server_check_state(Handshake_Type new_msg, Handshake_State* state)
*/
TLS_Server::TLS_Server(RandomNumberGenerator& r,
Socket& sock, const X509_Certificate& cert,
- const PKCS8_PrivateKey& key, const Policy* pol) :
- rng(r), writer(sock), reader(sock), policy(pol ? pol : new Policy)
+ const PKCS8_PrivateKey& key, const TLS_Policy* pol) :
+ rng(r), writer(sock), reader(sock), policy(pol ? pol : new TLS_Policy)
{
peer_id = sock.peer_id();
diff --git a/src/ssl/tls_server.h b/src/ssl/tls_server.h
index 2cc7f0601..c191c1663 100644
--- a/src/ssl/tls_server.h
+++ b/src/ssl/tls_server.h
@@ -1,12 +1,12 @@
/**
-* TLS Server Header File
+* TLS Server
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_SERVER_H__
-#define BOTAN_SERVER_H__
+#ifndef BOTAN_TLS_SERVER_H__
+#define BOTAN_TLS_SERVER_H__
#include <botan/tls_connection.h>
#include <botan/tls_state.h>
@@ -35,7 +35,7 @@ class BOTAN_DLL TLS_Server
TLS_Server(RandomNumberGenerator& rng,
Socket&,
const X509_Certificate&, const PKCS8_PrivateKey&,
- const Policy* = 0);
+ const TLS_Policy* = 0);
~TLS_Server();
private:
@@ -51,7 +51,7 @@ class BOTAN_DLL TLS_Server
Record_Writer writer;
Record_Reader reader;
- const Policy* policy;
+ const TLS_Policy* policy;
// FIXME: rename to match TLS_Client
std::vector<X509_Certificate> cert_chain, peer_certs;
diff --git a/src/ssl/tls_session_key.cpp b/src/ssl/tls_session_key.cpp
index 15dc24072..83c06ba07 100644
--- a/src/ssl/tls_session_key.cpp
+++ b/src/ssl/tls_session_key.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Session Key Source File
+* TLS Session Key
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/tls_session_key.h b/src/ssl/tls_session_key.h
index 62e18e645..b0eba2eb1 100644
--- a/src/ssl/tls_session_key.h
+++ b/src/ssl/tls_session_key.h
@@ -1,12 +1,12 @@
/**
-* TLS Session Key Header File
+* TLS Session Key
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_SESSION_KEYS_H__
-#define BOTAN_SESSION_KEYS_H__
+#ifndef BOTAN_TLS_SESSION_KEYS_H__
+#define BOTAN_TLS_SESSION_KEYS_H__
#include <botan/tls_suites.h>
#include <botan/tls_exceptn.h>
diff --git a/src/ssl/tls_state.h b/src/ssl/tls_state.h
index fd192c9ae..5a3aa894a 100644
--- a/src/ssl/tls_state.h
+++ b/src/ssl/tls_state.h
@@ -1,12 +1,12 @@
/**
-* TLS Handshaking Header File
+* TLS Handshaking
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_HANDSHAKE_H__
-#define BOTAN_HANDSHAKE_H__
+#ifndef BOTAN_TLS_HANDSHAKE_H__
+#define BOTAN_TLS_HANDSHAKE_H__
#include <botan/tls_messages.h>
#include <botan/secqueue.h>
diff --git a/src/ssl/tls_suites.cpp b/src/ssl/tls_suites.cpp
index 1146d81d8..26fa75428 100644
--- a/src/ssl/tls_suites.cpp
+++ b/src/ssl/tls_suites.cpp
@@ -1,5 +1,5 @@
/**
-* TLS Cipher Suites Source File
+* TLS Cipher Suites
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/tls_suites.h b/src/ssl/tls_suites.h
index a967655ff..b7008e8db 100644
--- a/src/ssl/tls_suites.h
+++ b/src/ssl/tls_suites.h
@@ -1,12 +1,12 @@
/**
-* Cipher Suites Header File
+* Cipher Suites
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_CIPHERSUITES_H__
-#define BOTAN_CIPHERSUITES_H__
+#ifndef BOTAN_TLS_CIPHERSUITES_H__
+#define BOTAN_TLS_CIPHERSUITES_H__
#include <botan/types.h>
#include <string>
diff --git a/src/ssl/unix_socket/unx_sock.cpp b/src/ssl/unix_socket/unx_sock.cpp
index fd99e9015..ca4d476b7 100644
--- a/src/ssl/unix_socket/unx_sock.cpp
+++ b/src/ssl/unix_socket/unx_sock.cpp
@@ -1,5 +1,5 @@
/**
-* Unix Socket Source File
+* Unix Socket
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
diff --git a/src/ssl/unix_socket/unx_sock.h b/src/ssl/unix_socket/unx_sock.h
index 91c70ce80..c1ff53ae3 100644
--- a/src/ssl/unix_socket/unx_sock.h
+++ b/src/ssl/unix_socket/unx_sock.h
@@ -1,12 +1,12 @@
-/**
-* Unix Socket Header File
+/*
+* Unix Socket
* (C) 2004-2006 Jack Lloyd
*
* Released under the terms of the Botan license
*/
-#ifndef BOTAN_UNIX_SOCKET_H__
-#define BOTAN_UNIX_SOCKET_H__
+#ifndef BOTAN_TLS_SOCKET_UNIX_H__
+#define BOTAN_TLS_SOCKET_UNIX_H__
#include <botan/socket.h>