Remove dependencies between bssl_shim and ssl/internal.h Turns out everything we were accessing had a public API, except for one constant, which is not really worth the bother. Change-Id: If93440391efdc77bf24d0c7c8a358b37fef706ea Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/76527 Commit-Queue: Bob Beck <bbe@google.com> Reviewed-by: Bob Beck <bbe@google.com> Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc index 0e7068a..80514da 100644 --- a/ssl/test/bssl_shim.cc +++ b/ssl/test/bssl_shim.cc
@@ -57,7 +57,6 @@ #include <vector> #include "../../crypto/internal.h" -#include "../internal.h" #include "async_bio.h" #include "handshake_util.h" #include "mock_quic_transport.h" @@ -1277,7 +1276,8 @@ } if (expect_new_session) { - bool got_early_data = test_state->new_session->ticket_max_early_data != 0; + bool got_early_data = + !!SSL_SESSION_early_data_capable(test_state->new_session.get()); if (config->expect_ticket_supports_early_data != got_early_data) { fprintf(stderr, "new session did%s support early data, but we expected the " @@ -1311,7 +1311,7 @@ } if (SSL_total_renegotiations(ssl) > 0) { - if (!SSL_get_session(ssl)->not_resumable) { + if (SSL_SESSION_is_resumable(SSL_get_session(ssl))) { fprintf(stderr, "Renegotiations should never produce resumable sessions.\n"); return false;
diff --git a/ssl/test/test_config.cc b/ssl/test/test_config.cc index 4d220f6..3d2819d 100644 --- a/ssl/test/test_config.cc +++ b/ssl/test/test_config.cc
@@ -37,11 +37,19 @@ #include <openssl/ssl.h> #include "../../crypto/internal.h" -#include "../internal.h" #include "handshake_util.h" #include "mock_quic_transport.h" #include "test_state.h" +#if defined(OPENSSL_WINDOWS) +// Windows defines struct timeval in winsock2.h. +OPENSSL_MSVC_PRAGMA(warning(push, 3)) +#include <winsock2.h> +OPENSSL_MSVC_PRAGMA(warning(pop)) +#else +#include <sys/time.h> +#endif + namespace { template <typename Config> @@ -780,7 +788,9 @@ if (content_type == SSL3_RT_HEADER) { if (config->is_dtls) { - if (len > DTLS1_RT_MAX_HEADER_LENGTH) { + // Starting DTLS 1.3, record headers are variable-length, but they will + // not be longer than DTLS 1.2's 13-byte header. + if (len > 13) { fprintf(stderr, "DTLS record header is too long: %zu.\n", len); } return;