kdc: map KRB5_PROG_SUMTYPE_NOSUPP to KRB5KDC_ERR_SUMTYPE_NOSUPP

RFC4120 says KRB5KDC_ERR_SUMTYPE_NOSUPP should be returned if the KDC does not
support a given checksum type. Return this instead of KRB5_PROG_SUMTYPE_NOSUPP
by introducing a new wrapper function, _kdc_verify_checksum().
This commit is contained in:
Luke Howard
2021-09-21 18:09:25 +10:00
parent 85756bd228
commit fd3f463152
4 changed files with 27 additions and 13 deletions

View File

@@ -586,9 +586,9 @@ _kdc_do_digest(krb5_context context,
if (ret)
goto out;
ret = krb5_verify_checksum(context, crypto,
ret = _kdc_verify_checksum(context, crypto,
KRB5_KU_DIGEST_OPAQUE,
buf.data, buf.length, &res);
&buf, &res);
free_Checksum(&res);
krb5_data_free(&buf);
krb5_crypto_destroy(context, crypto);