diff options
author | lloyd <[email protected]> | 2010-06-17 21:48:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-17 21:48:55 +0000 |
commit | c06b260b3328c5ce4be44c4f1a88feb55ee3dbc4 (patch) | |
tree | 41b05df5982b5b2e8a23b55972263d2172d6a9fd /src/ssl | |
parent | 0eecae9f21172c0a74ad62acaf77148c94a25be7 (diff) | |
parent | 3dde5683f69b9cb9f558bfb18087ce35fbbec78a (diff) |
propagate from branch 'net.randombit.botan' (head 294e2082ce9231d6165276e2f2a4153a0116aca3)
to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
Diffstat (limited to 'src/ssl')
32 files changed, 59 insertions, 49 deletions
diff --git a/src/ssl/c_kex.cpp b/src/ssl/c_kex.cpp index db2198627..5194c8c3d 100644 --- a/src/ssl/c_kex.cpp +++ b/src/ssl/c_kex.cpp @@ -1,4 +1,4 @@ -/** +/* * Client Key Exchange Message * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/cert_req.cpp b/src/ssl/cert_req.cpp index 4431a4a39..04d7867c6 100644 --- a/src/ssl/cert_req.cpp +++ b/src/ssl/cert_req.cpp @@ -1,5 +1,5 @@ -/** -* Certificate Request Message +/* +* 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 3edf4266d..dfcf6c7c3 100644 --- a/src/ssl/cert_ver.cpp +++ b/src/ssl/cert_ver.cpp @@ -1,4 +1,4 @@ -/** +/* * Certificate Verify Message * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/finished.cpp b/src/ssl/finished.cpp index b0f6abd25..6648a2c3e 100644 --- a/src/ssl/finished.cpp +++ b/src/ssl/finished.cpp @@ -1,5 +1,5 @@ -/** -* Finished Message +/* +* 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 d94fa0178..2331d015e 100644 --- a/src/ssl/handshake_hash.cpp +++ b/src/ssl/handshake_hash.cpp @@ -1,5 +1,5 @@ -/** -* TLS Handshake Hash +/* +* 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 cfb351765..8e068f3de 100644 --- a/src/ssl/handshake_hash.h +++ b/src/ssl/handshake_hash.h @@ -1,4 +1,4 @@ -/** +/* * TLS Handshake Hash * (C) 2004-2006 Jack Lloyd * diff --git a/src/ssl/handshake_state.cpp b/src/ssl/handshake_state.cpp index 314625057..373d4b57c 100644 --- a/src/ssl/handshake_state.cpp +++ b/src/ssl/handshake_state.cpp @@ -1,5 +1,5 @@ -/** -* TLS Handshaking +/* +* 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 5b3c32278..2fb5bb567 100644 --- a/src/ssl/hello.cpp +++ b/src/ssl/hello.cpp @@ -1,4 +1,4 @@ -/** +/* * TLS Hello Messages * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/rec_read.cpp b/src/ssl/rec_read.cpp index f07744c2a..3c008641d 100644 --- a/src/ssl/rec_read.cpp +++ b/src/ssl/rec_read.cpp @@ -1,4 +1,4 @@ -/** +/* * TLS Record Reading * (C) 2004-2010 Jack Lloyd * @@ -12,7 +12,7 @@ namespace Botan { -/** +/* * Reset the state */ void Record_Reader::reset() @@ -26,7 +26,7 @@ void Record_Reader::reset() seq_no = 0; } -/** +/* * Set the version to use */ void Record_Reader::set_version(Version_Code version) @@ -38,7 +38,7 @@ void Record_Reader::set_version(Version_Code version) minor = (version & 0xFF); } -/** +/* * Set the keys for reading */ void Record_Reader::set_keys(const CipherSuite& suite, const SessionKeys& keys, @@ -74,7 +74,7 @@ void Record_Reader::set_keys(const CipherSuite& suite, const SessionKeys& keys, ); block_size = block_size_of(cipher_algo); - if(major == 3 && minor >= 2) + if(major > 3 || (major == 3 && minor >= 2)) iv_size = block_size; else iv_size = 0; @@ -106,7 +106,7 @@ void Record_Reader::add_input(const byte input[], u32bit input_size) input_queue.write(input, input_size); } -/** +/* * Retrieve the next record */ u32bit Record_Reader::get_record(byte& msg_type, diff --git a/src/ssl/rec_wri.cpp b/src/ssl/rec_wri.cpp index f8079c235..2ee0e20d3 100644 --- a/src/ssl/rec_wri.cpp +++ b/src/ssl/rec_wri.cpp @@ -1,4 +1,4 @@ -/** +/* * TLS Record Writing * (C) 2004-2010 Jack Lloyd * @@ -89,7 +89,7 @@ void Record_Writer::set_keys(const CipherSuite& suite, const SessionKeys& keys, ); block_size = block_size_of(cipher_algo); - if(major == 3 && minor >= 2) + if(major > 3 || (major == 3 && minor >= 2)) iv_size = block_size; else iv_size = 0; diff --git a/src/ssl/s_kex.cpp b/src/ssl/s_kex.cpp index 9b8a3171d..4617d9fb4 100644 --- a/src/ssl/s_kex.cpp +++ b/src/ssl/s_kex.cpp @@ -1,4 +1,4 @@ -/** +/* * Server Key Exchange Message * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/socket.h b/src/ssl/socket.h index 62ceed028..6d88bd48a 100644 --- a/src/ssl/socket.h +++ b/src/ssl/socket.h @@ -1,5 +1,5 @@ -/** -* Socket Interface +/* +* Socket Interface * (C) 2004-2006 Jack Lloyd * * Released under the terms of the Botan license diff --git a/src/ssl/tls_alerts.h b/src/ssl/tls_alerts.h index 894bca4af..f189cf507 100644 --- a/src/ssl/tls_alerts.h +++ b/src/ssl/tls_alerts.h @@ -1,5 +1,5 @@ -/** -* Alert Message +/* +* Alert Message * (C) 2004-2006 Jack Lloyd * * Released under the terms of the Botan license @@ -18,11 +18,19 @@ namespace Botan { class BOTAN_DLL Alert { public: + /** + * @return if this alert is a fatal one or not + */ bool is_fatal() const { return fatal; } + + /** + * @return type of alert + */ Alert_Type type() const { return type_code; } /** * Deserialize an Alert message + * @param buf the serialized alert */ Alert(const MemoryRegion<byte>& buf) { diff --git a/src/ssl/tls_client.cpp b/src/ssl/tls_client.cpp index 8a4275d93..3b63b2119 100644 --- a/src/ssl/tls_client.cpp +++ b/src/ssl/tls_client.cpp @@ -1,4 +1,4 @@ -/** +/* * TLS Client * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_client.h b/src/ssl/tls_client.h index 2439a58f0..c9ed3ca37 100644 --- a/src/ssl/tls_client.h +++ b/src/ssl/tls_client.h @@ -1,4 +1,4 @@ -/** +/* * TLS Client * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_connection.h b/src/ssl/tls_connection.h index ff55cceab..a6de659c4 100644 --- a/src/ssl/tls_connection.h +++ b/src/ssl/tls_connection.h @@ -1,5 +1,5 @@ -/** -* TLS Connection +/* +* TLS Connection * (C) 2004-2006 Jack Lloyd * * Released under the terms of the Botan license diff --git a/src/ssl/tls_exceptn.h b/src/ssl/tls_exceptn.h index 3ba852875..a9efc718a 100644 --- a/src/ssl/tls_exceptn.h +++ b/src/ssl/tls_exceptn.h @@ -1,5 +1,5 @@ -/** -* Exceptions +/* +* 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 93b56d96d..2a0c61e18 100644 --- a/src/ssl/tls_magic.h +++ b/src/ssl/tls_magic.h @@ -1,4 +1,4 @@ -/** +/* * SSL/TLS Protocol Constants * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_messages.h b/src/ssl/tls_messages.h index 5c0c06c88..20aa9b930 100644 --- a/src/ssl/tls_messages.h +++ b/src/ssl/tls_messages.h @@ -1,4 +1,4 @@ -/** +/* * TLS Messages * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_policy.cpp b/src/ssl/tls_policy.cpp index 57fcdb5cc..03a83319c 100644 --- a/src/ssl/tls_policy.cpp +++ b/src/ssl/tls_policy.cpp @@ -1,4 +1,4 @@ -/** +/* * Policies for TLS * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_policy.h b/src/ssl/tls_policy.h index 75d6d7663..5555f0ca6 100644 --- a/src/ssl/tls_policy.h +++ b/src/ssl/tls_policy.h @@ -1,5 +1,5 @@ -/** -* Policies +/* +* Policies * (C) 2004-2006 Jack Lloyd * * Released under the terms of the Botan license diff --git a/src/ssl/tls_reader.h b/src/ssl/tls_reader.h index ff3e63ae8..641d1ecdb 100644 --- a/src/ssl/tls_reader.h +++ b/src/ssl/tls_reader.h @@ -13,6 +13,9 @@ namespace Botan { +/** +* Helper class for decoding TLS protocol messages +*/ class TLS_Data_Reader { public: diff --git a/src/ssl/tls_record.h b/src/ssl/tls_record.h index 2058933d0..863e2c801 100644 --- a/src/ssl/tls_record.h +++ b/src/ssl/tls_record.h @@ -1,4 +1,4 @@ -/** +/* * TLS Record Handling * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_server.cpp b/src/ssl/tls_server.cpp index a4cfcf7de..2a84fa063 100644 --- a/src/ssl/tls_server.cpp +++ b/src/ssl/tls_server.cpp @@ -1,4 +1,4 @@ -/** +/* * TLS Server * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_server.h b/src/ssl/tls_server.h index 5cf830a64..673f16580 100644 --- a/src/ssl/tls_server.h +++ b/src/ssl/tls_server.h @@ -1,4 +1,4 @@ -/** +/* * TLS Server * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_session_key.cpp b/src/ssl/tls_session_key.cpp index 13575adac..594b99e19 100644 --- a/src/ssl/tls_session_key.cpp +++ b/src/ssl/tls_session_key.cpp @@ -1,5 +1,5 @@ -/** -* TLS Session Key +/* +* 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 b0eba2eb1..98c1b92ff 100644 --- a/src/ssl/tls_session_key.h +++ b/src/ssl/tls_session_key.h @@ -1,5 +1,5 @@ -/** -* TLS Session Key +/* +* TLS Session Key * (C) 2004-2006 Jack Lloyd * * Released under the terms of the Botan license diff --git a/src/ssl/tls_state.h b/src/ssl/tls_state.h index ddf03a822..1472271e3 100644 --- a/src/ssl/tls_state.h +++ b/src/ssl/tls_state.h @@ -1,5 +1,5 @@ -/** -* TLS Handshaking +/* +* TLS Handshaking * (C) 2004-2006 Jack Lloyd * * Released under the terms of the Botan license diff --git a/src/ssl/tls_suites.cpp b/src/ssl/tls_suites.cpp index 5e52e7de2..56e8fee01 100644 --- a/src/ssl/tls_suites.cpp +++ b/src/ssl/tls_suites.cpp @@ -1,4 +1,4 @@ -/** +/* * TLS Cipher Suites * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/tls_suites.h b/src/ssl/tls_suites.h index fa015c28f..612c148e6 100644 --- a/src/ssl/tls_suites.h +++ b/src/ssl/tls_suites.h @@ -1,4 +1,4 @@ -/** +/* * Cipher Suites * (C) 2004-2010 Jack Lloyd * diff --git a/src/ssl/unix_socket/info.txt b/src/ssl/unix_socket/info.txt index 205d0c700..15fc50f5b 100644 --- a/src/ssl/unix_socket/info.txt +++ b/src/ssl/unix_socket/info.txt @@ -16,6 +16,5 @@ ssl linux freebsd netbsd -openbsd solaris </os> diff --git a/src/ssl/unix_socket/unx_sock.cpp b/src/ssl/unix_socket/unx_sock.cpp index 9954cdc06..a7c19b70c 100644 --- a/src/ssl/unix_socket/unx_sock.cpp +++ b/src/ssl/unix_socket/unx_sock.cpp @@ -1,4 +1,4 @@ -/** +/* * Unix Socket * (C) 2004-2010 Jack Lloyd * |