summaryrefslogtreecommitdiffstats
path: root/src/plugins/preauth/fast_factor.h
blob: 4059b28768c56a2f5fc21a5da0d566a5bf94e657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*Returns success with a null armor_key if  FAST is available but not in use.
Returns failure if the client library does not support FAST
*/
static  krb5_error_code fast_get_armor_key
(krb5_context context, preauth_get_client_data_proc get_data,
 struct _krb5_preauth_client_rock *rock,
 krb5_keyblock **armor_key)
{
    krb5_error_code retval = 0;
    krb5_data *data;
    retval = get_data(context, rock, krb5plugin_preauth_client_fast_armor, &data);
    if (retval == 0) {
	*armor_key = (krb5_keyblock *) data->data;
	data->data = NULL;
	get_data(context, rock, krb5plugin_preauth_client_free_fast_armor,
		 &data);
    }
    return retval;
}

static krb5_error_code fast_kdc_get_armor_key
(krb5_context context, preauth_get_entry_data_proc get_entry,
 krb5_kdc_req *request,struct _krb5_db_entry_new *client,
 krb5_keyblock **armor_key)
{
    krb5_error_code retval;
    krb5_data *data;
     retval = get_entry(context, request, client,  krb5plugin_preauth_fast_armor,
			&data);
     if (retval == 0) {
	 *armor_key = (krb5_keyblock *) data->data;
	 data->data = NULL;
	 get_entry(context, request, client, 
		   krb5plugin_preauth_free_fast_armor, &data);
     }
     return retval;
 }



 static krb5_error_code fast_kdc_replace_reply_key
 (krb5_context context, preauth_get_entry_data_proc get_data,
  krb5_kdc_req *request)
 {
     return 0;
 }

static krb5_error_code fast_set_kdc_verified
(krb5_context context, preauth_get_client_data_proc     get_data,
 struct _krb5_preauth_client_rock *rock)
{
    return 0;
}