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