xref: /freebsd/crypto/krb5/src/lib/krb5/ccache/ccapi/stdcc.h (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 #ifndef __KRB5_STDCC_H__
3 #define __KRB5_STDCC_H__
4 
5 #if defined(_WIN32) || defined(USE_CCAPI)
6 
7 #include "k5-int.h"     /* loads krb5.h */
8 #include "../cc-int.h"
9 
10 #include <CredentialsCache.h>
11 
12 #define kStringLiteralLen 255
13 
14 /* globals to be exported */
15 extern krb5_cc_ops krb5_cc_stdcc_ops;
16 
17 /*
18  * structure to stash in the cache's data field
19  */
20 typedef struct _stdccCacheData {
21     char *cache_name;
22     cc_ccache_t NamedCache;
23 } stdccCacheData, *stdccCacheDataPtr;
24 
25 
26 /* function prototypes  */
27 
28 void krb5_stdcc_shutdown(void);
29 
30 krb5_error_code KRB5_CALLCONV krb5_stdccv3_close
31 (krb5_context, krb5_ccache id );
32 
33 krb5_error_code KRB5_CALLCONV krb5_stdccv3_destroy
34 (krb5_context, krb5_ccache id );
35 
36 krb5_error_code KRB5_CALLCONV krb5_stdccv3_end_seq_get
37 (krb5_context, krb5_ccache id , krb5_cc_cursor *cursor );
38 
39 krb5_error_code KRB5_CALLCONV krb5_stdccv3_generate_new
40 (krb5_context, krb5_ccache *id );
41 
42 const char * KRB5_CALLCONV krb5_stdccv3_get_name
43 (krb5_context, krb5_ccache id );
44 
45 krb5_error_code KRB5_CALLCONV krb5_stdccv3_get_principal
46 (krb5_context, krb5_ccache id , krb5_principal *princ );
47 
48 krb5_error_code KRB5_CALLCONV krb5_stdccv3_initialize
49 (krb5_context, krb5_ccache id , krb5_principal princ );
50 
51 krb5_error_code KRB5_CALLCONV krb5_stdccv3_next_cred
52 (krb5_context,
53  krb5_ccache id ,
54  krb5_cc_cursor *cursor ,
55  krb5_creds *creds );
56 
57 krb5_error_code KRB5_CALLCONV krb5_stdccv3_resolve
58 (krb5_context, krb5_ccache *id , const char *residual );
59 
60 krb5_error_code KRB5_CALLCONV krb5_stdccv3_retrieve
61 (krb5_context,
62  krb5_ccache id ,
63  krb5_flags whichfields ,
64  krb5_creds *mcreds ,
65  krb5_creds *creds );
66 
67 krb5_error_code KRB5_CALLCONV krb5_stdccv3_start_seq_get
68 (krb5_context, krb5_ccache id , krb5_cc_cursor *cursor );
69 
70 krb5_error_code KRB5_CALLCONV krb5_stdccv3_store
71 (krb5_context, krb5_ccache id , krb5_creds *creds );
72 
73 krb5_error_code KRB5_CALLCONV krb5_stdccv3_set_flags
74 (krb5_context, krb5_ccache id , krb5_flags flags );
75 
76 krb5_error_code KRB5_CALLCONV krb5_stdccv3_get_flags
77 (krb5_context, krb5_ccache id , krb5_flags *flags );
78 
79 krb5_error_code KRB5_CALLCONV krb5_stdccv3_remove
80 (krb5_context, krb5_ccache id , krb5_flags flags, krb5_creds *creds);
81 
82 krb5_error_code KRB5_CALLCONV krb5_stdccv3_ptcursor_new
83 (krb5_context context, krb5_cc_ptcursor *cursor);
84 
85 krb5_error_code KRB5_CALLCONV krb5_stdccv3_ptcursor_next
86 (krb5_context context, krb5_cc_ptcursor cursor, krb5_ccache *ccache);
87 
88 krb5_error_code KRB5_CALLCONV krb5_stdccv3_ptcursor_free
89 (krb5_context context, krb5_cc_ptcursor *cursor);
90 
91 krb5_error_code KRB5_CALLCONV krb5_stdccv3_lock
92 (krb5_context, krb5_ccache id);
93 
94 krb5_error_code KRB5_CALLCONV krb5_stdccv3_unlock
95 (krb5_context, krb5_ccache id);
96 
97 krb5_error_code KRB5_CALLCONV krb5_stdccv3_context_lock
98 (krb5_context context);
99 
100 krb5_error_code KRB5_CALLCONV krb5_stdccv3_context_unlock
101 (krb5_context context);
102 
103 krb5_error_code KRB5_CALLCONV krb5_stdccv3_switch_to
104 (krb5_context context, krb5_ccache id);
105 
106 #endif /* defined(_WIN32) || defined(USE_CCAPI) */
107 
108 #endif
109