external/boringssl: Sync to f21650709a6f76e829ddcc77fe221c9d6a5c12de.
This includes the following changes:
https://boringssl.googlesource.com/boringssl/+log/348f0d8db9c2a0eca0503ba654020209c579d552..f21650709a6f76e829ddcc77fe221c9d6a5c12de
Test: BoringSSL CTS Presubmits.
Change-Id: Ie6e99c3315c552068b5ea57e31b1af7ff94f9b0f
diff --git a/src/tool/server.cc b/src/tool/server.cc
index 3b125ad..4cc183b 100644
--- a/src/tool/server.cc
+++ b/src/tool/server.cc
@@ -71,6 +71,10 @@
"-tls13-variant", kBooleanArgument, "Enable TLS 1.3 variants",
},
{
+ "-debug", kBooleanArgument,
+ "Print debug information about the handshake",
+ },
+ {
"", kOptionalArgument, "",
},
};
@@ -142,6 +146,20 @@
return x509;
}
+static void InfoCallback(const SSL *ssl, int type, int value) {
+ switch (type) {
+ case SSL_CB_HANDSHAKE_START:
+ fprintf(stderr, "Handshake started.\n");
+ break;
+ case SSL_CB_HANDSHAKE_DONE:
+ fprintf(stderr, "Handshake done.\n");
+ break;
+ case SSL_CB_ACCEPT_LOOP:
+ fprintf(stderr, "Handshake progress: %s\n", SSL_state_string_long(ssl));
+ break;
+ }
+}
+
bool Server(const std::vector<std::string> &args) {
if (!InitSocketLibrary()) {
return false;
@@ -241,6 +259,10 @@
SSL_CTX_set_tls13_variant(ctx.get(), tls13_experiment);
}
+ if (args_map.count("-debug") != 0) {
+ SSL_CTX_set_info_callback(ctx.get(), InfoCallback);
+ }
+
Listener listener;
if (!listener.Init(args_map["-accept"])) {
return false;