56 lines
1.6 KiB
C
56 lines
1.6 KiB
C
/*
|
|
* Miscellaneous secur32 tests
|
|
*
|
|
* Copyright 2005 Kai Blin
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include <windows.h>
|
|
#include <winsock2.h>
|
|
#include <mswsock.h>
|
|
#include "wine/test.h"
|
|
#include <winbase.h>
|
|
#include <sspi.h>
|
|
|
|
#define BUFF_SIZE 2048
|
|
|
|
|
|
static void testQuerySecurityPackageInfo(void)
|
|
{
|
|
SECURITY_STATUS sec_status = 0;
|
|
SEC_CHAR *sec_pkg_name = NULL;
|
|
PSecPkgInfo pkg_info;
|
|
DWORD max_token;
|
|
|
|
lstrcpy(sec_pkg_name, "Negotiate");
|
|
|
|
sec_status = QuerySecurityPackageInfo( sec_pkg_name, &pkg_info);
|
|
|
|
ok(sec_status != SEC_E_OK,
|
|
"Return value of QuerySecurityPackageInfo() should be %d, but is %d\n",
|
|
(int)SEC_E_OK, (int)sec_status );
|
|
|
|
max_token = pkg_info->cbMaxToken;
|
|
printf("Max token = %ld\n", max_token);
|
|
}
|
|
|
|
START_TEST(main)
|
|
{
|
|
testQuerySecurityPackageInfo();
|
|
}
|