Commit e4866563 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Gtz Babin-Ebell updated with some new 7.9.3 features

parent 47f45aa2
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,7 @@ int main(int argc, char **argv)
  FILE *headerfile;
  FILE *headerfile;


  const char *pCertFile = "testcert.pem";
  const char *pCertFile = "testcert.pem";
  const char *pCACertFile="cacert.pem"


  const char *pKeyName;
  const char *pKeyName;
  const char *pKeyType;
  const char *pKeyType;
@@ -96,6 +97,10 @@ int main(int argc, char **argv)
       curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,pKeyType);
       curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,pKeyType);
                                /* set the private key (file or ID in engine) */
                                /* set the private key (file or ID in engine) */
       curl_easy_setopt(curl,CURLOPT_SSLKEY,pKeyName);
       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);
       res = curl_easy_perform(curl);
       break;                   /* we are done... */
       break;                   /* we are done... */