From ead4c700f9c5f05f921be90da282566be1548d16 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 25 Mar 2007 23:06:58 +0000 Subject: [PATCH] Store a little more detail for unknown enctype error git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19264 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/decrypt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/crypto/decrypt.c b/src/lib/crypto/decrypt.c index c252eb7c2..96861bda1 100644 --- a/src/lib/crypto/decrypt.c +++ b/src/lib/crypto/decrypt.c @@ -39,8 +39,12 @@ krb5_c_decrypt(krb5_context context, const krb5_keyblock *key, break; } - if (i == krb5_enctypes_length) + if (i == krb5_enctypes_length) { + krb5int_set_error(&context->err, KRB5_BAD_ENCTYPE, + "Bad encryption type (type %d unknown)", + key->enctype); return(KRB5_BAD_ENCTYPE); + } if ((input->enctype != ENCTYPE_UNKNOWN) && (krb5_enctypes_list[i].etype != input->enctype)) -- 2.26.2