aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-13 11:32:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-13 11:32:36 +0000
commite4866563dedda10047c51747232c2d85fa346be2 (patch)
tree8c50446c0549dbc02dae4e17c3eeea750fbc7390 /docs/examples
parent47f45aa229fcc3e33555095245835c0375e57c35 (diff)
Götz Babin-Ebell updated with some new 7.9.3 features
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/simplessl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c
index 534fac849..285d0cd37 100644
--- a/docs/examples/simplessl.c
+++ b/docs/examples/simplessl.c
@@ -37,6 +37,7 @@ int main(int argc, char **argv)
FILE *headerfile;
const char *pCertFile = "testcert.pem";
+ const char *pCACertFile="cacert.pem"
const char *pKeyName;
const char *pKeyType;
@@ -96,6 +97,10 @@ int main(int argc, char **argv)
curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,pKeyType);
/* set the private key (file or ID in engine) */
curl_easy_setopt(curl,CURLOPT_SSLKEY,pKeyName);
+ /* set the file with the certs vaildating the server */
+ curl_easy_setopt(curl,CURLOPT_CAINFO,pCACertFile);
+ /* disconnect if we can't validate server's cert */
+ curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1);
res = curl_easy_perform(curl);
break; /* we are done... */