Mercurial > trustbridge
diff common/listutil.c @ 1394:8d27c6d226cd
Improve debug output for list verification and no installed list
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 23 Jan 2015 15:25:50 +0100 |
parents | 3cd8dd706aaa |
children | a2574a029322 |
line wrap: on
line diff
--- a/common/listutil.c Mon Jan 19 15:45:28 2015 +0100 +++ b/common/listutil.c Fri Jan 23 15:25:50 2015 +0100 @@ -135,6 +135,7 @@ if (!data || !size) { + ERRORPRINTF ("Invalid call.\n"); return -1; } @@ -142,7 +143,8 @@ p = strchr(data, '\r'); if (p == 0 || (unsigned int)(p - (data + 2)) != sig_b64_size) { - /* printf("Invalid data. Signature might be too long.\n"); */ + DEBUGPRINTF("Invalid data. Signature might be too long.\n"); + DEBUGPRINTF("Should: %u is: %u\n", sig_b64_size, (unsigned int)(p - (data + 2))); return -1; } strncpy(signature_b64, data + 2, sig_b64_size); @@ -153,7 +155,7 @@ if (ret != 0 || sig_size != TRUSTBRIDGE_RSA_KEY_SIZE / 8) { - /* printf("failed to decode signature\n"); */ + DEBUGPRINTF("failed to decode signature\n"); return -1; }