From 570c17aa3bb6a39030ebefc5618f0c3fa8cf0089 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 25 Apr 2004 05:50:07 +0000 Subject: Debugging of simple authentication handler --- daemon/ldap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'daemon/ldap.c') diff --git a/daemon/ldap.c b/daemon/ldap.c index 2474d09..440c531 100644 --- a/daemon/ldap.c +++ b/daemon/ldap.c @@ -920,15 +920,20 @@ static int digest_ldap_challenge(ldap_context_t* ctx, ha_response_t* resp, ha_buffer_t* buf, int stale) { unsigned char nonce[DIGEST_NONCE_LEN]; + const char* nonce_str; const char* header; ASSERT(ctx && resp && buf); /* Generate an nonce */ digest_makenonce(nonce, g_ldap_secret, NULL); + nonce_str = ha_bufenchex(buf, nonce, DIGEST_NONCE_LEN); + + if(!nonce_str) + return HA_ERROR; /* Now generate a message to send */ - header = digest_challenge(buf, nonce, ctx->realm, ctx->domains, stale); + header = digest_challenge(buf, nonce_str, ctx->realm, ctx->domains, stale); if(!header) return HA_ERROR; -- cgit v1.2.3