FreeRDP/winpr/libwinpr/sspi/test/TestQuerySecurityPackageInfo.c

32 lines
603 B
C
Raw Normal View History

2012-10-01 04:15:42 +04:00
#include <stdio.h>
#include <winpr/sspi.h>
#include <winpr/winpr.h>
#include <winpr/tchar.h>
2012-10-01 04:15:42 +04:00
int TestQuerySecurityPackageInfo(int argc, char* argv[])
{
int rc;
2012-10-01 04:15:42 +04:00
SECURITY_STATUS status;
SecPkgInfo* pPackageInfo;
2021-07-29 11:18:52 +03:00
WINPR_UNUSED(argc);
WINPR_UNUSED(argv);
2012-10-01 04:15:42 +04:00
sspi_GlobalInit();
status = QuerySecurityPackageInfo(NTLM_SSP_NAME, &pPackageInfo);
2012-10-01 04:15:42 +04:00
if (status != SEC_E_OK)
rc = -1;
else
2012-10-01 04:15:42 +04:00
{
_tprintf(_T("\nQuerySecurityPackageInfo:\n"));
_tprintf(_T("\"%s\", \"%s\"\n"), pPackageInfo->Name, pPackageInfo->Comment);
rc = 0;
2012-10-01 04:15:42 +04:00
}
FreeContextBuffer(pPackageInfo);
2012-10-01 04:15:42 +04:00
sspi_GlobalFinish();
return rc;
2012-10-01 04:15:42 +04:00
}