curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: error: implicit declaration of function 'RAND_egd'

From: Jeffrey Walton via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 23 Mar 2020 20:27:22 -0400

On Mon, Mar 23, 2020 at 8:22 PM Jeffrey Walton <noloader_at_gmail.com> wrote:
>
> On Mon, Mar 23, 2020 at 7:50 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
> >
> > On Mon, 23 Mar 2020, Jeffrey Walton wrote:
> >
> > > $ OpenSSL 1.1.1e
> > > $ nm -g $HOME/tmp/lib/libcrypto.so | grep RAND_egd
> > > $
> > >
> > > So it looks like EGD is off by default in OpenSSL 1.1.1.
> >
> > Indeed, but also this works fine for me already! I had totally forgot about it
> > but the configure script checks for RAND_egd and our code #ifdefs accordingly.
> >
> > On my machine in the curl tree:
> >
> > $ grep RAND_EGD lib/curl_config.h
> > /* #undef HAVE_RAND_EGD */
>
> Thanks.
>
> It appears Linux is different then NetBSD.
>
> I don't see anything interesting and untried in configure:
>
> grep -i 'egd' configure
> with_egd_socket
> --with-egd-socket=FILE Entropy Gathering Daemon socket pathname
> for ac_func in RAND_egd \
> # Check whether --with-egd-socket was given.
> if test "${with_egd_socket+set}" = set; then :
> withval=$with_egd_socket; EGD_SOCKET="$withval"
> if test -n "$EGD_SOCKET" ; then
> #define EGD_SOCKET "$EGD_SOCKET"
>
> I've tried both --without-egd and --without-egd-socket.
>
> How do I turn off the feature?

This is kind of hacky, but I was able to disable EGD with:

    ./configure \
        ac_cv_func_RAND_egd=no \
        "${CONFIG_OPTS[@]}"

It shows as a cached no:

    checking for openssl/err.h... yes
    checking for RAND_egd... (cached) no
    checking for SSLv2_client_method... yes
    checking for OpenSSL_version... yes
    checking for BoringSSL... no
    checking for libressl... no

Jeff
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-03-24