mirror of https://github.com/moparisthebest/curl
removed trailing whitespace, indented to curl-style levels
This commit is contained in:
parent
498a0fe795
commit
cb88135220
|
@ -89,19 +89,25 @@ int main(int argc, char **argv)
|
||||||
/* cert is stored PEM coded in file... */
|
/* cert is stored PEM coded in file... */
|
||||||
/* since PEM is default, we needn't set it for PEM */
|
/* since PEM is default, we needn't set it for PEM */
|
||||||
curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"PEM");
|
curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"PEM");
|
||||||
|
|
||||||
/* set the cert for client authentication */
|
/* set the cert for client authentication */
|
||||||
curl_easy_setopt(curl,CURLOPT_SSLCERT,pCertFile);
|
curl_easy_setopt(curl,CURLOPT_SSLCERT,pCertFile);
|
||||||
|
|
||||||
/* sorry, for engine we must set the passphrase
|
/* sorry, for engine we must set the passphrase
|
||||||
(if the key has one...) */
|
(if the key has one...) */
|
||||||
if (pPassphrase)
|
if (pPassphrase)
|
||||||
curl_easy_setopt(curl,CURLOPT_SSLKEYPASSWD,pPassphrase);
|
curl_easy_setopt(curl,CURLOPT_SSLKEYPASSWD,pPassphrase);
|
||||||
|
|
||||||
/* if we use a key stored in a crypto engine,
|
/* if we use a key stored in a crypto engine,
|
||||||
we must set the key type to "ENG" */
|
we must set the key type to "ENG" */
|
||||||
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 */
|
/* set the file with the certs vaildating the server */
|
||||||
curl_easy_setopt(curl,CURLOPT_CAINFO,pCACertFile);
|
curl_easy_setopt(curl,CURLOPT_CAINFO,pCACertFile);
|
||||||
|
|
||||||
/* disconnect if we can't validate server's cert */
|
/* disconnect if we can't validate server's cert */
|
||||||
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1);
|
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue