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