summaryrefslogtreecommitdiff
path: root/lib/ZCkAuth.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ZCkAuth.c')
-rw-r--r--lib/ZCkAuth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ZCkAuth.c b/lib/ZCkAuth.c
index 13d3077..becf408 100644
--- a/lib/ZCkAuth.c
+++ b/lib/ZCkAuth.c
@@ -71,11 +71,14 @@ int ZCheckAuthentication(notice, from)
__Zephyr_realm, &cred))
return (ZAUTH_NO);
+#ifdef NOENCRYPTION
+ our_checksum = 0;
+#else
our_checksum = (ZChecksum_t)quad_cksum(notice->z_packet, NULL,
notice->z_default_format+
strlen(notice->z_default_format)+1-
notice->z_packet, 0, cred.session);
-
+#endif
/* if mismatched checksum, then the packet was corrupted */
return ((our_checksum == notice->z_checksum) ? ZAUTH_YES : ZAUTH_FAILED);