1 .\" Copyright (c) 2003 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" $Heimdal: krb5_get_in_cred.3 17593 2006-05-29 14:55:18Z lha $
33 .\" $NetBSD: krb5_get_in_cred.3,v 1.1 2008/03/22 08:37:14 mlelstv Exp $
40 .Nm krb5_get_in_cred ,
41 .Nm krb5_get_in_tkt_with_password ,
42 .Nm krb5_get_in_tkt_with_keytab ,
43 .Nm krb5_get_in_tkt_with_skey ,
44 .Nm krb5_free_kdc_rep ,
45 .Nm krb5_password_key_proc
46 .Nd deprecated initial authentication functions
48 Kerberos 5 Library (libkrb5, -lkrb5)
54 .Fa "krb5_context context"
55 .Fa "krb5_flags options"
56 .Fa "const krb5_addresses *addrs"
57 .Fa "const krb5_enctype *etypes"
58 .Fa "const krb5_preauthtype *ptypes"
59 .Fa "krb5_key_proc key_proc"
60 .Fa "krb5_const_pointer keyseed"
61 .Fa "krb5_decrypt_proc decrypt_proc"
62 .Fa "krb5_const_pointer decryptarg"
63 .Fa "krb5_creds *creds"
64 .Fa "krb5_ccache ccache"
65 .Fa "krb5_kdc_rep *ret_as_reply"
69 .Fa "krb5_context context"
70 .Fa "krb5_flags options"
71 .Fa "const krb5_addresses *addrs"
72 .Fa "const krb5_enctype *etypes"
73 .Fa "const krb5_preauthtype *ptypes"
74 .Fa "const krb5_preauthdata *preauth"
75 .Fa "krb5_key_proc key_proc"
76 .Fa "krb5_const_pointer keyseed"
77 .Fa "krb5_decrypt_proc decrypt_proc"
78 .Fa "krb5_const_pointer decryptarg"
79 .Fa "krb5_creds *creds"
80 .Fa "krb5_kdc_rep *ret_as_reply"
83 .Fo krb5_get_in_tkt_with_password
84 .Fa "krb5_context context"
85 .Fa "krb5_flags options"
86 .Fa "krb5_addresses *addrs"
87 .Fa "const krb5_enctype *etypes"
88 .Fa "const krb5_preauthtype *pre_auth_types"
89 .Fa "const char *password"
90 .Fa "krb5_ccache ccache"
91 .Fa "krb5_creds *creds"
92 .Fa "krb5_kdc_rep *ret_as_reply"
95 .Fo krb5_get_in_tkt_with_keytab
96 .Fa "krb5_context context"
97 .Fa "krb5_flags options"
98 .Fa "krb5_addresses *addrs"
99 .Fa "const krb5_enctype *etypes"
100 .Fa "const krb5_preauthtype *pre_auth_types"
101 .Fa "krb5_keytab keytab"
102 .Fa "krb5_ccache ccache"
103 .Fa "krb5_creds *creds"
104 .Fa "krb5_kdc_rep *ret_as_reply"
107 .Fo krb5_get_in_tkt_with_skey
108 .Fa "krb5_context context"
109 .Fa "krb5_flags options"
110 .Fa "krb5_addresses *addrs"
111 .Fa "const krb5_enctype *etypes"
112 .Fa "const krb5_preauthtype *pre_auth_types"
113 .Fa "const krb5_keyblock *key"
114 .Fa "krb5_ccache ccache"
115 .Fa "krb5_creds *creds"
116 .Fa "krb5_kdc_rep *ret_as_reply"
119 .Fo krb5_free_kdc_rep
120 .Fa "krb5_context context"
121 .Fa "krb5_kdc_rep *rep"
124 .Fo krb5_password_key_proc
125 .Fa "krb5_context context"
126 .Fa "krb5_enctype type"
128 .Fa "krb5_const_pointer keyseed"
129 .Fa "krb5_keyblock **key"
133 All the functions in this manual page are deprecated in the MIT
134 implementation, and will soon be deprecated in Heimdal too, don't use them.
137 Getting initial credential ticket for a principal.
139 is the function all other krb5_get_in function uses to fetch tickets.
140 The other krb5_get_in function are more specialized and therefor
141 somewhat easier to use.
143 If your need is only to verify a user and password, consider using
144 .Xr krb5_verify_user 3
145 instead, it have a much simpler interface.
150 fetches initial credential, queries after key using the
153 The differences between the two function is that
155 stores the credential in a
159 stores the credential in a
162 .Nm krb5_get_in_tkt_with_password ,
163 .Nm krb5_get_in_tkt_with_keytab ,
165 .Nm krb5_get_in_tkt_with_skey
166 does the same work as
168 but are more specialized.
170 .Nm krb5_get_in_tkt_with_password
171 uses the clients password to authenticate.
172 If the password argument is
174 the user user queried with the default password query function.
176 .Nm krb5_get_in_tkt_with_keytab
177 searches the given keytab for a service entry for the client principal.
180 the default keytab is used.
182 .Nm krb5_get_in_tkt_with_skey
183 uses a key to get the initial credential.
185 There are some common arguments to the krb5_get_in functions, these are:
195 terminated array of encryption types that the client approves.
198 a list of the addresses that the initial ticket.
201 the list will be generated by the library.
206 terminated array of pre-authentication types.
211 the function will try without pre-authentication and return those
212 pre-authentication that the KDC returned.
217 be filled in with the response of the KDC and should be free with
218 .Fn krb5_free_kdc_rep .
221 is a pointer to a function that should return a key salted appropriately.
224 will use the default password query function.
229 will use the default decryption function.
232 will be passed to the decryption function
236 creds should be filled in with the template for a credential that
238 The client and server elements of the creds structure must be filled in.
239 Upon return of the function it will be contain the content of the
241 .Fa ( krb5_get_in_cred ) ,
242 or it will be freed with
243 .Xr krb5_free_creds 3
244 (all the other krb5_get_in functions).
247 will store the credential in the credential cache
249 The credential cache will not be initialized, thats up the the caller.
251 .Nm krb5_password_key_proc
252 is a library function that is suitable using as the
257 .Nm krb5_get_in_tkt .
259 should be a pointer to a
263 .Nm krb5_password_key_proc
264 will query the user for the pass on the console if the password isn't
265 given as the argument
268 .Fn krb5_free_kdc_rep
273 .Xr krb5_verify_user 3 ,