add krb5_crypto_get_checksum_type

From: Luke Howard <lukeh@PADL


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12612 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-08-23 11:33:53 +00:00
parent 751a7769ef
commit 2eaeba1f93

View File

@@ -1977,6 +1977,31 @@ krb5_verify_checksum(krb5_context context,
data, len, cksum);
}
krb5_error_code
krb5_crypto_get_checksum_type(krb5_context context,
krb5_crypto crypto,
krb5_cksumtype *type)
{
struct checksum_type *ct = NULL;
if (crypto != NULL) {
ct = crypto->et->keyed_checksum;
if (ct == NULL)
ct = crypto->et->checksum;
}
if (ct == NULL) {
krb5_set_error_string (context, "checksum type %d not supported",
type);
return KRB5_PROG_SUMTYPE_NOSUPP;
}
*type = ct->type;
return 0;
}
krb5_error_code
krb5_checksumsize(krb5_context context,
krb5_cksumtype type,