[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3641 - GNUnet/src/util/crypto
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3641 - GNUnet/src/util/crypto |
Date: |
Sat, 4 Nov 2006 08:17:31 -0800 (PST) |
Author: grothoff
Date: 2006-11-04 08:17:30 -0800 (Sat, 04 Nov 2006)
New Revision: 3641
Modified:
GNUnet/src/util/crypto/symciphertest.c
Log:
fx
Modified: GNUnet/src/util/crypto/symciphertest.c
===================================================================
--- GNUnet/src/util/crypto/symciphertest.c 2006-11-04 16:06:04 UTC (rev
3640)
+++ GNUnet/src/util/crypto/symciphertest.c 2006-11-04 16:17:30 UTC (rev
3641)
@@ -69,7 +69,7 @@
int verifyCrypto() {
SESSIONKEY key;
- char * result;
+ char result[SESSIONKEY_LEN];
char * res;
int ret;
@@ -77,15 +77,16 @@
unsigned char raw_key[] = {106, 74, 209, 88, 145, 55, 189, 135, 125, 180,
225, 108, 183, 54, 25, 169, 129, 188, 131, 75, 227, 245, 105, 10, 225, 15, 115,
159, 148, 184, 34, 191};
unsigned char encrresult[] = {81, 81, 181, 234, 78, 198, 242, 124, 199, 59,
152, 213, 230, 76, 250, 135, 243, 23, 66, 130, 175, 146, 141, 172, 165, 82,
193, 236, 133, 145, 93, 37};
- result = MALLOC(SESSIONKEY_LEN);
res = NULL;
ret = 0;
memcpy(key.key, raw_key, SESSIONKEY_LEN);
key.crc32 = htonl(crc32N(&key, SESSIONKEY_LEN));
- if (ntohl(key.crc32) != (unsigned int) 2344502530LL) {
- printf("Static key has different CRC\n");
+ if (ntohl(key.crc32) != (unsigned int) 38125195LL) {
+ printf("Static key has different CRC: %u - %u\n",
+ ntohl(key.crc32),
+ key.crc32);
ret = 1;
goto error;
@@ -122,7 +123,6 @@
error:
- FREE(result);
FREENONNULL(res);
return ret;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3641 - GNUnet/src/util/crypto,
grothoff <=