add auth_data bits
This commit is contained in:
@@ -67,6 +67,7 @@ krb5_auth_con_init(krb5_context context,
|
||||
p->remote_port = 0;
|
||||
p->keytype = KRB5_ENCTYPE_NULL;
|
||||
p->cksumtype = CKSUMTYPE_NONE;
|
||||
p->auth_data = NULL;
|
||||
*auth_context = p;
|
||||
return 0;
|
||||
}
|
||||
@@ -404,6 +405,28 @@ krb5_auth_con_getkeytype (krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_add_AuthorizationData(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int type,
|
||||
krb5_data *data)
|
||||
{
|
||||
AuthorizationDataElement el;
|
||||
|
||||
if (auth_context->auth_data == NULL) {
|
||||
auth_context->auth_data = calloc(1, sizeof(*auth_context->auth_data));
|
||||
if (auth_context->auth_data == NULL)
|
||||
return krb5_enomem(context);
|
||||
}
|
||||
el.ad_type = type;
|
||||
el.ad_data.data = data->data;
|
||||
el.ad_data.length = data->length;
|
||||
|
||||
return add_AuthorizationData(auth_context->auth_data, &el);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setenctype(krb5_context context,
|
||||
|
Reference in New Issue
Block a user