summaryrefslogtreecommitdiff
path: root/docs/examples/usercertinmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/usercertinmem.c')
-rw-r--r--docs/examples/usercertinmem.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c
index 40505b0c0..2dc264310 100644
--- a/docs/examples/usercertinmem.c
+++ b/docs/examples/usercertinmem.c
@@ -177,25 +177,25 @@ int main(void)
CURL *ch;
CURLcode rv;
- rv = curl_global_init(CURL_GLOBAL_ALL);
+ curl_global_init(CURL_GLOBAL_ALL);
ch = curl_easy_init();
- rv = curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L);
- rv = curl_easy_setopt(ch, CURLOPT_HEADER, 0L);
- rv = curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L);
- rv = curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
- rv = curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction);
- rv = curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout);
- rv = curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction);
- rv = curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr);
- rv = curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
+ curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L);
+ curl_easy_setopt(ch, CURLOPT_HEADER, 0L);
+ curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L);
+ curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
+ curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction);
+ curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout);
+ curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction);
+ curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr);
+ curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
/* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is
no CA certificate*/
- rv = curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 0L);
- rv = curl_easy_setopt(ch, CURLOPT_SSL_VERIFYHOST, 0L);
- rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
- rv = curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
+ curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(ch, CURLOPT_SSL_VERIFYHOST, 0L);
+ curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
+ curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
/* first try: retrieve page without user certificate and key -> will fail
*/
@@ -211,7 +211,7 @@ int main(void)
* load the certificate and key by installing a function doing the necessary
* "modifications" to the SSL CONTEXT just before link init
*/
- rv = curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+ curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
rv = curl_easy_perform(ch);
if(rv == CURLE_OK) {
printf("*** transfer succeeded ***\n");