aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypto/krb/valid_cksumtype.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto/krb/valid_cksumtype.c')
-rw-r--r--src/lib/crypto/krb/valid_cksumtype.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/crypto/krb/valid_cksumtype.c b/src/lib/crypto/krb/valid_cksumtype.c
index a701efc..07b84fe 100644
--- a/src/lib/crypto/krb/valid_cksumtype.c
+++ b/src/lib/crypto/krb/valid_cksumtype.c
@@ -31,12 +31,10 @@
krb5_boolean KRB5_CALLCONV
krb5_c_valid_cksumtype(krb5_cksumtype ctype)
{
- unsigned int i;
+ const struct krb5_cksumtypes *ctp;
- for (i = 0; i < krb5int_cksumtypes_length; i++) {
- if (krb5int_cksumtypes_list[i].ctype == ctype)
- return TRUE;
- }
-
- return FALSE;
+ ctp = find_cksumtype(ctype);
+ if (ctp == NULL)
+ return FALSE;
+ return TRUE;
}