libk5

It's a minimalist Kerberos library with few simple functions. It also provides simple tools (klist, kvno, kdestroy, kinit) and a small test utility (krb5-test).
Check out the documentation for more information.

Download

Go to: http://floss.commonit.com/gitweb/?p=libk5.git;a=summary.

Git

git clone git://floss.commonit.com/libk5.git

Archive

libk5.tar.gz

Build

On Linux you'll just need gcc, libkrb5-dev, and cmake.

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
make install

Example


k5_context k5 = NULL;
k5_ticket ticket;

k5_init_context(&k5, NULL);
/* Get a service ticket for vb/commonit.com */
if (!k5_get_service_ticket(k5, "vb", "commonit.com", &ticket)) {
  printf("server: %s\nclient: %s\n", ticket.server_name, ticket.client_name);
  printf("kvno: %d\n", ticket.ticket->enc_part.kvno);
  k5_clear_ticket(k5, &ticket);
}
k5_free_context(k5);

On Microsoft Windows ou can build it with MinGW or Visual C++ and CMake.