If you have a custom installation of cURL to support of HTTP/2 and the recent version 7.54.0 fails to built with the error:
vtls/openssl.c: In function 'ossl_connect_step1': vtls/openssl.c:2105:5: error: implicit declaration of function 'SSL_CTX_set_srp_username' [-Werror=implicit-function-declaration] if(!SSL_CTX_set_srp_username(connssl->ctx, ssl_username)) { ^ vtls/openssl.c:2109:5: error: implicit declaration of function 'SSL_CTX_set_srp_password' [-Werror=implicit-function-declaration] if(!SSL_CTX_set_srp_password(connssl->ctx, SSL_SET_OPTION(password))) { ^ cc1: some warnings being treated as errors make[2]: *** [vtls/libcurl_la-openssl.lo] Error 1 make[2]: Leaving directory `/usr/local/directadmin/custombuild/curl-7.54.0/lib' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/directadmin/custombuild/curl-7.54.0/lib' make: *** [all-recursive] Error 1 *** The make has failed, would you like to try to make again? (y,n):
we've got a solution for you.
It was found that cURL 7.54.0 fails to build against OpenSSL 1.0.2 on Directadmin servers with CentOS 6 and CentOS 7 which are having a basic version of OpenSSL 1.0.1e installed from rpm packages:
CentOS 7:
openssl-1.0.1e-60.el7_3.1.x86_64 openssl-devel-1.0.1e-60.el7_3.1.x86_64 openssl-libs-1.0.1e-60.el7_3.1.x86_64
CentOS 6:
openssl-static-1.0.1e-42.el6.x86_64 openssl-1.0.1e-42.el6.x86_64 openssl-devel-1.0.1e-42.el6.x86_64
This is how you can fix it: you should upgrade the basic version the package to the latest available OpenSSL 1.0.1u or even newer OpenSSL 1.0.2 or OpenSSL 1.1.0.
Here are instructions on how to update it to the latest OpenSSL 1.0.1:
cd /usr/local/directadmin/scripts/ wget https://raw.githubusercontent.com/poralix/directadmin-utils/master/openssl/openssl.install-1.0.1-primary.sh chmod 755 openssl.install-1.0.1-primary.sh ./openssl.install-1.0.1-primary.sh
As we install the newer version over the existing one we need to lock the rpm-packages openssl-* with the following commands:
yum -y install yum-plugin-versionlock yum versionlock openssl-*
to keep the newest OpenSSL version away from rpm/yum updates.
cd /usr/local/directadmin/custombuild/ ./build clean ./build update ./build curl
Check it to see:
# curl -V curl 7.54.0 (x86_64-pc-linux-gnu) libcurl/7.54.0 OpenSSL/1.0.2k zlib/1.2.7 nghttp2/1.20.0 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy