GNURLOPT_USE_SSL(3)
π GNURLOPT_USE_SSL(3) π
okay bestie, welcome to the curl_easy_setopt options manual β this page is GNURLOPT_USE_SSL(3), and it's all about making libcurl use your fave level of SSL/TLS on a transfer. slay. β¨
πΈ NAME πΈ
CURLOPT_USE_SSL β request using SSL / TLS for the transfer. that's the whole name, no cap. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USE_SSL, long level);
π DESCRIPTION π
Pass a long using one of the values from below, to make libcurl use your desired level of SSL for the transfer. literally pick your level, bestie. π
These are all protocols that start out plain text and get "upgraded" to SSL using the STARTTLS command. that's the whole plot. π
This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc. iykyk. π¦
CURLUSESSL_NONEβ Don't attempt to use SSL. πCURLUSESSL_TRYβ Try using SSL, proceed as normal otherwise. β¨CURLUSESSL_CONTROLβ Require SSL for the control connection or fail withCURLE_USE_SSL_FAILED. πCURLUSESSL_ALLβ Require SSL for all communication or fail withCURLE_USE_SSL_FAILED. π₯
π DEFAULT π
The default is CURLUSESSL_NONE. so if you don't say anything, it's not attempting SSL. π
π¦ PROTOCOLS π¦
the protocol squad is FTP, SMTP, POP3, IMAP. periodt. π«Ά
π EXAMPLE π
okay so here's the exact example, bestie β code is code:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/file.ext");
/* require use of SSL for this, or fail */
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
/* Perform the request */
curl_easy_perform(curl);
}
π AVAILABILITY π
Added in 7.11.0. This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants were known as CURLFTPSSL_*. history lesson, slay. π
β RETURN VALUE β
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. that's the vibe check, fr fr. π
π SEE ALSO π
go peek at these icons:
okay bye bestie β this page came from libcurl 7.37.0, dated 19 Jun 2014, and it's GNURLOPT_USE_SSL(3) signing off. mwah ππ«Ά
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms