Lines Matching refs:result
34 static int check_result(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_result() argument
36 if (!TEST_int_eq(result->result, test_ctx->expected_result)) { in check_result()
39 ssl_test_result_name(result->result)); in check_result()
45 static int check_alerts(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_alerts() argument
47 if (!TEST_int_eq(result->client_alert_sent, in check_alerts()
48 result->client_alert_received)) { in check_alerts()
50 print_alert(result->client_alert_sent), in check_alerts()
51 print_alert(result->client_alert_received)); in check_alerts()
66 if (!TEST_int_eq(result->server_alert_sent, in check_alerts()
67 result->server_alert_received)) { in check_alerts()
69 print_alert(result->server_alert_sent), in check_alerts()
70 print_alert(result->server_alert_received)); in check_alerts()
81 && (result->client_alert_sent & 0xff) != test_ctx->expected_client_alert) { in check_alerts()
84 print_alert(result->client_alert_sent)); in check_alerts()
89 && (result->server_alert_sent & 0xff) != test_ctx->expected_server_alert) { in check_alerts()
92 print_alert(result->server_alert_sent)); in check_alerts()
96 if (!TEST_int_le(result->client_num_fatal_alerts_sent, 1)) in check_alerts()
98 if (!TEST_int_le(result->server_num_fatal_alerts_sent, 1)) in check_alerts()
103 static int check_protocol(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_protocol() argument
105 if (!TEST_int_eq(result->client_protocol, result->server_protocol)) { in check_protocol()
107 ssl_protocol_name(result->client_protocol), in check_protocol()
108 ssl_protocol_name(result->server_protocol)); in check_protocol()
113 if (!TEST_int_eq(result->client_protocol, in check_protocol()
117 ssl_protocol_name(result->client_protocol)); in check_protocol()
124 static int check_servername(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_servername() argument
126 if (!TEST_int_eq(result->servername, test_ctx->expected_servername)) { in check_servername()
129 ssl_servername_name(result->servername)); in check_servername()
135 static int check_session_ticket(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_session_ticket() argument
139 if (!TEST_int_eq(result->session_ticket, in check_session_ticket()
143 ssl_session_ticket_name(result->session_ticket)); in check_session_ticket()
149 static int check_session_id(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_session_id() argument
153 if (!TEST_int_eq(result->session_id, test_ctx->session_id_expected)) { in check_session_id()
156 ssl_session_id_name(result->session_id)); in check_session_id()
162 static int check_compression(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_compression() argument
164 if (!TEST_int_eq(result->compression, test_ctx->compression_expected)) in check_compression()
169 static int check_npn(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_npn() argument
172 if (!TEST_str_eq(result->client_npn_negotiated, in check_npn()
173 result->server_npn_negotiated)) in check_npn()
176 result->client_npn_negotiated)) in check_npn()
182 static int check_alpn(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_alpn() argument
185 if (!TEST_str_eq(result->client_alpn_negotiated, in check_alpn()
186 result->server_alpn_negotiated)) in check_alpn()
189 result->client_alpn_negotiated)) in check_alpn()
194 static int check_session_ticket_app_data(HANDSHAKE_RESULT *result, in check_session_ticket_app_data() argument
201 if (result->result_session_ticket_app_data != NULL) in check_session_ticket_app_data()
202 result_len = strlen(result->result_session_ticket_app_data); in check_session_ticket_app_data()
208 if (!TEST_str_eq(result->result_session_ticket_app_data, in check_session_ticket_app_data()
215 static int check_resumption(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_resumption() argument
217 if (!TEST_int_eq(result->client_resumed, result->server_resumed)) in check_resumption()
219 if (!TEST_int_eq(result->client_resumed, test_ctx->resumption_expected)) in check_resumption()
281 static int check_tmp_key(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_tmp_key() argument
284 result->tmp_key_type); in check_tmp_key()
287 static int check_server_cert_type(HANDSHAKE_RESULT *result, in check_server_cert_type() argument
291 result->server_cert_type); in check_server_cert_type()
294 static int check_server_sign_hash(HANDSHAKE_RESULT *result, in check_server_sign_hash() argument
298 result->server_sign_hash); in check_server_sign_hash()
301 static int check_server_sign_type(HANDSHAKE_RESULT *result, in check_server_sign_type() argument
305 result->server_sign_type); in check_server_sign_type()
308 static int check_server_ca_names(HANDSHAKE_RESULT *result, in check_server_ca_names() argument
313 result->server_ca_names); in check_server_ca_names()
316 static int check_client_cert_type(HANDSHAKE_RESULT *result, in check_client_cert_type() argument
320 result->client_cert_type); in check_client_cert_type()
323 static int check_client_sign_hash(HANDSHAKE_RESULT *result, in check_client_sign_hash() argument
327 result->client_sign_hash); in check_client_sign_hash()
330 static int check_client_sign_type(HANDSHAKE_RESULT *result, in check_client_sign_type() argument
334 result->client_sign_type); in check_client_sign_type()
337 static int check_client_ca_names(HANDSHAKE_RESULT *result, in check_client_ca_names() argument
342 result->client_ca_names); in check_client_ca_names()
345 static int check_cipher(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_cipher() argument
349 if (!TEST_ptr(result->cipher)) in check_cipher()
352 result->cipher)) in check_cipher()
362 static int check_test(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) in check_test() argument
365 ret &= check_result(result, test_ctx); in check_test()
366 ret &= check_alerts(result, test_ctx); in check_test()
367 if (result->result == SSL_TEST_SUCCESS) { in check_test()
368 ret &= check_protocol(result, test_ctx); in check_test()
369 ret &= check_servername(result, test_ctx); in check_test()
370 ret &= check_session_ticket(result, test_ctx); in check_test()
371 ret &= check_compression(result, test_ctx); in check_test()
372 ret &= check_session_id(result, test_ctx); in check_test()
373 ret &= (result->session_ticket_do_not_call == 0); in check_test()
375 ret &= check_npn(result, test_ctx); in check_test()
377 ret &= check_cipher(result, test_ctx); in check_test()
378 ret &= check_alpn(result, test_ctx); in check_test()
379 ret &= check_session_ticket_app_data(result, test_ctx); in check_test()
380 ret &= check_resumption(result, test_ctx); in check_test()
381 ret &= check_tmp_key(result, test_ctx); in check_test()
382 ret &= check_server_cert_type(result, test_ctx); in check_test()
383 ret &= check_server_sign_hash(result, test_ctx); in check_test()
384 ret &= check_server_sign_type(result, test_ctx); in check_test()
385 ret &= check_server_ca_names(result, test_ctx); in check_test()
386 ret &= check_client_cert_type(result, test_ctx); in check_test()
387 ret &= check_client_sign_hash(result, test_ctx); in check_test()
388 ret &= check_client_sign_type(result, test_ctx); in check_test()
389 ret &= check_client_ca_names(result, test_ctx); in check_test()
400 HANDSHAKE_RESULT *result = NULL; in test_handshake() local
525 result = do_handshake(server_ctx, server2_ctx, client_ctx, in test_handshake()
528 if (result != NULL) in test_handshake()
529 ret = check_test(result, test_ctx); in test_handshake()
539 HANDSHAKE_RESULT_free(result); in test_handshake()