return 1;
}
+static int check_compression(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx)
+{
+ if (result->compression != test_ctx->compression_expected) {
+ fprintf(stderr, "Client CompressionExpected mismatch, expected %d, got %d\n.",
+ test_ctx->compression_expected,
+ result->compression);
+ return 0;
+ }
+ return 1;
+}
#ifndef OPENSSL_NO_NEXTPROTONEG
static int check_npn(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx)
{
result->server_sign_hash);
}
+static int check_server_sign_type(HANDSHAKE_RESULT *result,
+ SSL_TEST_CTX *test_ctx)
+{
+ return check_nid("Server signing", test_ctx->expected_server_sign_type,
+ result->server_sign_type);
+}
+
static int check_client_cert_type(HANDSHAKE_RESULT *result,
SSL_TEST_CTX *test_ctx)
{
result->client_sign_hash);
}
+static int check_client_sign_type(HANDSHAKE_RESULT *result,
+ SSL_TEST_CTX *test_ctx)
+{
+ return check_nid("Client signing", test_ctx->expected_client_sign_type,
+ result->client_sign_type);
+}
+
/*
* This could be further simplified by constructing an expected
* HANDSHAKE_RESULT, and implementing comparison methods for
ret &= check_protocol(result, test_ctx);
ret &= check_servername(result, test_ctx);
ret &= check_session_ticket(result, test_ctx);
+ ret &= check_compression(result, test_ctx);
ret &= (result->session_ticket_do_not_call == 0);
#ifndef OPENSSL_NO_NEXTPROTONEG
ret &= check_npn(result, test_ctx);
ret &= check_tmp_key(result, test_ctx);
ret &= check_server_cert_type(result, test_ctx);
ret &= check_server_sign_hash(result, test_ctx);
+ ret &= check_server_sign_type(result, test_ctx);
ret &= check_client_cert_type(result, test_ctx);
ret &= check_client_sign_hash(result, test_ctx);
+ ret &= check_client_sign_type(result, test_ctx);
}
return ret;
}