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. Supported formats  are  "PEM"
16       and  "DER",  except  with Secure Transport. OpenSSL (versions 0.9.3 and
17       later) and Secure Transport (on iOS 5 or later, or OS X 10.7 or  later)
18       also support "P12" for PKCS#12-encoded files.
19
20       The  application  does not have to keep the string around after setting
21       this option.
22

DEFAULT

24       "PEM"
25

PROTOCOLS

27       All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
28

EXAMPLE

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

AVAILABILITY

42       If built TLS enabled. Added in 7.9.3
43

RETURN VALUE

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

SEE ALSO

49       CURLOPT_SSLCERT(3), CURLOPT_SSLKEY(3),
50
51
52
53libcurl 7.82.0                 November 26, 2021        CURLOPT_SSLCERTTYPE(3)
Impressum