Imported Upstream version 1.15.1
[platform/upstream/krb5.git] / doc / html / _sources / appdev / refs / api / krb5_verify_init_creds.txt
1 krb5_verify_init_creds -  Verify initial credentials against a keytab. 
2 =======================================================================
3
4 ..
5
6 .. c:function:: krb5_error_code krb5_verify_init_creds(krb5_context context, krb5_creds * creds, krb5_principal server, krb5_keytab keytab, krb5_ccache * ccache, krb5_verify_init_creds_opt * options)
7
8 ..
9
10
11 :param:
12
13                   **[in]** **context** - Library context
14
15                   **[in]** **creds** - Initial credentials to be verified
16
17                   **[in]** **server** - Server principal (or NULL)
18
19                   **[in]** **keytab** - Key table (NULL to use default keytab)
20
21                   **[in]** **ccache** - Credential cache for fetched creds (or NULL)
22
23                   **[in]** **options** - Verification options (NULL for default options)
24
25
26 ..
27
28
29 :retval:
30          -   0   Success; otherwise - Kerberos error codes
31
32
33 ..
34
35
36
37
38
39
40
41 This function attempts to verify that *creds* were obtained from a KDC with knowledge of a key in *keytab* , or the default keytab if *keytab* is NULL. If *server* is provided, the highest-kvno key entry for that principal name is used to verify the credentials; otherwise, all unique"host"service principals in the keytab are tried.
42
43
44
45 If the specified keytab does not exist, or is empty, or cannot be read, or does not contain an entry for *server* , then credential verification may be skipped unless configuration demands that it succeed. The caller can control this behavior by providing a verification options structure; see :c:func:`krb5_verify_init_creds_opt_init()` and :c:func:`krb5_verify_init_creds_opt_set_ap_req_nofail()` .
46
47
48
49 If *ccache* is NULL, any additional credentials fetched during the verification process will be destroyed. If *ccache* points to NULL, a memory ccache will be created for the additional credentials and returned in *ccache* . If *ccache* points to a valid credential cache handle, the additional credentials will be stored in that cache.
50
51
52
53
54
55
56
57
58
59
60 ..
61
62
63
64
65