OpenSSL 1.1: libbitcoinconsensus_la-ecwrapper BN_zero_ex(zero) void to bool #6994

issue vindicatorr opened this issue on November 12, 2015
  1. vindicatorr commented at 7:13 AM on November 12, 2015: none

    ODroid XU4 (ARM) Ubuntu 15.04 OpenSSL 1.1.0-dev native host compilation (not cross)

      CXX      libbitcoinconsensus_la-eccryptoverify.lo
      CXX      libbitcoinconsensus_la-ecwrapper.lo
    In file included from ecwrapper.cpp:10:0:
    ecwrapper.cpp: In function 'int {anonymous}::ECDSA_SIG_recover_key_GFp(EC_KEY*, ECDSA_SIG*, const unsigned char*, int, int, int)':
    ecwrapper.cpp:91:10: error: could not convert 'BN_zero_ex(zero)' from 'void' to 'bool'
         if (!BN_zero(zero)) { ret=-1; goto err; }
              ^
    ecwrapper.cpp:91:10: error: in argument to unary !
    At global scope:
    cc1plus: warning: unrecognized command line option "-Wno-self-assign"
    Makefile:5803: recipe for target 'libbitcoinconsensus_la-ecwrapper.lo' failed
    make[2]: *** [libbitcoinconsensus_la-ecwrapper.lo] Error 1
    

    config.log

    ...
    configure:26130: $PKG_CONFIG --exists --print-errors "libssl"
    configure:26133: $? = 0
    configure:26171: result: yes
    ...
    configure:27040: checking openssl/ec.h usability
    configure:27040: g++ -c -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-self-assign -I/usr/local/include  -I/usr/local/include   -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 conftest.cpp >&5
    configure:27040: $? = 0
    configure:27040: result: yes
    configure:27040: checking openssl/ec.h presence
    configure:27040: g++ -E  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 conftest.cpp
    configure:27040: $? = 0
    configure:27040: result: yes
    configure:27040: checking for openssl/ec.h
    configure:27040: result: yes
    ...
    ac_cv_header_openssl_ec_h=yes
    ...
    pkg_cv_SSL_CFLAGS='-I/usr/local/include '
    pkg_cv_SSL_LIBS='-L/usr/local/lib -lssl '
    ...
    SSL_CFLAGS='-I/usr/local/include '
    SSL_LIBS='-L/usr/local/lib -lssl '
    

    *Same git source built fine on Ubuntu 15.10 for AMD64 EDIT: *but didn't self-build openssl 1.1 on AMD64

  2. vindicatorr commented at 7:22 AM on November 12, 2015: none
    $ grep -r BN_zero /usr/local/ssl/
    /usr/local/ssl/include/openssl/bn.h:void BN_zero_ex(BIGNUM *a);
    /usr/local/ssl/include/openssl/bn.h:#  define BN_zero(a)      BN_zero_ex(a)
    /usr/local/ssl/include/openssl/bn.h:#  define BN_zero(a)      (BN_set_word((a),0))
    

    EDIT:

    BN_zero() only needs to set 'top' and 'neg' to zero for correct results,
         and this should never fail. So the return value from the use of
         BN_set_word() (which can fail due to needless expansion) is now deprecated;
         if OPENSSL_NO_DEPRECATED is defined, BN_zero() is a void macro.
    

    *https://www.openssl.org/news/changelog.html

  3. vindicatorr renamed this:
    ARM: libbitcoinconsensus_la-ecwrapper BN_zero_ex(zero) void to bool
    OpenSSL 1.1: libbitcoinconsensus_la-ecwrapper BN_zero_ex(zero) void to bool
    on Nov 12, 2015
  4. laanwj commented at 10:29 AM on November 17, 2015: member

    Is this still relevant after #6954?

  5. sipa commented at 11:07 AM on November 17, 2015: member

    No

  6. laanwj closed this on Nov 19, 2015

  7. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me