0

I have an C++ application which is using curl 7.61.1 version. while trying to connect to device using ssl I get this error: "Protocol https not supported or disabled in libcurl"

although the default curl version installed in RHEL8 supports https

curl --version

curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1 zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.8.3/openssl/zlib nghttp2/1.33.0 Release-Date: 2018-09-05 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz brotli TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Metalink

please suggest how to configure/use curl with ssl in Redhat Linux 8

  • 1
    The possible reason listed here... – Arun Kumar Jun 24 '19 at 06:59
  • 1
    is your c++ application using curl the cli program? (eg via system() or similar) or do you mean your c++ program is using **lib**curl, the library? – hanshenrik Jun 24 '19 at 07:16
  • 2
    The protocol in that error string has quotes around it since 7.38.0, so if you see "https" in there without quotes you're not using curl 7.61.1 but something **much** older. Check your installation and especially for *more than one* curl installation. – Daniel Stenberg Jun 24 '19 at 07:40
  • @hanshenrik, yes it is built with libcurl library – Sunil Kumar Yadav Jun 25 '19 at 04:16
  • @ArunKumar, already checked this information. url is correctly used within application. thanks – Sunil Kumar Yadav Jun 25 '19 at 04:21
  • if you compile both openssl and libcurl from source and make sure to link libcurl to your own custom compiled openssl, and make sure to link your program to your own custom compiled libcurl, that would *probably* fix it, you can find debian-instructions here: https://stackoverflow.com/questions/56377171/how-to-compile-curl-with-legacy-ssl-support-on-ubuntu/56394968#56394968 (idk how to do it on Red Hat but i imagine it's fairly similar to Debian) – hanshenrik Jun 25 '19 at 06:23

0 Answers0