Take a look at gss_krb5.h. Particularly OM_uint32 KRB5_CALLCONV krb5_gss_register_acceptor_identity(const char *); That function takes a keytab name.