[gnutls-devel] BUG - Changes in 'struct sha1_ctx' and 'struct sha256_ctx' - nettle

Mariusz Ornowski mariusz.ornowski at ict-project.pl
Thu Dec 12 11:11:26 CET 2013


Hi,

 

I tried to compile gnutls-3.2.7 using latest nettle (from git repository).
Following errors had occurred:

 

//===================================

sha-padlock.c: In function 'padlock_sha1_update':

sha-padlock.c:80:2: error: 'struct sha1_ctx' has no member named
'count_high'

sha-padlock.c:80:2: error: 'struct sha1_ctx' has no member named 'count_low'

sha-padlock.c:80:2: error: 'struct sha1_ctx' has no member named
'count_high'

sha-padlock.c:80:2: error: 'struct sha1_ctx' has no member named 'count_low'

sha-padlock.c: In function 'padlock_sha256_update':

sha-padlock.c:87:2: error: 'struct sha256_ctx' has no member named
'count_high'

sha-padlock.c:87:2: error: 'struct sha256_ctx' has no member named
'count_low'

sha-padlock.c:87:2: error: 'struct sha256_ctx' has no member named
'count_high'

sha-padlock.c:87:2: error: 'struct sha256_ctx' has no member named
'count_low'

sha-padlock.c: In function 'padlock_sha1_digest':

sha-padlock.c:142:13: error: 'struct sha1_ctx' has no member named
'count_high'

sha-padlock.c:142:38: error: 'struct sha1_ctx' has no member named
'count_low'

sha-padlock.c:143:12: error: 'struct sha1_ctx' has no member named
'count_low'

sha-padlock.c: In function 'padlock_sha256_digest':

sha-padlock.c:164:13: error: 'struct sha256_ctx' has no member named
'count_high'

sha-padlock.c:164:38: error: 'struct sha256_ctx' has no member named
'count_low'

sha-padlock.c:165:12: error: 'struct sha256_ctx' has no member named
'count_low'

//===================================

 

I've looked into nettle log and I've found following change:

 

//===================================

@@ -48,7 +48,7 @@ extern "C" {

struct sha1_ctx

{

   uint32_t state[_SHA1_DIGEST_LENGTH];    /* State variables */

-  uint32_t count_low, count_high;         /* 64-bit block count */

+  uint64_t count;                         /* 64-bit block count */

   uint8_t block[SHA1_DATA_SIZE];          /* SHA1 data buffer */

   unsigned int index;                     /* index into buffer */

};

 

commit b8bfc32ff2fe1084614332bdda4d3b7805f62da0

Author: Niels Möller <nisse at lysator.liu.se>

Date:   Fri Apr 26 10:28:57 2013 +0200

 

    Use size_t rather than unsigned for all hash-related functions.

//===================================

 

Probably this is the issue.

 

Regards,

Mariusz Ornowski

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20131212/bac5e668/attachment.html>


More information about the Gnutls-devel mailing list