DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

Error building curl 7.54.0 on Directadmin server against OpenSSL 1.0.2

| 14:09:29 20.05.2017

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.

Who is affected?

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

Let's get it fixed!

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.

Build cURL

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
About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.




All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition