summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Orton <joe@manyfish.uk>2022-07-20 16:59:51 +0100
committerJoe Orton <jorton@apache.org>2022-07-20 18:49:05 +0100
commit4ef7569ca6fb3c5ccca22ced2765dddb6ec51dc1 (patch)
treecfbcff052e7b2909d3a2431897b1ba36fe334f68
parent08ddde76323662510e5ef0046620978ec24b8979 (diff)
downloadneon-git-4ef7569ca6fb3c5ccca22ced2765dddb6ec51dc1.tar.gz
* src/ne_auth.c (get_cnonce): Fix non-SSL build and warnings in
SSL build for regressions in 3cc1e6916bfba255ab7234ad32428b743b521b63.
-rw-r--r--src/ne_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ne_auth.c b/src/ne_auth.c
index 3a88924..4c993d7 100644
--- a/src/ne_auth.c
+++ b/src/ne_auth.c
@@ -335,8 +335,9 @@ static void clean_session(auth_session *sess)
/* Returns client nonce string. */
static char *get_cnonce(void)
{
+#ifdef NE_HAVE_SSL
unsigned char data[32];
-
+#endif
#ifdef HAVE_GNUTLS
if (1) {
#if LIBGNUTLS_VERSION_NUMBER < 0x020b00
@@ -357,7 +358,6 @@ static char *get_cnonce(void)
/* Fallback sources of random data: all bad, but no good sources
* are available. */
ne_buffer *buf = ne_buffer_create();
- char *ret;
{
#ifdef HAVE_GETTIMEOFDAY
@@ -378,7 +378,7 @@ static char *get_cnonce(void)
ne_buffer_snprintf(buf, 32, "%lu", (unsigned long) pid);
}
- ret = ne_strhash(NE_HASH_MD5, buf->data);
+ return ne_strhash(NE_HASH_MD5, buf->data, NULL);
}
}