Use ChaCha only if prioritized by clnt
[openssl.git] / test / ssltestlib.c
index 1f74c9592576701d87518955d705d276807bcf36..4473c670d7467e85b5b23b522312abf9d04d5857 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <string.h>
 
-#include "e_os.h"
+#include "internal/nelem.h"
 #include "ssltestlib.h"
 #include "testutil.h"
 
@@ -288,7 +288,7 @@ void bio_s_mempacket_test_free(void)
 static int mempacket_test_new(BIO *bio)
 {
     MEMPACKET_TEST_CTX *ctx;
-    
+
     if (!TEST_ptr(ctx = OPENSSL_zalloc(sizeof(*ctx))))
         return 0;
     if (!TEST_ptr(ctx->pkts = sk_MEMPACKET_new_null())) {
@@ -661,3 +661,11 @@ int create_ssl_connection(SSL *serverssl, SSL *clientssl, int want)
 
     return 1;
 }
+
+void shutdown_ssl_connection(SSL *serverssl, SSL *clientssl)
+{
+    SSL_shutdown(clientssl);
+    SSL_shutdown(serverssl);
+    SSL_free(serverssl);
+    SSL_free(clientssl);
+}