哪些程序使用 GSS-API?有什么不错的示例程序吗?

发布于 2024-08-14 06:20:26 字数 722 浏览 1 评论 0原文

我以为我想使用 GSS-API,但现在不太确定,因为我很难为一个简单的客户端/服务器对找到好的示例代码。 Sun 有包含示例代码的文档,但是它是专门为他们的 GSS API 实现而编写的,使用了一些不在 GNU GSS-API< 中的专有函数/a> (我并不清楚如何针对 GNU 实现重新实现它们)。另外,它是用 ANSI C 之前的版本编写的,带有 K&R 函数声明等(我在转换声明时没有遇到问题,但这确实让我觉得 Sun 示例代码可能太旧了,以至于不相关)。

您是否在过去十年中在应用程序中使用过 GSS-API?您知道一些带有示例程序的独立教程值得阅读吗?

或者,也许我走错了路,应该尝试 SASL。 GNU GSS-API 作者本人 建议尽可能多

无论如何,我在 Linux 上使用 GCC,并且已经为其他目的设置了 Kerberos。

I thought I wanted to use GSS-API, but now am not so sure, since I'm having a hard time finding good sample code for a trivial client/server pair. Sun has documentation including sample code, but it's written specifically for their GSS API implementation, using a few proprietary functions not in e.g. the GNU GSS-API (and for which it's not immediately clear to me how to re-implement them against the GNU implementation). Plus, it's written in pre-ANSI C, with K&R function declarations and so on (I had no problem converting the declarations, but it did make me think the Sun example code may be so old as to be irrelevant).

Have you used the GSS-API in an application in, say, the last decade? Do you know of some self-contained tutorial with example programs that's worth reading?

Alternatively, maybe I'm on the wrong track and should try SASL instead. The GNU GSS-API author himself suggests as much.

For what it's worth, I'm using GCC on Linux, and have Kerberos set up already for other purposes.

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

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

发布评论

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

评论(2

星軌x 2024-08-21 06:20:26

是的,您绝对应该使用 SASL 而不是 GSSAPI。这是一个更好的支持协议,并且库也非常好。至少,您可以将其视为 GSSAPI 的健全性改进包装器,因为这是为 SASL 实现的典型插件之一。您应该考虑直接使用 GSSAPI 的唯一原因是实现 SASL 库。但不要这样做。 :)

SASL 也有广泛的用途。它被指定为 IMAP 和 XMPP 的一部分。

您是否正在通过 TCP 实现一些自定义协议?

Yes, you should absolutely be using SASL instead of GSSAPI. It is a much better supported protocol, and the libraries are pretty good. At the very least, you can think of it as a sanity-improving wrapper over GSSAPI, since that is one of the typical plugins implemented for SASL. The only reason you should consider using GSSAPI directly is to implement a SASL library. But don't do that. :)

SASL also has wide use. It is specified as part of IMAP and XMPP.

Are you implementing some custom protocol over TCP?

邮友 2024-08-21 06:20:26

Sun 在其 Java 代码中使用 GSSAPI。您可以在这里找到更多相关信息:

java 中的“gss_import_name”和“gss_init_sec_context”方法等效吗?

另外,您可能想查看 OpenJDK 人员完成的代码实现:

http://www.docjar.org/docs/api/sun/security/jgss/GSSContextImpl .html

他们发布了用 Java 编写的 GSSAPI 的完整工作示例。

授予

Sun uses the GSSAPI in their Java code. You can find a bit more information about it here:

Equivalent of 'gss_import_name' and 'gss_init_sec_context' methods in java?

Also you may want to look at the code implementation done by the folks at OpenJDK:

http://www.docjar.org/docs/api/sun/security/jgss/GSSContextImpl.html

They have published a full working example of GSSAPI written in Java.

Grant

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