Add MIT glue for Kerberos RFC 3961 PRF functions.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20042 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -340,3 +340,30 @@ krb5_c_keylengths(krb5_context context,
|
|||||||
*ilen = (*ilen + 7) / 8;
|
*ilen = (*ilen + 7) / 8;
|
||||||
return krb5_enctype_keysize(context, enctype, keylen);
|
return krb5_enctype_keysize(context, enctype, keylen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
krb5_error_code KRB5_LIB_FUNCTION
|
||||||
|
krb5_c_prf_length(krb5_context context,
|
||||||
|
krb5_enctype type,
|
||||||
|
size_t *length)
|
||||||
|
{
|
||||||
|
return krb5_crypto_prf_length(context, type, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
krb5_error_code KRB5_LIB_FUNCTION
|
||||||
|
krb5_c_prf(krb5_context context,
|
||||||
|
const krb5_keyblock *key,
|
||||||
|
const krb5_data *input,
|
||||||
|
krb5_data *output)
|
||||||
|
{
|
||||||
|
krb5_crypto crypto;
|
||||||
|
krb5_error_code ret;
|
||||||
|
|
||||||
|
ret = krb5_crypto_init(context, key, 0, &crypto);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = krb5_crypto_prf(context, crypto, input, output);
|
||||||
|
krb5_crypto_destroy(context, crypto);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user