Set up tests for secur32.
[wine] / dlls / secur32 / tests / main.c
1 /*
2  * Miscellaneous secur32 tests
3  *
4  * Copyright 2005 Kai Blin
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include <stdio.h>
22 #include <stdarg.h>
23 #include <windows.h>
24 #include <winsock2.h>
25 #include <mswsock.h>
26 #include "wine/test.h"
27 #include <winbase.h>
28 #include <sspi.h>
29
30 #define BUFF_SIZE 2048
31
32
33 static void testQuerySecurityPackageInfo(void)
34 {
35     SECURITY_STATUS     sec_status = 0;
36     SEC_CHAR            *sec_pkg_name = NULL;
37     PSecPkgInfo         pkg_info;
38     DWORD               max_token;
39
40     lstrcpy(sec_pkg_name, "Negotiate");
41
42     sec_status = QuerySecurityPackageInfo( sec_pkg_name, &pkg_info);
43
44     ok(sec_status != SEC_E_OK, 
45        "Return value of QuerySecurityPackageInfo() should be %d, but is %d\n",
46        (int)SEC_E_OK, (int)sec_status );
47
48     max_token = pkg_info->cbMaxToken;
49     printf("Max token = %ld\n", max_token);
50 }
51
52 START_TEST(main)
53 {
54     testQuerySecurityPackageInfo();
55 }