r17539: add HMAC-MD5 test code based on the example values from rfc 2104, 2202
[metze/samba/wip.git] / source4 / torture / local / local.c
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB torture tester
4    Copyright (C) Jelmer Vernooij 2006
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #include "includes.h"
22 #include "torture/torture.h"
23 #include "torture/local/proto.h"
24 #include "torture/auth/proto.h"
25
26 /* ignore me */ static struct torture_suite *
27         (*suite_generators[]) (TALLOC_CTX *mem_ctx) =
28
29         torture_local_binding_string, 
30         torture_ntlmssp, 
31         torture_local_messaging, 
32         torture_local_irpc, 
33         torture_local_util_strlist, 
34         torture_local_util_file, 
35         torture_local_idtree, 
36         torture_local_iconv,
37         torture_local_socket, 
38         torture_pac, 
39         torture_registry, 
40         torture_local_resolve,
41         torture_local_sddl,
42         torture_local_ndr, 
43         torture_local_event, 
44         torture_local_torture,
45         NULL
46 };
47
48 NTSTATUS torture_local_init(void)
49 {
50         int i;
51         TALLOC_CTX *mem_ctx = talloc_autofree_context();
52
53         register_torture_op("LOCAL-TALLOC", torture_local_talloc);
54         register_torture_op("LOCAL-CRYPTO-MD4", torture_local_crypto_md4);
55         register_torture_op("LOCAL-CRYPTO-MD5", torture_local_crypto_md5);
56         register_torture_op("LOCAL-CRYPTO-HMACMD5", torture_local_crypto_hmacmd5);
57         register_torture_op("LOCAL-CRYPTO-SHA1", torture_local_crypto_sha1);
58         register_torture_op("LOCAL-CRYPTO-HMACSHA1", torture_local_crypto_hmacsha1);
59         for (i = 0; suite_generators[i]; i++)
60                 torture_register_suite(suite_generators[i](mem_ctx));
61
62         return NT_STATUS_OK;
63 }