1CURLOPT_SSLCERTTYPE(3) curl_easy_setopt options CURLOPT_SSLCERTTYPE(3)
2
3
4
6 CURLOPT_SSLCERTTYPE - specify type of the client SSL certificate
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERTTYPE, char
12 *type);
13
15 Pass a pointer to a zero terminated string as parameter. The string
16 should be the format of your certificate. Supported formats are "PEM"
17 and "DER", except with Secure Transport. OpenSSL (versions 0.9.3 and
18 later) and Secure Transport (on iOS 5 or later, or OS X 10.7 or later)
19 also support "P12" for PKCS#12-encoded files.
20
21 The application does not have to keep the string around after setting
22 this option.
23
25 "PEM"
26
28 All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
29
31 CURL *curl = curl_easy_init();
32 if(curl) {
33 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
34 curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
35 curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM");
36 curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
37 curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
38 ret = curl_easy_perform(curl);
39 curl_easy_cleanup(curl);
40 }
41
43 If built TLS enabled. Added in 7.9.3
44
46 Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
47 CURLE_OUT_OF_MEMORY if there was insufficient heap space.
48
50 CURLOPT_SSLCERT(3), CURLOPT_SSLKEY(3),
51
52
53
54libcurl 7.66.0 May 31, 2017 CURLOPT_SSLCERTTYPE(3)