Changeset 45398 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Apr 8, 2013 9:32:00 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/http.cpp
r45381 r45398 35 35 #include <iprt/string.h> 36 36 #include <iprt/file.h> 37 #include <iprt/stream.h> 37 38 38 39 #include <curl/curl.h> … … 90 91 CURLcode rcCurl = curl_global_init(CURL_GLOBAL_ALL); 91 92 if (CURL_FAILED(rcCurl)) 92 return VERR_ INTERNAL_ERROR;93 return VERR_HTTP_INIT_FAILED; 93 94 94 95 CURL *pCurl = curl_easy_init(); 95 96 if (!pCurl) 96 return VERR_ INTERNAL_ERROR;97 return VERR_HTTP_INIT_FAILED; 97 98 98 99 PRTHTTPINTERNAL pHttpInt = (PRTHTTPINTERNAL)RTMemAllocZ(sizeof(RTHTTPINTERNAL)); … … 237 238 } 238 239 else 239 rc = VERR_ INTERNAL_ERROR;240 rc = VERR_HTTP_CACERT_WRONG_FORMAT; 240 241 } 241 242 else … … 243 244 } 244 245 else 245 rc = VERR_ INTERNAL_ERROR;246 rc = VERR_HTTP_CACERT_WRONG_FORMAT; 246 247 X509_free(crt); 247 248 } 248 249 else 249 rc = VERR_ INTERNAL_ERROR;250 rc = VERR_HTTP_CACERT_WRONG_FORMAT; 250 251 BIO_free(cert); 251 252 } … … 334 335 else 335 336 { 337 RTPrintf("rcCurl = %d\n", rcCurl); 336 338 switch (rcCurl) 337 339 { … … 343 345 rc = VERR_HTTP_COULDNT_CONNECT; 344 346 break; 347 case CURLE_SSL_CONNECT_ERROR: 348 rc = VERR_HTTP_SSL_CONNECT_ERROR; 349 break; 350 case CURLE_SSL_CACERT: 351 /* The peer certificate cannot be authenticated with the CA certificates 352 * set by RTHttpSetCAFile(). We need other or additional CA certificates. */ 353 rc = VERR_HTTP_CACERT_CANNOT_AUTHENTICATE; 354 break; 355 case CURLE_SSL_CACERT_BADFILE: 356 /* CAcert file (see RTHttpSetCAFile()) has wrong format */ 357 rc = VERR_HTTP_CACERT_WRONG_FORMAT; 358 break; 345 359 default: 346 360 break;
Note:
See TracChangeset
for help on using the changeset viewer.