mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
35 lines
708 B
C
35 lines
708 B
C
|
|
#include <stdio.h>
|
|
#include <winpr/sspi.h>
|
|
#include <winpr/winpr.h>
|
|
#include <winpr/tchar.h>
|
|
|
|
int TestQuerySecurityPackageInfo(int argc, char* argv[])
|
|
{
|
|
int rc = 0;
|
|
SECURITY_STATUS status = 0;
|
|
SecPkgInfo* pPackageInfo = NULL;
|
|
SecurityFunctionTable* table = NULL;
|
|
|
|
WINPR_UNUSED(argc);
|
|
WINPR_UNUSED(argv);
|
|
|
|
sspi_GlobalInit();
|
|
table = InitSecurityInterfaceEx(0);
|
|
|
|
status = table->QuerySecurityPackageInfo(NTLM_SSP_NAME, &pPackageInfo);
|
|
|
|
if (status != SEC_E_OK)
|
|
rc = -1;
|
|
else
|
|
{
|
|
_tprintf(_T("\nQuerySecurityPackageInfo:\n"));
|
|
_tprintf(_T("\"%s\", \"%s\"\n"), pPackageInfo->Name, pPackageInfo->Comment);
|
|
rc = 0;
|
|
}
|
|
|
|
table->FreeContextBuffer(pPackageInfo);
|
|
sspi_GlobalFinish();
|
|
return rc;
|
|
}
|