Table of Contents
What is a TLS backend?
1. AmiSSL
2. BearSSL
3. GnuTLS
4. Mbed TLS
5. OpenSSL
6. Rustls
7. Schannel
8. Secure Transport
9. wolfSSL
Choosing the Right TLS Backend
Example Usage
Install Curl from Source with GnuTLS using GNU Stow
1. Prerequisites
2. Download Latest Curl Tarfile and Extract It
3. Configure the Build with Prefix
4. Compile and Install Curl using Stow
5. Use stow to create the symlinks
6. Verify Curl Installation
Troubleshooting
Conclusion
Home System Tutorial LINUX How To Install Curl With GnuTLS Backend In Debian

How To Install Curl With GnuTLS Backend In Debian

Mar 16, 2025 am 10:40 AM

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
Copy after login

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 
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

Extract the curl source code:

tar -xzvf curl-8.8.0.tar.gz
Copy after login

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
Copy after login

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
Copy after login

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

sudo mkdir -p /usr/local/stow
Copy after login

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
Copy after login

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

cd /usr/local/stow
sudo stow curl-8.8.0
Copy after login

6. Verify Curl Installation

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

curl --version
Copy after login

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
Copy after login

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 of this Website
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

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 ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Mastering Text Manipulation With the Sed Command Mastering Text Manipulation With the Sed Command Mar 16, 2025 am 09:48 AM

The Linux command line interface provides a wealth of text processing tools, one of the most powerful tools is the sed command. sed is the abbreviation of Stream EDitor, a multi-functional tool that allows complex processing of text files and streams. What is Sed? sed is a non-interactive text editor that operates on pipeline inputs or text files. By providing directives, you can let it modify and process text in a file or stream. The most common use cases of sed include selecting text, replacing text, modifying original files, adding lines to text, or removing lines from text. It can be used from the command line in Bash and other command line shells. Sed command syntax sed

How To Count Files And Directories In Linux: A Beginner's Guide How To Count Files And Directories In Linux: A Beginner's Guide Mar 19, 2025 am 10:48 AM

Efficiently Counting Files and Folders in Linux: A Comprehensive Guide Knowing how to quickly count files and directories in Linux is crucial for system administrators and anyone managing large datasets. This guide demonstrates using simple command-l

How To Add A User To Multiple Groups In Linux How To Add A User To Multiple Groups In Linux Mar 18, 2025 am 11:44 AM

Efficiently managing user accounts and group memberships is crucial for Linux/Unix system administration. This ensures proper resource and data access control. This tutorial details how to add a user to multiple groups in Linux and Unix systems. We

How To List Or Check All Installed Linux Kernels From Commandline How To List Or Check All Installed Linux Kernels From Commandline Mar 23, 2025 am 10:43 AM

Linux Kernel is the core component of a GNU/Linux operating system. Developed by Linus Torvalds in 1991, it is a free, open-source, monolithic, modular, and multitasking Unix-like kernel. In Linux, it is possible to install multiple kernels on a sing

How To Type Indian Rupee Symbol In Ubuntu Linux How To Type Indian Rupee Symbol In Ubuntu Linux Mar 22, 2025 am 10:39 AM

This brief guide explains how to type Indian Rupee symbol in Linux operating systems. The other day, I wanted to type "Indian Rupee Symbol (₹)" in a word document. My keyboard has a rupee symbol on it, but I don't know how to type it. After

Linux Kernel 6.14 RC6 Released Linux Kernel 6.14 RC6 Released Mar 24, 2025 am 10:21 AM

Linus Torvalds has released Linux Kernel 6.14 Release Candidate 6 (RC6), reporting no significant issues and keeping the release on track. The most notable change in this update addresses an AMD microcode signing issue, while the rest of the updates

The 8 Best SSH Clients for Linux The 8 Best SSH Clients for Linux Mar 15, 2025 am 11:06 AM

Recommended 8 best SSH clients for Linux system SSH (Secure Shell Protocol) is an encrypted network protocol used to securely run network services on an unsecure network. It is an important part of modern server management and provides secure remote access to the system. SSH clients (applications that utilize the SSH protocol) are an indispensable tool for system administrators, developers and IT professionals. Remote server management is common in the Linux world, and choosing the right SSH client is crucial. This article will discuss 8 best SSH clients for Linux. Selection criteria When choosing the best SSH client for Linux, the following factors must be considered: Performance: Speed ​​and efficiency of SSH clients

LocalSend - The Open-Source Airdrop Alternative For Secure File Sharing LocalSend - The Open-Source Airdrop Alternative For Secure File Sharing Mar 24, 2025 am 09:20 AM

If you're familiar with AirDrop, you know it's a popular feature developed by Apple Inc. that enables seamless file transfer between supported Macintosh computers and iOS devices using Wi-Fi and Bluetooth. However, if you're using Linux and missing o

See all articles