From e62ea35927ab65c55ebefcfbf0b921d1e6df2869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 22 Jul 2003 10:08:50 +0000 Subject: [PATCH] (krb5_checksum_is_keyed): only set extented error string when there is a context (krb5_checksum_is_collision_proof): ditto git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12480 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/crypto.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index 72a23a14f..dabf27c70 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -1922,8 +1922,9 @@ krb5_checksum_is_keyed(krb5_context context, { struct checksum_type *ct = _find_checksum(type); if(ct == NULL) { - krb5_set_error_string (context, "checksum type %d not supported", - type); + if (context) + krb5_set_error_string (context, "checksum type %d not supported", + type); return KRB5_PROG_SUMTYPE_NOSUPP; } return ct->flags & F_KEYED; @@ -1935,8 +1936,9 @@ krb5_checksum_is_collision_proof(krb5_context context, { struct checksum_type *ct = _find_checksum(type); if(ct == NULL) { - krb5_set_error_string (context, "checksum type %d not supported", - type); + if (context) + krb5_set_error_string (context, "checksum type %d not supported", + type); return KRB5_PROG_SUMTYPE_NOSUPP; } return ct->flags & F_CPROOF;