Write connection info to a BIO instead of stderr.
Make PrintConnectionInfo write to a BIO rather than stderr.
This prepares for writing connection details to the peer.
Change-Id: I88147952712da57f9a2a1e464371075df156741f
Reviewed-on: https://boringssl-review.googlesource.com/20304
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/tool/server.cc b/tool/server.cc
index 1d64933..dc80137 100644
--- a/tool/server.cc
+++ b/tool/server.cc
@@ -306,7 +306,8 @@
}
fprintf(stderr, "Connected.\n");
- PrintConnectionInfo(ssl.get());
+ bssl::UniquePtr<BIO> bio_stderr(BIO_new_fp(stderr, BIO_NOCLOSE));
+ PrintConnectionInfo(bio_stderr.get(), ssl.get());
result = TransferData(ssl.get(), sock);
} while (args_map.count("-loop") != 0);