aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-24 16:09:24 -0500
committerJack Lloyd <[email protected]>2016-12-24 16:09:24 -0500
commit2ee2d884167e43f84830cd45af63ddbf245b540b (patch)
treed33d62853a41c42dafee9a2f6bce25121cd44434 /src
parent8e89a86af7e609a83d9c75696fec1f9a61d822fb (diff)
parent733fdcd01a4a58ea439e95c1cc4e37c2a5cd366d (diff)
Merge GH #783 Expose TLS message types to applications
Diffstat (limited to 'src')
-rw-r--r--src/lib/tls/info.txt4
-rw-r--r--src/lib/tls/msg_cert_req.cpp5
-rw-r--r--src/lib/tls/msg_cert_status.cpp5
-rw-r--r--src/lib/tls/msg_cert_verify.cpp5
-rw-r--r--src/lib/tls/msg_certificate.cpp5
-rw-r--r--src/lib/tls/msg_client_hello.cpp5
-rw-r--r--src/lib/tls/msg_client_kex.cpp6
-rw-r--r--src/lib/tls/msg_finished.cpp3
-rw-r--r--src/lib/tls/msg_hello_verify.cpp2
-rw-r--r--src/lib/tls/msg_server_hello.cpp5
-rw-r--r--src/lib/tls/msg_server_kex.cpp5
-rw-r--r--src/lib/tls/msg_session_ticket.cpp5
-rw-r--r--src/lib/tls/tls_channel.cpp2
-rw-r--r--src/lib/tls/tls_client.cpp2
-rw-r--r--src/lib/tls/tls_extensions.cpp2
-rw-r--r--src/lib/tls/tls_handshake_io.cpp2
-rw-r--r--src/lib/tls/tls_handshake_state.cpp2
-rw-r--r--src/lib/tls/tls_messages.h4
-rw-r--r--src/lib/tls/tls_server.cpp2
-rw-r--r--src/lib/tls/tls_session_key.cpp2
-rw-r--r--src/tests/test_tls_messages.cpp3
21 files changed, 45 insertions, 31 deletions
diff --git a/src/lib/tls/info.txt b/src/lib/tls/info.txt
index 667726318..86d651730 100644
--- a/src/lib/tls/info.txt
+++ b/src/lib/tls/info.txt
@@ -11,8 +11,10 @@ tls_channel.h
tls_ciphersuite.h
tls_client.h
tls_exceptn.h
+tls_extensions.h
tls_handshake_msg.h
tls_magic.h
+tls_messages.h
tls_server_info.h
tls_policy.h
tls_server.h
@@ -22,11 +24,9 @@ tls_version.h
</header:public>
<header:internal>
-tls_extensions.h
tls_handshake_hash.h
tls_handshake_io.h
tls_handshake_state.h
-tls_messages.h
tls_reader.h
tls_record.h
tls_seq_numbers.h
diff --git a/src/lib/tls/msg_cert_req.cpp b/src/lib/tls/msg_cert_req.cpp
index 484693fcc..6488034ef 100644
--- a/src/lib/tls/msg_cert_req.cpp
+++ b/src/lib/tls/msg_cert_req.cpp
@@ -5,10 +5,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/loadstor.h>
diff --git a/src/lib/tls/msg_cert_status.cpp b/src/lib/tls/msg_cert_status.cpp
index bd982f506..8ad37336b 100644
--- a/src/lib/tls/msg_cert_status.cpp
+++ b/src/lib/tls/msg_cert_status.cpp
@@ -5,10 +5,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
diff --git a/src/lib/tls/msg_cert_verify.cpp b/src/lib/tls/msg_cert_verify.cpp
index 4f936b380..4b7ba5662 100644
--- a/src/lib/tls/msg_cert_verify.cpp
+++ b/src/lib/tls/msg_cert_verify.cpp
@@ -5,10 +5,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_state.h>
namespace Botan {
diff --git a/src/lib/tls/msg_certificate.cpp b/src/lib/tls/msg_certificate.cpp
index 1fc6bf959..e00bec926 100644
--- a/src/lib/tls/msg_certificate.cpp
+++ b/src/lib/tls/msg_certificate.cpp
@@ -5,10 +5,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/loadstor.h>
diff --git a/src/lib/tls/msg_client_hello.cpp b/src/lib/tls/msg_client_hello.cpp
index 99c7b6e2e..6db8b19f0 100644
--- a/src/lib/tls/msg_client_hello.cpp
+++ b/src/lib/tls/msg_client_hello.cpp
@@ -6,10 +6,13 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_alert.h>
+#include <botan/tls_exceptn.h>
#include <botan/internal/tls_reader.h>
#include <botan/internal/tls_session_key.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/internal/stl_util.h>
#include <chrono>
diff --git a/src/lib/tls/msg_client_kex.cpp b/src/lib/tls/msg_client_kex.cpp
index c9c63c673..2d132af04 100644
--- a/src/lib/tls/msg_client_kex.cpp
+++ b/src/lib/tls/msg_client_kex.cpp
@@ -5,10 +5,12 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_state.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/credentials_manager.h>
#include <botan/rng.h>
#include <botan/loadstor.h>
diff --git a/src/lib/tls/msg_finished.cpp b/src/lib/tls/msg_finished.cpp
index 18398e48b..f00311729 100644
--- a/src/lib/tls/msg_finished.cpp
+++ b/src/lib/tls/msg_finished.cpp
@@ -5,8 +5,9 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_state.h>
namespace Botan {
diff --git a/src/lib/tls/msg_hello_verify.cpp b/src/lib/tls/msg_hello_verify.cpp
index 34b7bb3d5..af5349c1c 100644
--- a/src/lib/tls/msg_hello_verify.cpp
+++ b/src/lib/tls/msg_hello_verify.cpp
@@ -5,7 +5,7 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
#include <botan/mac.h>
namespace Botan {
diff --git a/src/lib/tls/msg_server_hello.cpp b/src/lib/tls/msg_server_hello.cpp
index 9d84a29e0..d44fb5bc6 100644
--- a/src/lib/tls/msg_server_hello.cpp
+++ b/src/lib/tls/msg_server_hello.cpp
@@ -6,11 +6,12 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
#include <botan/internal/tls_session_key.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/internal/stl_util.h>
namespace Botan {
diff --git a/src/lib/tls/msg_server_kex.cpp b/src/lib/tls/msg_server_kex.cpp
index 244d97611..2ffa39a79 100644
--- a/src/lib/tls/msg_server_kex.cpp
+++ b/src/lib/tls/msg_server_kex.cpp
@@ -5,10 +5,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
-#include <botan/internal/tls_extensions.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_state.h>
#include <botan/credentials_manager.h>
#include <botan/loadstor.h>
#include <botan/pubkey.h>
diff --git a/src/lib/tls/msg_session_ticket.cpp b/src/lib/tls/msg_session_ticket.cpp
index 7a24c9dbd..28204958f 100644
--- a/src/lib/tls/msg_session_ticket.cpp
+++ b/src/lib/tls/msg_session_ticket.cpp
@@ -5,10 +5,11 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_messages.h>
-#include <botan/internal/tls_extensions.h>
+#include <botan/tls_messages.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
#include <botan/internal/tls_handshake_io.h>
+#include <botan/internal/tls_handshake_hash.h>
#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/lib/tls/tls_channel.cpp b/src/lib/tls/tls_channel.cpp
index cc7b7df6b..52a62693e 100644
--- a/src/lib/tls/tls_channel.cpp
+++ b/src/lib/tls/tls_channel.cpp
@@ -7,8 +7,8 @@
*/
#include <botan/tls_channel.h>
+#include <botan/tls_messages.h>
#include <botan/internal/tls_handshake_state.h>
-#include <botan/internal/tls_messages.h>
#include <botan/internal/tls_record.h>
#include <botan/internal/tls_seq_numbers.h>
#include <botan/internal/rounding.h>
diff --git a/src/lib/tls/tls_client.cpp b/src/lib/tls/tls_client.cpp
index 16179832a..d866b5a1f 100644
--- a/src/lib/tls/tls_client.cpp
+++ b/src/lib/tls/tls_client.cpp
@@ -7,8 +7,8 @@
*/
#include <botan/tls_client.h>
+#include <botan/tls_messages.h>
#include <botan/internal/tls_handshake_state.h>
-#include <botan/internal/tls_messages.h>
#include <botan/internal/stl_util.h>
#include <iterator>
#include <sstream>
diff --git a/src/lib/tls/tls_extensions.cpp b/src/lib/tls/tls_extensions.cpp
index 85379a817..7692b2fd3 100644
--- a/src/lib/tls/tls_extensions.cpp
+++ b/src/lib/tls/tls_extensions.cpp
@@ -6,7 +6,7 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
-#include <botan/internal/tls_extensions.h>
+#include <botan/tls_extensions.h>
#include <botan/internal/tls_reader.h>
#include <botan/tls_exceptn.h>
diff --git a/src/lib/tls/tls_handshake_io.cpp b/src/lib/tls/tls_handshake_io.cpp
index 159e7289a..ec9ae16f1 100644
--- a/src/lib/tls/tls_handshake_io.cpp
+++ b/src/lib/tls/tls_handshake_io.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/internal/tls_handshake_io.h>
-#include <botan/internal/tls_messages.h>
#include <botan/internal/tls_record.h>
#include <botan/internal/tls_seq_numbers.h>
+#include <botan/tls_messages.h>
#include <botan/exceptn.h>
#include <chrono>
diff --git a/src/lib/tls/tls_handshake_state.cpp b/src/lib/tls/tls_handshake_state.cpp
index 461f60cc4..6d46c18ab 100644
--- a/src/lib/tls/tls_handshake_state.cpp
+++ b/src/lib/tls/tls_handshake_state.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/internal/tls_handshake_state.h>
-#include <botan/internal/tls_messages.h>
#include <botan/internal/tls_record.h>
+#include <botan/tls_messages.h>
#include <botan/tls_callbacks.h>
namespace Botan {
diff --git a/src/lib/tls/tls_messages.h b/src/lib/tls/tls_messages.h
index 30a037e8e..8e08b6e87 100644
--- a/src/lib/tls/tls_messages.h
+++ b/src/lib/tls/tls_messages.h
@@ -9,8 +9,7 @@
#ifndef BOTAN_TLS_MESSAGES_H__
#define BOTAN_TLS_MESSAGES_H__
-#include <botan/internal/tls_handshake_state.h>
-#include <botan/internal/tls_extensions.h>
+#include <botan/tls_extensions.h>
#include <botan/tls_handshake_msg.h>
#include <botan/tls_session.h>
#include <botan/tls_policy.h>
@@ -37,6 +36,7 @@ namespace TLS {
class Session;
class Handshake_IO;
+class Handshake_State;
std::vector<uint8_t> make_hello_random(RandomNumberGenerator& rng,
const Policy& policy);
diff --git a/src/lib/tls/tls_server.cpp b/src/lib/tls/tls_server.cpp
index 1d42a6d25..f509122a8 100644
--- a/src/lib/tls/tls_server.cpp
+++ b/src/lib/tls/tls_server.cpp
@@ -7,8 +7,8 @@
*/
#include <botan/tls_server.h>
+#include <botan/tls_messages.h>
#include <botan/internal/tls_handshake_state.h>
-#include <botan/internal/tls_messages.h>
#include <botan/internal/stl_util.h>
#include <botan/tls_magic.h>
diff --git a/src/lib/tls/tls_session_key.cpp b/src/lib/tls/tls_session_key.cpp
index d2aff858f..9e8dab86e 100644
--- a/src/lib/tls/tls_session_key.cpp
+++ b/src/lib/tls/tls_session_key.cpp
@@ -7,7 +7,7 @@
#include <botan/internal/tls_session_key.h>
#include <botan/internal/tls_handshake_state.h>
-#include <botan/internal/tls_messages.h>
+#include <botan/tls_messages.h>
namespace Botan {
diff --git a/src/tests/test_tls_messages.cpp b/src/tests/test_tls_messages.cpp
index 66c422909..d4a9a27fd 100644
--- a/src/tests/test_tls_messages.cpp
+++ b/src/tests/test_tls_messages.cpp
@@ -12,7 +12,8 @@
#include <botan/mac.h>
#include <botan/tls_ciphersuite.h>
#include <botan/tls_handshake_msg.h>
- #include <botan/internal/tls_messages.h>
+ #include <botan/tls_messages.h>
+ #include <botan/tls_alert.h>
#endif
namespace Botan_Tests {