diff options
author | Stef Walter <stef@memberwebs.com> | 2004-04-25 05:50:07 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-04-25 05:50:07 +0000 |
commit | 570c17aa3bb6a39030ebefc5618f0c3fa8cf0089 (patch) | |
tree | 34fd08eb06f92c4aadec308151ddc8fc80dcab08 /daemon/ldap.c | |
parent | 36ab0775e1c5ec4352f36074cea8bfbe49302b80 (diff) |
Debugging of simple authentication handler
Diffstat (limited to 'daemon/ldap.c')
-rw-r--r-- | daemon/ldap.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |