English 中文(简体)
What programs use GSS-API? Any decent sample programs?
原标题:

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.

最佳回答

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?

问题回答

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





相关问题
Fastest method for running a binary search on a file in C?

For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

Encoding, decoding an integer to a char array

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...

热门标签