From 1669672ce53a0a094e19ef6f7b96281d7c2bd2ab Mon Sep 17 00:00:00 2001 From: kcr Date: Mon, 21 Jan 2008 19:09:14 +0000 Subject: [PATCH] no more NOENCRYPTION git-svn-id: svn://svn.1ts.org/debian/branches/zephyr-reloaded@269 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f --- zephyr/lib/ZCkAuth.c | 5 +---- zephyr/lib/ZFmtAuth.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/zephyr/lib/ZCkAuth.c b/zephyr/lib/ZCkAuth.c index a851463..94de793 100644 --- a/zephyr/lib/ZCkAuth.c +++ b/zephyr/lib/ZCkAuth.c @@ -52,14 +52,11 @@ ZCheckAuthentication(ZNotice_t *notice, session = (C_Block *)cred.session; -#ifdef NOENCRYPTION - our_checksum = 0; -#else our_checksum = des_quad_cksum(notice->z_packet, NULL, notice->z_default_format+ strlen(notice->z_default_format)+1- notice->z_packet, 0, session); -#endif + /* if mismatched checksum, then the packet was corrupted */ return ((our_checksum == notice->z_checksum) ? ZAUTH_YES : ZAUTH_FAILED); #else diff --git a/zephyr/lib/ZFmtAuth.c b/zephyr/lib/ZFmtAuth.c index 21b133b..821e608 100644 --- a/zephyr/lib/ZFmtAuth.c +++ b/zephyr/lib/ZFmtAuth.c @@ -37,12 +37,9 @@ ZFormatAuthenticNotice(ZNotice_t *notice, &hdrlen, &ptr, NULL)) != ZERR_NONE) return (retval); -#ifdef NOENCRYPTION - newnotice.z_checksum = 0; -#else newnotice.z_checksum = (ZChecksum_t)des_quad_cksum((unsigned char *)buffer, NULL, ptr - buffer, 0, (C_Block *)session); -#endif + if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, &hdrlen, NULL, NULL)) != ZERR_NONE) return (retval); -- 2.45.2