search
HomeSystem TutorialLINUXHow To Install Curl With GnuTLS Backend In Debian

When you install curl using the default package manager in Linux distributions like Debian, it typically comes pre-compiled with OpenSSL as the TLS backend. Because almost every curl distributor/packager builds Curl with OpenSSL backend. Changing to a different TLS backend isn't as straightforward as simply selecting a different option, but it is possible . In this Step-by-Step tutorial, we will see how to install curl with GnuTLS backend in Debian.

Before getting into the topic, let me give a you brief introduction to the TLS backend and the list of supported TLS backends by Curl.

Table of Contents

What is a TLS backend?

When you compile curl from source, it needs a way to handle secure connections (HTTPS). This is done through a TLS backend. TLS (Transport Layer Security) is essential for secure communication over networks.

Curl supports multiple TLS libraries or backends. Here's the list of supported backends:

1. AmiSSL

AmiSSL is an SSL/TLS implementation for AmigaOS systems. It's not commonly used unless you're developing for Amiga platforms. To compile Curl with AmiSSL, you can use --with-amissl option.

2. BearSSL

BearSSL is a smaller, more focused SSL/TLS library. It's designed to be lightweight and suitable for embedded systems. To install Curl with BearSSL, use --with-bearssl option.

3. GnuTLS

GnuTLS is a secure communications library implementing the SSL, TLS, and DTLS protocols. It's a popular open-source alternative to OpenSSL. To install Curl with GnuTLS, you can use --with-gnutls option.

4. Mbed TLS

Mbed TLS (formerly known as PolarSSL) is an open source, portable, easy to use, readable and flexible SSL library. It's often used in embedded systems and IoT devices. To install Curl with Mbed TLS, use --with-mbedtls.

5. OpenSSL

OpenSSL is one of the most widely used TLS libraries. This option also works for BoringSSL (Google's fork of OpenSSL) and LibreSSL (OpenBSD's fork of OpenSSL). You can use --with-openssl to install Curl with OpenSSL.

6. Rustls

Rustls is a modern TLS library written in Rust. It aims to provide a safer and more efficient implementation. To install Curl with Rustls, use --with-rustls.

7. Schannel

Schannel is the Security Support Provider (SSP) for Windows operating systems. It's used when building curl for Windows platforms. To install Curl with Schannel, use --with-schannel.

8. Secure Transport

Secure Transport is Apple's TLS implementation. This option is used when building curl for macOS or iOS. We can install Curl with Secure Transport backend using --with-secure-transport option.

9. wolfSSL

wolfSSL (formerly CyaSSL) is a lightweight, portable, C-language-based SSL/TLS library targeted at IoT, embedded, and RTOS environments. To install Curl with wolfSSL, use --with-wolfssl.

Choosing the Right TLS Backend

  • OpenSSL (--with-openssl): This is typically the most common and widely supported choice. It provides a robust feature set and is well-tested in various environments.
  • GnuTLS (--with-gnutls): Another solid choice, especially if you prefer to avoid OpenSSL due to its license or other considerations. GnuTLS is known for its focus on security and is used by many Linux distributions.
  • Other Backends: Choose these if you have specific requirements or preferences based on platform compatibility, licensing, or performance considerations.

Example Usage

To compile curl with a specific TLS backend, you would typically use the ./configure script with the appropriate --with- option. For example:

./configure --with-openssl

This command configures curl to use OpenSSL as the TLS backend. Replace openssl with your preferred backend option from the list above.

Install Curl from Source with GnuTLS using GNU Stow

Debian actually provides two versions of libcurl: one built with OpenSSL and another with GnuTLS. The curl command-line tool usually links against the OpenSSL version by default, but you can use the GnuTLS version instead.

Let us check the Curl version using command in Debian 12:

$ curl -V 

Sample Output:

curl 8.8.0 (x86_64-pc-linux-gnu) libcurl/8.8.0 <strong><mark>OpenSSL/3.0.13</mark></strong> zlib/1.2.13 brotli/1.0.9 zstd/1.5.4  libidn2/2.3.3 libpsl/0.21.2 libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3 OpenLDAP/2.5.13  Release-Date: 2024-05-22, security patched: 8.8.0-1~bpo12 1  Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3  pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp  Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz  NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

How To Install Curl With GnuTLS Backend In Debian

As you see in the above above output, my Debian 12 system has latest Curl 8.8.0 with OpenSSL backend.

Now let us see how to compile Curl from source with GnuTLS using GNU Stow. For those wondering, GNU Stow is one of the recommended way to install latest software from source in Debian and other Linux distributions.

1. Prerequisites

Ensure you have the necessary tools and dependencies installed:

sudo apt update
sudo apt install build-essential libgnutls28-dev stow

2. Download Latest Curl Tarfile and Extract It

Download the latest Curl from the Curl GitHub Repository:

wget https://github.com/curl/curl/releases/download/curl-8_8_0/curl-8.8.0.tar.gz

Extract the curl source code:

tar -xzvf curl-8.8.0.tar.gz

This command will extract the contents of the tar file in a directory named curl-8.8.0. Cd into the directory:

cd curl-8.8.0

3. Configure the Build with Prefix

Configure the build to use GnuTLS backend using command:

./configure --with-gnutls --prefix=/usr/local/stow/curl-8.8.0

