From 464d720b1c3b4a0d69136864b070a1368d5a79e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 8 May 2006 13:47:24 +0000 Subject: [PATCH] Catches both keyed checkout w/o crypto context cases and doesn't reset the string, and corrects the grammar. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17514 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/crypto.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index 975be3504..2c6c74f74 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -1957,9 +1957,8 @@ create_checksum (krb5_context context, keyed_checksum = (ct->flags & F_KEYED) != 0; if(keyed_checksum && crypto == NULL) { krb5_set_error_string (context, "Checksum type %s is keyed " - "not no crypto context (key) was passed in", + "but no crypto context (key) was passed in", ct->name); - krb5_clear_error_string (context); return KRB5_PROG_SUMTYPE_NOSUPP; /* XXX */ } if(keyed_checksum) { @@ -2044,7 +2043,9 @@ verify_checksum(krb5_context context, } keyed_checksum = (ct->flags & F_KEYED) != 0; if(keyed_checksum && crypto == NULL) { - krb5_clear_error_string (context); + krb5_set_error_string (context, "Checksum type %s is keyed " + "but no crypto context (key) was passed in", + ct->name); return KRB5_PROG_SUMTYPE_NOSUPP; /* XXX */ } if(keyed_checksum)