Beispiel #1
0
struct torture_suite *ndr_ntlmssp_suite(TALLOC_CTX *ctx)
{
	struct torture_suite *suite = torture_suite_create(ctx, "ntlmssp");

	torture_suite_add_ndr_pull_test(suite, NEGOTIATE_MESSAGE, ntlmssp_NEGOTIATE_MESSAGE_data, ntlmssp_NEGOTIATE_MESSAGE_check);
	torture_suite_add_ndr_pull_test(suite, CHALLENGE_MESSAGE, ntlmssp_CHALLENGE_MESSAGE_data, ntlmssp_CHALLENGE_MESSAGE_check);
	torture_suite_add_ndr_pull_test(suite, AUTHENTICATE_MESSAGE, ntlmssp_AUTHENTICATE_MESSAGE_data, ntlmssp_AUTHENTICATE_MESSAGE_check);

	torture_suite_add_ndr_pull_validate_test(suite,
					    NEGOTIATE_MESSAGE,
					    data_blob_const(ntlmssp_NEGOTIATE_MESSAGE_data, sizeof(ntlmssp_NEGOTIATE_MESSAGE_data)),
					    ntlmssp_NEGOTIATE_MESSAGE_check);

	torture_suite_add_ndr_pull_validate_test(suite,
					    CHALLENGE_MESSAGE,
					    data_blob_const(ntlmssp_CHALLENGE_MESSAGE_data, sizeof(ntlmssp_CHALLENGE_MESSAGE_data)),
					    ntlmssp_CHALLENGE_MESSAGE_check);

	return suite;
}
Beispiel #2
0
struct torture_suite *ndr_backupkey_suite(TALLOC_CTX *ctx)
{
	struct torture_suite *suite = torture_suite_create(ctx, "backupkey");

	torture_suite_add_ndr_pull_validate_test(suite,
					    bkrp_exported_RSA_key_pair,
					    exported_rsa_ndr,
					    NULL);

	return suite;
}
Beispiel #3
0
struct torture_suite *ndr_drsblobs_suite(TALLOC_CTX *ctx)
{
	DATA_BLOB win2012R2_supplementalCredentials_blob;
	struct torture_suite *suite = torture_suite_create(ctx, "drsblobs");
	struct torture_suite *empty1_suite = torture_suite_create(ctx, "empty1");
	struct torture_suite *empty2_suite = torture_suite_create(ctx, "empty2");
	struct torture_suite *alpha13_suite = torture_suite_create(ctx, "alpha13");
	struct torture_suite *release_4_1_0rc3_suite = torture_suite_create(ctx, "release-4-1-0rc3");
	struct torture_suite *release_4_5_0pre_GPG_suite = torture_suite_create(ctx, "release-4-5-0pre-GPG");
	struct torture_suite *win2012R2_suite = torture_suite_create(ctx, "win2012R2_suite");
	torture_suite_add_suite(suite, empty1_suite);
	torture_suite_add_suite(suite, empty2_suite);
	torture_suite_add_suite(suite, alpha13_suite);
	torture_suite_add_suite(suite, release_4_1_0rc3_suite);
	torture_suite_add_suite(suite, release_4_5_0pre_GPG_suite);
	torture_suite_add_suite(suite, win2012R2_suite);
	
	torture_suite_add_ndr_pull_test(suite, ForestTrustInfo, forest_trust_info_data_out, forest_trust_info_check_out);
	torture_suite_add_ndr_pull_test(suite, trustDomainPasswords, trust_domain_passwords_in, trust_domain_passwords_check_in);

	torture_suite_add_ndr_pull_validate_test(suite,
					    trustAuthInOutBlob,
					    base64_decode_data_blob_talloc(suite, trustAuthIncoming),
					    NULL);

	torture_suite_add_ndr_pull_validate_test(suite,
					    trustAuthInOutBlob,
					    base64_decode_data_blob_talloc(suite, trustAuthOutgoing),
					    NULL);

	torture_suite_add_ndr_pull_validate_test(empty1_suite, supplementalCredentialsBlob,
					data_blob_const(supplementalCredentials_empty1,
						sizeof(supplementalCredentials_empty1)),
					supplementalCredentials_empty1_check);

	torture_suite_add_ndr_pull_validate_test(empty2_suite, supplementalCredentialsBlob,
					data_blob_const(supplementalCredentials_empty2,
						sizeof(supplementalCredentials_empty2)),
					supplementalCredentials_empty2_check);

	torture_suite_add_ndr_pull_validate_test(alpha13_suite,
						 supplementalCredentialsBlob,
						 base64_decode_data_blob_talloc(suite, alpha13_supplementalCredentials),
						 alpha13_supplementalCredentials_check);

	torture_suite_add_ndr_pull_validate_test(release_4_1_0rc3_suite,
						 supplementalCredentialsBlob,
						 base64_decode_data_blob_talloc(suite, release_4_1_0rc3_supplementalCredentials),
						 release_4_1_0rc3_supplementalCredentials_check);

	torture_suite_add_ndr_pull_validate_test(release_4_5_0pre_GPG_suite,
						 supplementalCredentialsBlob,
						 base64_decode_data_blob_talloc(suite, release_4_5_0pre_GPG_supplementalCredentials),
						 release_4_5_0pre_GPG_supplementalCredentials_check);

	/* This last byte is typically not initialized, we force to zero to allow pull/push */
	win2012R2_supplementalCredentials_blob = base64_decode_data_blob_talloc(suite, win2012R2_supplementalCredentials);
	win2012R2_supplementalCredentials_blob.data[win2012R2_supplementalCredentials_blob.length-1] = 0;
	torture_suite_add_ndr_pull_validate_test(win2012R2_suite,
						 supplementalCredentialsBlob,
						 win2012R2_supplementalCredentials_blob,
						 win2012R2_supplementalCredentials_check);

	return suite;
}