Skip to content

Commit f0c730b

Browse files
committed
Various changes to reduce header dependencies in TLS
1 parent 6689463 commit f0c730b

54 files changed

Lines changed: 398 additions & 228 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/bogo_shim/bogo_shim.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <botan/base64.h>
14+
#include <botan/certstor.h>
1415
#include <botan/chacha_rng.h>
1516
#include <botan/data_src.h>
1617
#include <botan/hex.h>
@@ -21,6 +22,7 @@
2122
#include <botan/tls_callbacks.h>
2223
#include <botan/tls_client.h>
2324
#include <botan/tls_exceptn.h>
25+
#include <botan/tls_extensions.h>
2426
#include <botan/tls_messages.h>
2527
#include <botan/tls_policy.h>
2628
#include <botan/tls_server.h>

src/cli/tls_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
#define BOTAN_CLI_TLS_HELPERS_H_
1010

1111
#include <botan/assert.h>
12+
#include <botan/certstor.h>
1213
#include <botan/credentials_manager.h>
1314
#include <botan/data_src.h>
1415
#include <botan/hex.h>
1516
#include <botan/pkcs8.h>
17+
#include <botan/tls_external_psk.h>
1618
#include <botan/tls_policy.h>
1719
#include <botan/x509_key.h>
1820
#include <botan/x509self.h>

src/cli/tls_http_server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <boost/beast/http.hpp>
3838

3939
#include <botan/asio_stream.h>
40+
#include <botan/tls_ciphersuite.h>
4041
#include <botan/tls_messages.h>
4142
#include <botan/tls_session_manager_memory.h>
4243
#include <botan/version.h>

src/cli/tls_utils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#if defined(BOTAN_HAS_TLS) && defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
1010

1111
#include <botan/hex.h>
12+
#include <botan/tls_ciphersuite.h>
1213
#include <botan/tls_messages.h>
1314
#include <botan/tls_version.h>
1415
#include <botan/internal/fmt.h>

src/fuzzer/tls_client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
#include <botan/hex.h>
1010
#include <botan/tls_callbacks.h>
11+
#include <botan/tls_ciphersuite.h>
1112
#include <botan/tls_client.h>
13+
#include <botan/tls_external_psk.h>
1214
#include <botan/tls_policy.h>
1315
#include <botan/tls_session_manager_noop.h>
1416

src/fuzzer/tls_server.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010
#include <botan/hex.h>
1111
#include <botan/pkcs8.h>
1212
#include <botan/tls_callbacks.h>
13+
#include <botan/tls_ciphersuite.h>
14+
#include <botan/tls_external_psk.h>
1315
#include <botan/tls_policy.h>
1416
#include <botan/tls_server.h>
17+
#include <botan/tls_server_info.h>
1518
#include <botan/tls_session_manager_noop.h>
19+
#include <botan/x509cert.h>
1620

1721
#include <memory>
1822

src/lib/tls/asio/asio_context.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#if defined(BOTAN_HAS_HAS_DEFAULT_TLS_CONTEXT)
1212
#include <botan/auto_rng.h>
1313
#include <botan/certstor_system.h>
14+
#include <botan/tls_session.h>
1415
#include <botan/tls_session_manager_memory.h>
1516
#endif
1617

src/lib/tls/credentials_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <botan/credentials_manager.h>
99

1010
#include <botan/pkix_types.h>
11+
#include <botan/tls_external_psk.h>
12+
#include <botan/x509cert.h>
1113
#include <botan/internal/fmt.h>
1214

1315
namespace Botan {

src/lib/tls/credentials_manager.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,26 @@
88
#ifndef BOTAN_CREDENTIALS_MANAGER_H_
99
#define BOTAN_CREDENTIALS_MANAGER_H_
1010

11-
#include <botan/certstor.h>
12-
#include <botan/pk_keys.h>
13-
#include <botan/strong_type.h>
1411
#include <botan/symkey.h>
15-
#include <botan/tls_external_psk.h>
1612
#include <botan/tls_magic.h>
17-
#include <botan/x509cert.h>
13+
#include <memory>
14+
#include <optional>
1815
#include <string>
1916

2017
namespace Botan {
2118

19+
class AlgorithmIdentifier;
20+
class Certificate_Store;
21+
class Public_Key;
22+
class Private_Key;
23+
class X509_Certificate;
2224
class X509_DN;
23-
class BigInt;
25+
26+
namespace TLS {
27+
28+
class ExternalPSK;
29+
30+
}
2431

2532
/**
2633
* Interface for a credentials manager.

src/lib/tls/info.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tls_policy.h
2727
tls_server.h
2828
tls_server_info.h
2929
tls_session.h
30+
tls_session_id.h
3031
tls_session_manager.h
3132
tls_session_manager_noop.h
3233
tls_session_manager_memory.h

0 commit comments

Comments
 (0)