1 .\" $NetBSD: krb5_get_in_cred.3,v 1.3 2014/04/24 13:45:34 pettai Exp $
3 .\" Copyright (c) 2003 Kungliga Tekniska Högskolan
4 .\" (Royal Institute of Technology, Stockholm, Sweden).
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the Institute nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 .Nm krb5_get_in_cred ,
42 .Nm krb5_get_in_tkt_with_password ,
43 .Nm krb5_get_in_tkt_with_keytab ,
44 .Nm krb5_get_in_tkt_with_skey ,
45 .Nm krb5_free_kdc_rep ,
46 .Nm krb5_password_key_proc
47 .Nd deprecated initial authentication functions
49 Kerberos 5 Library (libkrb5, -lkrb5)
55 .Fa "krb5_context context"
56 .Fa "krb5_flags options"
57 .Fa "const krb5_addresses *addrs"
58 .Fa "const krb5_enctype *etypes"
59 .Fa "const krb5_preauthtype *ptypes"
60 .Fa "krb5_key_proc key_proc"
61 .Fa "krb5_const_pointer keyseed"
62 .Fa "krb5_decrypt_proc decrypt_proc"
63 .Fa "krb5_const_pointer decryptarg"
64 .Fa "krb5_creds *creds"
65 .Fa "krb5_ccache ccache"
66 .Fa "krb5_kdc_rep *ret_as_reply"
70 .Fa "krb5_context context"
71 .Fa "krb5_flags options"
72 .Fa "const krb5_addresses *addrs"
73 .Fa "const krb5_enctype *etypes"
74 .Fa "const krb5_preauthtype *ptypes"
75 .Fa "const krb5_preauthdata *preauth"
76 .Fa "krb5_key_proc key_proc"
77 .Fa "krb5_const_pointer keyseed"
78 .Fa "krb5_decrypt_proc decrypt_proc"
79 .Fa "krb5_const_pointer decryptarg"
80 .Fa "krb5_creds *creds"
81 .Fa "krb5_kdc_rep *ret_as_reply"
84 .Fo krb5_get_in_tkt_with_password
85 .Fa "krb5_context context"
86 .Fa "krb5_flags options"
87 .Fa "krb5_addresses *addrs"
88 .Fa "const krb5_enctype *etypes"
89 .Fa "const krb5_preauthtype *pre_auth_types"
90 .Fa "const char *password"
91 .Fa "krb5_ccache ccache"
92 .Fa "krb5_creds *creds"
93 .Fa "krb5_kdc_rep *ret_as_reply"
96 .Fo krb5_get_in_tkt_with_keytab
97 .Fa "krb5_context context"
98 .Fa "krb5_flags options"
99 .Fa "krb5_addresses *addrs"
100 .Fa "const krb5_enctype *etypes"
101 .Fa "const krb5_preauthtype *pre_auth_types"
102 .Fa "krb5_keytab keytab"
103 .Fa "krb5_ccache ccache"
104 .Fa "krb5_creds *creds"
105 .Fa "krb5_kdc_rep *ret_as_reply"
108 .Fo krb5_get_in_tkt_with_skey
109 .Fa "krb5_context context"
110 .Fa "krb5_flags options"
111 .Fa "krb5_addresses *addrs"
112 .Fa "const krb5_enctype *etypes"
113 .Fa "const krb5_preauthtype *pre_auth_types"
114 .Fa "const krb5_keyblock *key"
115 .Fa "krb5_ccache ccache"
116 .Fa "krb5_creds *creds"
117 .Fa "krb5_kdc_rep *ret_as_reply"
120 .Fo krb5_free_kdc_rep
121 .Fa "krb5_context context"
122 .Fa "krb5_kdc_rep *rep"
125 .Fo krb5_password_key_proc
126 .Fa "krb5_context context"
127 .Fa "krb5_enctype type"
129 .Fa "krb5_const_pointer keyseed"
130 .Fa "krb5_keyblock **key"
134 All the functions in this manual page are deprecated in the MIT
135 implementation, and will soon be deprecated in Heimdal too, don't use them.
138 Getting initial credential ticket for a principal.
140 is the function all other krb5_get_in function uses to fetch tickets.
141 The other krb5_get_in function are more specialized and therefor
142 somewhat easier to use.
144 If your need is only to verify a user and password, consider using
145 .Xr krb5_verify_user 3
146 instead, it have a much simpler interface.
151 fetches initial credential, queries after key using the
154 The differences between the two function is that
156 stores the credential in a
160 stores the credential in a
163 .Nm krb5_get_in_tkt_with_password ,
164 .Nm krb5_get_in_tkt_with_keytab ,
166 .Nm krb5_get_in_tkt_with_skey
167 does the same work as
169 but are more specialized.
171 .Nm krb5_get_in_tkt_with_password
172 uses the clients password to authenticate.
173 If the password argument is
175 the user user queried with the default password query function.
177 .Nm krb5_get_in_tkt_with_keytab
178 searches the given keytab for a service entry for the client principal.
181 the default keytab is used.
183 .Nm krb5_get_in_tkt_with_skey
184 uses a key to get the initial credential.
186 There are some common arguments to the krb5_get_in functions, these are:
196 terminated array of encryption types that the client approves.
199 a list of the addresses that the initial ticket.
202 the list will be generated by the library.
207 terminated array of pre-authentication types.
212 the function will try without pre-authentication and return those
213 pre-authentication that the KDC returned.
218 be filled in with the response of the KDC and should be free with
219 .Fn krb5_free_kdc_rep .
222 is a pointer to a function that should return a key salted appropriately.
225 will use the default password query function.
230 will use the default decryption function.
233 will be passed to the decryption function
237 creds should be filled in with the template for a credential that
239 The client and server elements of the creds structure must be filled in.
240 Upon return of the function it will be contain the content of the
242 .Fa ( krb5_get_in_cred ) ,
243 or it will be freed with
244 .Xr krb5_free_creds 3
245 (all the other krb5_get_in functions).
248 will store the credential in the credential cache
250 The credential cache will not be initialized, thats up the the caller.
252 .Nm krb5_password_key_proc
253 is a library function that is suitable using as the
258 .Nm krb5_get_in_tkt .
260 should be a pointer to a
264 .Nm krb5_password_key_proc
265 will query the user for the pass on the console if the password isn't
266 given as the argument
269 .Fn krb5_free_kdc_rep
274 .Xr krb5_verify_user 3 ,