xaptum / ecdaa

A C implementation of elliptic-curve-based Direct Anonymous Attestation (DAA) signatures. Created to support the Xaptum Edge Network Fabric, an IoT Network Solution.
https://www.xaptum.com
Apache License 2.0
45 stars 8 forks source link

Compilation fails if `DISABLE_LIBSODIUM_RNG_SEED_FUNCTION` is enabled #95

Closed drbild closed 6 years ago

drbild commented 6 years ago
[ 91%] Building C object CMakeFiles/ecdaa.dir/src/signature_TPM.c.o
/usr/local/Homebrew/Library/Homebrew/shims/super/clang -Decdaa_EXPORTS -I/tmp/ecdaa-20180406-57779-n5hp1d/ecdaa-0.8.3/build/include -isystem /usr/local/include  -DDISABLE_LIBSODIUM_RNG_SEED_FUNCTION -Werror -Wall -Wextra -std=c99 -Wno-missing-field-initializers -DNDEBUG -fPIC   -o CMakeFiles/ecdaa.dir/src/signature_TPM.c.o   -c /tmp/ecdaa-20180406-57779-n5hp1d/ecdaa-0.8.3/build/src/signature_TPM.c
/tmp/ecdaa-20180406-57779-n5hp1d/ecdaa-0.8.3/build/src/prng.c:108:16: error: use of undeclared identifier 'INT_MAX'
    } else if (INT_MAX < seed_size) {
               ^
1 error generated.
zanebeckwith commented 6 years ago

Good catch. I probably haven't compiled with that option set since I originally set it up (I hope I did then...)

It's a simple include statement that needs to be moved. I'll submit a PR for that.

However, this now raises the fact that essentially all of the tests assume that this option isn't set, so trying to compile with it breaks everything.

I'll be changing the way we take randomness in the next week, so I'm going to punt on this now, because it will be solved by that change.

closed by #97