4 #include <winpr/sspi.h>
5 #include <winpr/winpr.h>
6 #include <winpr/tchar.h>
8 int TestEnumerateSecurityPackages(
int argc,
char* argv[])
11 SECURITY_STATUS status = 0;
12 SecPkgInfo* pPackageInfo = NULL;
13 SecurityFunctionTable* table = NULL;
19 table = InitSecurityInterfaceEx(0);
21 status = table->EnumerateSecurityPackages(&cPackages, &pPackageInfo);
23 if (status != SEC_E_OK)
29 _tprintf(_T(
"\nEnumerateSecurityPackages (%") _T(PRIu32) _T(
"):\n"), cPackages);
31 for (
size_t index = 0; index < cPackages; index++)
33 _tprintf(_T(
"\"%s\", \"%s\"\n"), pPackageInfo[index].Name, pPackageInfo[index].Comment);
36 table->FreeContextBuffer(pPackageInfo);