1krb5_cc_select - Select a credential cache to use with a server principal. 2============================================================================ 3 4.. 5 6.. c:function:: krb5_error_code krb5_cc_select(krb5_context context, krb5_principal server, krb5_ccache * cache_out, krb5_principal * princ_out) 7 8.. 9 10 11:param: 12 13 **[in]** **context** - Library context 14 15 **[in]** **server** - Server principal 16 17 **[out]** **cache_out** - Credential cache handle 18 19 **[out]** **princ_out** - Client principal 20 21 22.. 23 24 25 26:return: 27 - If an appropriate cache is found, 0 is returned, cache_out is set to the selected cache, and princ_out is set to the default principal of that cache. 28 29.. 30 31 32 33 34 35 36 37Select a cache within the collection containing credentials most appropriate for use with *server* , according to configured rules and heuristics. 38 39 40 41Use krb5_cc_close() to release *cache_out* when it is no longer needed. Use krb5_free_principal() to release *princ_out* when it is no longer needed. Note that *princ_out* is set in some error conditions. 42 43 44 45If the appropriate client principal can be authoritatively determined but the cache collection contains no credentials for that principal, then KRB5_CC_NOTFOUND is returned, *cache_out* is set to NULL, and *princ_out* is set to the appropriate client principal. 46 47 48 49If no configured mechanism can determine the appropriate cache or principal, KRB5_CC_NOTFOUND is returned and *cache_out* and *princ_out* are set to NULL. 50 51 52 53Any other error code indicates a fatal error in the processing of a cache selection mechanism. 54 55 56 57 58 59 60 61 62 63 64.. 65 66 67 68 69.. note:: 70 71 New in 1.10 72 73 74