From 0db626f9e37f338974a838b931e266ad21d8f8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 4 Dec 2007 19:58:55 +0000 Subject: [PATCH] Implement supportedMechs request. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22151 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kdc/digest.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/kdc/digest.c b/kdc/digest.c index 36b39caae..0e7934144 100644 --- a/kdc/digest.c +++ b/kdc/digest.c @@ -1331,6 +1331,25 @@ _kdc_do_digest(krb5_context context, version, ireq.u.ntlmRequest.username); break; } + case choice_DigestReqInner_supportedMechs: + + r.element = choice_DigestRepInner_supportedMechs; + memset(&r.u.supportedMechs, 0, sizeof(r.u.supportedMechs)); + + if (config->digests_allowed & NTLM_V1) + r.u.supportedMechs.ntlm_v1 = 1; + if (config->digests_allowed & NTLM_V1_SESSION) + r.u.supportedMechs.ntlm_v1_session = 1; + if (config->digests_allowed & NTLM_V2) + r.u.supportedMechs.ntlm_v2 = 1; + if (config->digests_allowed & DIGEST_MD5) + r.u.supportedMechs.digest_md5 = 1; + if (config->digests_allowed & CHAP_MD5) + r.u.supportedMechs.chap_md5 = 1; + if (config->digests_allowed & MS_CHAP_V2) + r.u.supportedMechs.ms_chap_v2 = 1; + break; + default: { char *s; krb5_set_error_string(context, "unknown operation to digest");