未找到 SSPI 协商

发布于 2024-08-24 10:54:26 字数 635 浏览 2 评论 0原文

我使用的是 Windows XP Pro SP3。 我想在我的代码中使用 SSPI 函数。 我编译了我的代码,没有错误。

我设置了用于Negotiate的安全包,这是推荐的。

当我启动程序时,无法使用协商,因为找不到它。 因此,我尝试了“Kerberos”,但出现了同样的错误:找不到安全包。

我查看了注册表,根据该键:HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Security Packages,可用的安全包有:kerberos、< strong>msv1_0、schannelwdigest。缺少协商NTLM

我不明白为什么我的程序找不到任何安全包。 返回的错误代码是0x80090305,我找不到任何有关修复它的方法的提示。

所以,如果你掌握了SSPI,请我需要你的帮助! 我需要修改注册表中的内容吗? 或者也许我需要注册一些DLL?

感谢您的任何提示 再见!

I'm using Windows XP Pro SP3.
I want to use SSPI functions in my code.
I compiled my code, no error.

I set the security package to be used to Negotiate, which is recommended.

When I start my program, Negotiate cannot be used because it can't be found.
So, I tried "Kerberos" instead, and same error: the security package cannot be found.

I had a look at the registry, and according to that key: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Security Packages, the security packages available are: kerberos, msv1_0, schannel, wdigest. Negotiate and NTLM are missing.

I don't understand why my program can't find any security package.
The returned error code is 0x80090305 and I couldn't find any hint about a way to fix it.

So, if you master the SSPI, please I need your help!
Do I have something to modify in the registry?
Or maybe I need to register some DLLs?

Thanks for any hint
Bye!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蝶…霜飞 2024-08-31 10:54:26

SSPI 是一个不用代码调试的牛:)

试试这个代码,看看它是否有效,如果有效,则重试并用 Negotiate 替换 NTLM。实际上,不要使用这个词,“Negotiate”#include“security.h”并使用NEGOSSP_NAME。

另外,尝试一下,看看 Negotiate 是否在列表中:

int main(int argc, _TCHAR* argv[])
{
ULONG cPackages = 0;
PSecPkgInfo pInfo = NULL;
SECURITY_STATUS stat = EnumerateSecurityPackages(&cPackages, &pInfo);
如果(统计== SEC_E_OK){
for (ULONG i = 0; i < cPackages; i++) {
wprintf(L"%s\t%s\n",pInfo[i].Name, pInfo[i].Comment);
}
FreeContextBuffer(pInfo);
}
返回0;
确保

在标头中定义 SECURITY_WIN32,并与 secure32 链接。

SSPI is a cow to debug without code :)

Try this code, see if it works, if it does, re-try it and replace NTLM with Negotiate. Actually, rather than using the word, "Negotiate" #include "security.h" and use NEGOSSP_NAME.

Also, try this, and see if Negotiate is in the list:

int main(int argc, _TCHAR* argv[])
{
ULONG cPackages = 0;
PSecPkgInfo pInfo = NULL;
SECURITY_STATUS stat = EnumerateSecurityPackages(&cPackages, &pInfo);
if (stat == SEC_E_OK) {
for (ULONG i = 0; i < cPackages; i++) {
wprintf(L"%s\t%s\n",pInfo[i].Name, pInfo[i].Comment);
}
FreeContextBuffer(pInfo);
}
return 0;
}

make sure you define SECURITY_WIN32 in your header, and link with secur32.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文