@@ -898,6 +898,7 @@ int test_dtls13_longer_length(void)
898898 struct test_memio_ctx test_ctx ;
899899 unsigned char readBuf [50 ];
900900 int seq16bit = 0 ;
901+ int ret ;
901902
902903 XMEMSET (& test_ctx , 0 , sizeof (test_ctx ));
903904
@@ -930,7 +931,8 @@ int test_dtls13_longer_length(void)
930931 ExpectIntEQ (test_ctx .s_len , 0 );
931932
932933 ExpectIntEQ (test_dtls_communication (ssl_s , ssl_c ), TEST_SUCCESS );
933- ExpectIntEQ (test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s ), TEST_SUCCESS );
934+ ret = test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s );
935+ ExpectIntEQ (ret , TEST_SUCCESS );
934936
935937 return EXPECT_RESULT ();
936938}
@@ -950,6 +952,7 @@ int test_dtls13_short_read(void)
950952 struct test_memio_ctx test_ctx ;
951953 unsigned char readBuf [50 ];
952954 int i ;
955+ int ret ;
953956
954957 /* we setup two test, in the first one the server reads just two bytes of
955958 * the header, in the second one it reads just the header (5) */
@@ -980,8 +983,8 @@ int test_dtls13_short_read(void)
980983 ExpectIntEQ (test_ctx .s_len , 0 );
981984
982985 ExpectIntEQ (test_dtls_communication (ssl_s , ssl_c ), TEST_SUCCESS );
983- ExpectIntEQ ( test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s ),
984- TEST_SUCCESS );
986+ ret = test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s );
987+ ExpectIntEQ ( ret , TEST_SUCCESS );
985988 ssl_c = ssl_s = NULL ;
986989 ctx_c = ctx_s = NULL ;
987990 }
@@ -1004,6 +1007,7 @@ int test_dtls12_short_read(void)
10041007 struct test_memio_ctx test_ctx ;
10051008 unsigned char readBuf [50 ];
10061009 int i ;
1010+ int ret ;
10071011
10081012 for (i = 0 ; i < 3 ; i ++ ) {
10091013 XMEMSET (& test_ctx , 0 , sizeof (test_ctx ));
@@ -1041,8 +1045,8 @@ int test_dtls12_short_read(void)
10411045 ExpectIntEQ (test_ctx .s_len , 0 );
10421046
10431047 ExpectIntEQ (test_dtls_communication (ssl_s , ssl_c ), TEST_SUCCESS );
1044- ExpectIntEQ ( test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s ),
1045- TEST_SUCCESS );
1048+ ret = test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s );
1049+ ExpectIntEQ ( ret , TEST_SUCCESS );
10461050 ssl_c = ssl_s = NULL ;
10471051 ctx_c = ctx_s = NULL ;
10481052 }
@@ -1064,6 +1068,7 @@ int test_dtls12_record_length_mismatch(void)
10641068 WOLFSSL * ssl_c = NULL , * ssl_s = NULL ;
10651069 struct test_memio_ctx test_ctx ;
10661070 unsigned char readBuf [50 ];
1071+ int ret ;
10671072
10681073 XMEMSET (& test_ctx , 0 , sizeof (test_ctx ));
10691074
@@ -1090,7 +1095,8 @@ int test_dtls12_record_length_mismatch(void)
10901095 ExpectIntEQ (test_ctx .s_len , 0 );
10911096
10921097 ExpectIntEQ (test_dtls_communication (ssl_s , ssl_c ), TEST_SUCCESS );
1093- ExpectIntEQ (test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s ), TEST_SUCCESS );
1098+ ret = test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s );
1099+ ExpectIntEQ (ret , TEST_SUCCESS );
10941100
10951101 return EXPECT_RESULT ();
10961102}
@@ -1175,6 +1181,7 @@ int test_dtls_short_ciphertext(void)
11751181 WOLFSSL * ssl_c = NULL , * ssl_s = NULL ;
11761182 struct test_memio_ctx test_ctx ;
11771183 unsigned char readBuf [50 ];
1184+ int ret ;
11781185
11791186 XMEMSET (& test_ctx , 0 , sizeof (test_ctx ));
11801187
@@ -1207,7 +1214,8 @@ int test_dtls_short_ciphertext(void)
12071214
12081215 ExpectIntEQ (test_dtls_communication (ssl_s , ssl_c ), TEST_SUCCESS );
12091216
1210- ExpectIntEQ (test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s ), TEST_SUCCESS );
1217+ ret = test_dtls_shutdown (ssl_s , ssl_c , ctx_c , ctx_s );
1218+ ExpectIntEQ (ret , TEST_SUCCESS );
12111219
12121220 return EXPECT_RESULT ();
12131221}
0 commit comments