1CURLOPT_SSLCERTTYPE(3)     curl_easy_setopt options     CURLOPT_SSLCERTTYPE(3)
2
3
4

NAME

6       CURLOPT_SSLCERTTYPE - type of client SSL certificate
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERTTYPE, char *type);
12

DESCRIPTION

14       Pass  a  pointer  to  a null-terminated string as parameter. The string
15       should be the format of your certificate.
16
17       Supported formats are "PEM" and "DER", except with Secure Transport  or
18       Schannel.  OpenSSL (versions 0.9.3 and later), Secure Transport (on iOS
19       5 or later, or OS X 10.7 or  later)  and  Schannel  support  "P12"  for
20       PKCS#12-encoded files.
21
22       The  application  does not have to keep the string around after setting
23       this option.
24

DEFAULT

26       "PEM"
27

PROTOCOLS

29       All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
30

EXAMPLE

32       CURL *curl = curl_easy_init();
33       if(curl) {
34         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
35         curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
36         curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM");
37         curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
38         curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
39         ret = curl_easy_perform(curl);
40         curl_easy_cleanup(curl);
41       }
42

AVAILABILITY

44       If built TLS enabled. Added in 7.9.3
45

RETURN VALUE

47       Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if  not,  or
48       CURLE_OUT_OF_MEMORY if there was insufficient heap space.
49

SEE ALSO

51       CURLOPT_SSLCERT(3), CURLOPT_SSLKEY(3),
52
53
54
55libcurl 8.0.1                  January 02, 2023         CURLOPT_SSLCERTTYPE(3)
Impressum