X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Fclienthellotest.c;h=b4563b5beb24344bc20942991d326767e38c5275;hp=2c1110b13ff52b7731b86aa46c81da9aea277cd1;hb=5bf2eade559a0d3081013048b1373da460701ba5;hpb=a43ce58f5569a160272c492c680f2e42d38ec769 diff --git a/test/clienthellotest.c b/test/clienthellotest.c index 2c1110b13f..b4563b5beb 100644 --- a/test/clienthellotest.c +++ b/test/clienthellotest.c @@ -17,7 +17,7 @@ #include #include -#include "../ssl/packet_locl.h" +#include "internal/packet.h" #include "testutil.h" @@ -58,7 +58,7 @@ static int test_client_hello(int currtest) BIO *wbio; long len; unsigned char *data; - PACKET pkt = {0}, pkt2 = {0}, pkt3 = {0}; + PACKET pkt, pkt2, pkt3; char *dummytick = "Hello World!"; unsigned int type = 0; int testresult = 0; @@ -71,6 +71,10 @@ static int test_client_hello(int currtest) return 1; #endif + memset(&pkt, 0, sizeof(pkt)); + memset(&pkt2, 0, sizeof(pkt2)); + memset(&pkt3, 0, sizeof(pkt3)); + /* * For each test set up an SSL_CTX and SSL and see what ClientHello gets * produced when we try to connect @@ -85,6 +89,7 @@ static int test_client_hello(int currtest) case TEST_SET_SESSION_TICK_DATA_VER_NEG: #if !defined(OPENSSL_NO_TLS1_3) && defined(OPENSSL_NO_TLS1_2) /* TLSv1.3 is enabled and TLSv1.2 is disabled so can't do this test */ + SSL_CTX_free(ctx); return 1; #else /* Testing for session tickets <= TLS1.2; not relevant for 1.3 */ @@ -99,8 +104,9 @@ static int test_client_hello(int currtest) * ClientHello is already going to be quite long. To avoid getting one * that is too long for this test we use a restricted ciphersuite list */ - if (!TEST_true(SSL_CTX_set_cipher_list(ctx, ""))) + if (!TEST_false(SSL_CTX_set_cipher_list(ctx, ""))) goto end; + ERR_clear_error(); /* Fall through */ case TEST_ADD_PADDING: case TEST_PADDING_NOT_NEEDED: