Implement krb5_auth_con_getkey' and
krb5_free_keyblock'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1172 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -79,14 +79,23 @@ krb5_auth_con_getkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock **keyblock)
|
||||
{
|
||||
*keyblock = malloc(sizeof(**keyblock));
|
||||
if (*keyblock == NULL)
|
||||
return ENOMEM;
|
||||
(*keyblock)->keytype = auth_context->key.keytype;
|
||||
(*keyblock)->contents.length = 0;
|
||||
return krb5_data_copy (&(*keyblock)->contents,
|
||||
auth_context->key.contents.data,
|
||||
auth_context->key.contents.length);
|
||||
}
|
||||
|
||||
|
||||
/* ??? */
|
||||
void
|
||||
krb5_free_keyblock(krb5_keyblock *keyblock)
|
||||
krb5_free_keyblock(krb5_context context,
|
||||
krb5_keyblock *keyblock)
|
||||
{
|
||||
|
||||
krb5_data_free (&keyblock->contents);
|
||||
free (keyblock);
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
|
Reference in New Issue
Block a user