From e1b8685770d0e82e5a4a3c5d24ad1602e05f2e83 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 14 Jun 2023 14:09:29 -0400 Subject: [PATCH] Log failure to create SSL objects in handshakers This would have made debugging some cross-version test easier. Change-Id: I7b1bc160b5acf40ec02b9ed5ac2d836e3203cf9a Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/60805 Commit-Queue: Bob Beck Reviewed-by: Bob Beck Auto-Submit: David Benjamin --- ssl/test/handshaker.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssl/test/handshaker.cc b/ssl/test/handshaker.cc index ac890633d..72aaaa800 100644 --- a/ssl/test/handshaker.cc +++ b/ssl/test/handshaker.cc @@ -61,6 +61,8 @@ bool Handshaker(const TestConfig *config, int rfd, int wfd, UniquePtr ssl = config->NewSSL(ctx.get(), /*session=*/nullptr, /*test_state=*/nullptr); if (!ssl) { + fprintf(stderr, "Error creating SSL object in handshaker.\n"); + ERR_print_errors_fp(stderr); return false; } @@ -155,6 +157,8 @@ bool GenerateHandshakeHint(const TestConfig *config, config->NewSSL(ctx.get(), /*session=*/nullptr, std::unique_ptr(new TestState)); if (!ssl) { + fprintf(stderr, "Error creating SSL object in handshaker.\n"); + ERR_print_errors_fp(stderr); return false; }