krb5_get_in_cred (3) - Linux Manuals

NAME

krb5_get_in_tkt krb5_get_in_cred krb5_get_in_tkt_with_password krb5_get_in_tkt_with_keytab krb5_get_in_tkt_with_skey krb5_free_kdc_rep krb5_password_key_proc - deprecated initial authentication functions

LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)

SYNOPSIS

In krb5.h

Ft krb5_error_code Fo krb5_get_in_tkt Fa krb5_context context Fa krb5_flags options Fa const krb5_addresses *addrs Fa const krb5_enctype *etypes Fa const krb5_preauthtype *ptypes Fa krb5_key_proc key_proc Fa krb5_const_pointer keyseed Fa krb5_decrypt_proc decrypt_proc Fa krb5_const_pointer decryptarg Fa krb5_creds *creds Fa krb5_ccache ccache Fa krb5_kdc_rep *ret_as_reply Fc Ft krb5_error_code Fo krb5_get_in_cred Fa krb5_context context Fa krb5_flags options Fa const krb5_addresses *addrs Fa const krb5_enctype *etypes Fa const krb5_preauthtype *ptypes Fa const krb5_preauthdata *preauth Fa krb5_key_proc key_proc Fa krb5_const_pointer keyseed Fa krb5_decrypt_proc decrypt_proc Fa krb5_const_pointer decryptarg Fa krb5_creds *creds Fa krb5_kdc_rep *ret_as_reply Fc Ft krb5_error_code Fo krb5_get_in_tkt_with_password Fa krb5_context context Fa krb5_flags options Fa krb5_addresses *addrs Fa const krb5_enctype *etypes Fa const krb5_preauthtype *pre_auth_types Fa const char *password Fa krb5_ccache ccache Fa krb5_creds *creds Fa krb5_kdc_rep *ret_as_reply Fc Ft krb5_error_code Fo krb5_get_in_tkt_with_keytab Fa krb5_context context Fa krb5_flags options Fa krb5_addresses *addrs Fa const krb5_enctype *etypes Fa const krb5_preauthtype *pre_auth_types Fa krb5_keytab keytab Fa krb5_ccache ccache Fa krb5_creds *creds Fa krb5_kdc_rep *ret_as_reply Fc Ft krb5_error_code Fo krb5_get_in_tkt_with_skey Fa krb5_context context Fa krb5_flags options Fa krb5_addresses *addrs Fa const krb5_enctype *etypes Fa const krb5_preauthtype *pre_auth_types Fa const krb5_keyblock *key Fa krb5_ccache ccache Fa krb5_creds *creds Fa krb5_kdc_rep *ret_as_reply Fc Ft krb5_error_code Fo krb5_free_kdc_rep Fa krb5_context context Fa krb5_kdc_rep *rep Fc Ft krb5_error_code Fo krb5_password_key_proc Fa krb5_context context Fa krb5_enctype type Fa krb5_salt salt Fa krb5_const_pointer keyseed Fa krb5_keyblock **key Fc

DESCRIPTION

Bf Em All the functions in this manual page are deprecated in the MIT implementation, and will soon be deprecated in Heimdal too, don't use them. Ef

Getting initial credential ticket for a principal. krb5_get_in_cred is the function all other krb5_get_in function uses to fetch tickets. The other krb5_get_in function are more specialized and therefor somewhat easier to use.

If your need is only to verify a user and password, consider using krb5_verify_user3 instead, it have a much simpler interface.

krb5_get_in_tkt and krb5_get_in_cred fetches initial credential, queries after key using the Fa key_proc argument. The differences between the two function is that krb5_get_in_tkt stores the credential in a krb5_creds while krb5_get_in_cred stores the credential in a krb5_ccache

krb5_get_in_tkt_with_password krb5_get_in_tkt_with_keytab and krb5_get_in_tkt_with_skey does the same work as krb5_get_in_cred but are more specialized.

krb5_get_in_tkt_with_password uses the clients password to authenticate. If the password argument is NULL the user user queried with the default password query function.

krb5_get_in_tkt_with_keytab searches the given keytab for a service entry for the client principal. If the keytab is NULL the default keytab is used.

krb5_get_in_tkt_with_skey uses a key to get the initial credential.

There are some common arguments to the krb5_get_in functions, these are:

Fa options are the KDC_OPT flags.

Fa etypes is a NULL terminated array of encryption types that the client approves.

Fa addrs a list of the addresses that the initial ticket. If it is NULL the list will be generated by the library.

Fa pre_auth_types a NULL terminated array of pre-authentication types. If Fa pre_auth_types is NULL the function will try without pre-authentication and return those pre-authentication that the KDC returned.

Fa ret_as_reply will (if not NULL be filled in with the response of the KDC and should be free with Fn krb5_free_kdc_rep .

Fa key_proc is a pointer to a function that should return a key salted appropriately. Using NULL will use the default password query function.

Fa decrypt_proc Using NULL will use the default decryption function.

Fa decryptarg will be passed to the decryption function Fa decrypt_proc .

Fa creds creds should be filled in with the template for a credential that should be requested. The client and server elements of the creds structure must be filled in. Upon return of the function it will be contain the content of the requested credential Fa ( krb5_get_in_cred ) , or it will be freed with krb5_free_creds3 (all the other krb5_get_in functions).

Fa ccache will store the credential in the credential cache Fa ccache . The credential cache will not be initialized, thats up the the caller.

krb5_password_key_proc is a library function that is suitable using as the Fa krb5_key_proc argument to krb5_get_in_cred or krb5_get_in_tkt Fa keyseed should be a pointer to a NUL terminated string or NULL krb5_password_key_proc will query the user for the pass on the console if the password isn't given as the argument Fa keyseed .

Fn krb5_free_kdc_rep frees the content of Fa rep .

SEE ALSO

krb5(3), krb5_verify_user3, krb5.conf5, kerberos(8)