Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / test / core / handshake / server_ssl.cc
index 8fa5f7f..f759b70 100644 (file)
  */
 
 #include <arpa/inet.h>
-#include <openssl/err.h>
-#include <openssl/ssl.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <unistd.h>
 
+#include <openssl/err.h>
+#include <openssl/ssl.h>
+
 #include <grpc/grpc.h>
 #include <grpc/grpc_security.h>
 #include <grpc/support/alloc.h>
 #include <grpc/support/sync.h>
 
 #include "src/core/lib/iomgr/load_file.h"
+#include "test/core/handshake/server_ssl_common.h"
 #include "test/core/util/port.h"
 #include "test/core/util/test_config.h"
 
-#include "test/core/handshake/server_ssl_common.h"
-
 int main(int argc, char* argv[]) {
+  grpc::testing::TestEnvironment env(argc, argv);
   // Handshake succeeeds when the client supplies the standard ALPN list.
   const char* full_alpn_list[] = {"grpc-exp", "h2"};
   GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp"));
@@ -53,5 +54,6 @@ int main(int argc, char* argv[]) {
   // and sanity checks the server_ssl_test.
   const char* fake_alpn_list[] = {"foo"};
   GPR_ASSERT(!server_ssl_test(fake_alpn_list, 1, "foo"));
+  CleanupSslLibrary();
   return 0;
 }