cfgparser: use correct SHA256_DIGEST_LENGTH
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 10 Jan 2017 09:48:43 +0000 (10:48 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 10 Jan 2017 11:39:13 +0000 (12:39 +0100)
Not SHA_DIGEST_LENGTH, which is for SHA1 checksums

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/cfgparser/olsrd_conf_checksum.c

index 2a2e50c..2ece216 100644 (file)
 #include <string.h>
 
 #ifdef NOCONFIGCHECKSUM
-#define SHA_DIGEST_LENGTH 1
+#define SHA256_DIGEST_LENGTH 1
 #else
 #include <openssl/sha.h>
 static SHA256_CTX ctx;
 #endif /* NOCONFIGCHECKSUM */
 
-static unsigned char configuration_checksum[SHA_DIGEST_LENGTH];
+static unsigned char configuration_checksum[SHA256_DIGEST_LENGTH];
 static char configuration_checksum_str[(sizeof(configuration_checksum) * 2) + 1];
 
 #define CLI_START     "*CLI START*"