If the /usr/loca/stow directory doesn't exist, just create it using command:

sudo mkdir -p /usr/local/stow

Again, rerun the ./configure command.

4. Compile and Install Curl using Stow

Run the following command to compile and install Curl using GNU Stow

make
sudo make install

Cd into the /usr/loca/stow directory and create the necessary symlinks:

cd /usr/local/stow
sudo stow curl-8.8.0

6. Verify Curl Installation

Restart your current session and verify that curl is using GnuTLS:

curl --version

You should see GnuTLS as the new TLS backend.

curl 8.8.0 (x86_64-pc-linux-gnu) libcurl/8.8.0 <strong><mark>GnuTLS/3.7.9</mark></strong> zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3  Release-Date: 2024-05-22  Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp smb smbs smt  p smtps telnet tftp  Features: alt-svc AsynchDNS brotli HSTS HTTPS-proxy IDN IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSo  ckets zstd

How To Install Curl With GnuTLS Backend In Debian

As you see in the above output, Curl is configured with GnuTLS v3.7.9.

Troubleshooting

If you encountered with "Unmet Dependencies" issue while trying to install curl on your Debian 12 system or the flatpak update command doesn't work after upgrading Curl from backports, refer to the following links:

  • Fix "Unmet Dependencies" Error When Installing Curl In Debian 12
  • Flatpak Update Fails After Upgrading Curl To 8.10 In Debian

Conclusion

In this Step-by-Step tutorial, we discussed the list of available TLS backends and howto install Curl with GnuTLS backend from source using GNU Stow in Debian and its derivatives.

If you're not aware already, Debian's Curl is about to get HTTP3 support. For more details, refer the following link:

  • Debian Curl Now Supports HTTP3: What You Need To Know

Related Read:

  • Wcurl: A User-Friendly Curl Wrapper For Easy File Downloads

The above is the detailed content of How To Install Curl With GnuTLS Backend In Debian. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Does the internet run on Linux?Does the internet run on Linux?Apr 14, 2025 am 12:03 AM

The Internet does not rely on a single operating system, but Linux plays an important role in it. Linux is widely used in servers and network devices and is popular for its stability, security and scalability.

What are Linux operations?What are Linux operations?Apr 13, 2025 am 12:20 AM

The core of the Linux operating system is its command line interface, which can perform various operations through the command line. 1. File and directory operations use ls, cd, mkdir, rm and other commands to manage files and directories. 2. User and permission management ensures system security and resource allocation through useradd, passwd, chmod and other commands. 3. Process management uses ps, kill and other commands to monitor and control system processes. 4. Network operations include ping, ifconfig, ssh and other commands to configure and manage network connections. 5. System monitoring and maintenance use commands such as top, df, du to understand the system's operating status and resource usage.

Boost Productivity with Custom Command Shortcuts Using Linux AliasesBoost Productivity with Custom Command Shortcuts Using Linux AliasesApr 12, 2025 am 11:43 AM

Introduction Linux is a powerful operating system favored by developers, system administrators, and power users due to its flexibility and efficiency. However, frequently using long and complex commands can be tedious and er

What is Linux actually good for?What is Linux actually good for?Apr 12, 2025 am 12:20 AM

Linux is suitable for servers, development environments, and embedded systems. 1. As a server operating system, Linux is stable and efficient, and is often used to deploy high-concurrency applications. 2. As a development environment, Linux provides efficient command line tools and package management systems to improve development efficiency. 3. In embedded systems, Linux is lightweight and customizable, suitable for environments with limited resources.

Essential Tools and Frameworks for Mastering Ethical Hacking on LinuxEssential Tools and Frameworks for Mastering Ethical Hacking on LinuxApr 11, 2025 am 09:11 AM

Introduction: Securing the Digital Frontier with Linux-Based Ethical Hacking In our increasingly interconnected world, cybersecurity is paramount. Ethical hacking and penetration testing are vital for proactively identifying and mitigating vulnerabi

How to learn Linux basics?How to learn Linux basics?Apr 10, 2025 am 09:32 AM

The methods for basic Linux learning from scratch include: 1. Understand the file system and command line interface, 2. Master basic commands such as ls, cd, mkdir, 3. Learn file operations, such as creating and editing files, 4. Explore advanced usage such as pipelines and grep commands, 5. Master debugging skills and performance optimization, 6. Continuously improve skills through practice and exploration.

What is the most use of Linux?What is the most use of Linux?Apr 09, 2025 am 12:02 AM

Linux is widely used in servers, embedded systems and desktop environments. 1) In the server field, Linux has become an ideal choice for hosting websites, databases and applications due to its stability and security. 2) In embedded systems, Linux is popular for its high customization and efficiency. 3) In the desktop environment, Linux provides a variety of desktop environments to meet the needs of different users.

What are the disadvantages of Linux?What are the disadvantages of Linux?Apr 08, 2025 am 12:01 AM

The disadvantages of Linux include user experience, software compatibility, hardware support, and learning curve. 1. The user experience is not as friendly as Windows or macOS, and it relies on the command line interface. 2. The software compatibility is not as good as other systems and lacks native versions of many commercial software. 3. Hardware support is not as comprehensive as Windows, and drivers may be compiled manually. 4. The learning curve is steep, and mastering command line operations requires time and patience.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.