Bug 835 - macro USE_DSA should be added for `_verify_nettle_dsa` in validator/val_secalgo.c
macro USE_DSA should be added for `_verify_nettle_dsa` in validator/val_secal...
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.5.9
All All
: P5 trivial
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-20 14:17 CEST by 0xbbc
Modified: 2016-09-20 14:22 CEST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 0xbbc 2016-09-20 14:17:43 CEST
When '--disable-dsa' is supplied to configure, _verify_nettle_dsa still builds, causing errors below: 


./libtool --tag=CC --mode=compile gcc -I.  -I/usr/local/include/nettle -I/usr/local/include -I/usr/local/include -g -O2 -flto -D_THREAD_SAFE  -pthread -o val_secalgo.lo -c validator/val_secalgo.c
libtool: compile:  gcc -I. -I/usr/local/include/nettle -I/usr/local/include -I/usr/local/include -g -O2 -flto -D_THREAD_SAFE -pthread -c validator/val_secalgo.c  -fno-common -DPIC -o .libs/val_secalgo.o
validator/val_secalgo.c:1378:24: error: variable has incomplete type
      'struct dsa_public_key'
        struct dsa_public_key pubkey;
                              ^
validator/val_secalgo.c:1378:9: note: forward declaration of
      'struct dsa_public_key'
        struct dsa_public_key pubkey;
               ^
validator/val_secalgo.c:1434:2: warning: implicit declaration of function
      'nettle_dsa_public_key_init' is invalid in C99
      [-Wimplicit-function-declaration]
        nettle_dsa_public_key_init(&pubkey);
        ^
validator/val_secalgo.c:1447:9: warning: implicit declaration of function
      'dsa_sha1_verify_digest' is invalid in C99
      [-Wimplicit-function-declaration]
        res &= dsa_sha1_verify_digest(&pubkey, digest, &signature);
               ^
validator/val_secalgo.c:1451:2: warning: implicit declaration of function
      'nettle_dsa_public_key_clear' is invalid in C99
      [-Wimplicit-function-declaration]
        nettle_dsa_public_key_clear(&pubkey);
        ^
3 warnings and 1 error generated.
make: *** [val_secalgo.lo] Error 1



P.S
I'm not sure this is the right way to figure it out, but after my adding this macro for `_verify_nettle_dsa`, it compiles.
Comment 1 Wouter Wijngaards 2016-09-20 14:22:30 CEST
Hi,

Thank you for the report, yes that fixes the problem.  Applied the fix.

Best regards, Wouter