Lines Matching defs:rc

66     int rc = RTHttpCertDigest(hHttp, pszBuf, cbBuf,
68 if (RT_SUCCESS(rc))
73 rc = VERR_INTERNAL_ERROR;
81 rc = VERR_INTERNAL_ERROR;
86 rc = VERR_INTERNAL_ERROR;
94 rc = VERR_INTERNAL_ERROR;
98 if (RT_SUCCESS(rc))
99 rc = RTStrmWrite(CAFile, pszBuf, cbBuf);
100 if (RT_SUCCESS(rc))
101 rc = RTStrmWrite(CAFile, RTFILE_LINEFEED, strlen(RTFILE_LINEFEED));
103 return rc;
130 int rc = RTHttpCertDigest(hHttp, pszBuf, cbBuf,
132 if (RT_SUCCESS(rc))
137 rc = VERR_INTERNAL_ERROR;
145 rc = VERR_INTERNAL_ERROR;
150 rc = VERR_INTERNAL_ERROR;
158 rc = VERR_INTERNAL_ERROR;
162 if (RT_SUCCESS(rc))
163 rc = RTStrmWrite(CAFile, pszBuf, cbBuf);
164 if (RT_SUCCESS(rc))
165 rc = RTStrmWrite(CAFile, RTFILE_LINEFEED, strlen(RTFILE_LINEFEED));
168 return rc;
174 static void checkError(RTHTTP hHttp, int rc, const char *pszFile)
176 if (rc == VERR_HTTP_REDIRECTED)
187 RTPrintf("Error %Rrc trying to fetch '%s'\n", rc, pszFile);
217 int rc = RTHttpCreate(&hHttp);
222 if (RT_SUCCESS(rc))
223 rc = RTStrmOpen(CAFILE_NAME, "w+b", &CAFile);
225 if (RT_SUCCESS(rc))
235 if (RT_SUCCESS(rc))
236 rc = RTHttpGetText(hHttp,
239 if (RT_SUCCESS(rc) && pszBuf)
240 rc = extractPCA3G5(hHttp, CAFile, (uint8_t*)pszBuf, strlen(pszBuf));
242 checkError(hHttp, rc, "PCA-3G5.pem");
252 if (RT_SUCCESS(rc))
253 rc = RTHttpGetText(hHttp,
256 if (RT_SUCCESS(rc) && pszBuf)
257 rc = extractPCA3(hHttp, CAFile, (uint8_t*)pszBuf, strlen(pszBuf));
259 checkError(hHttp, rc, "PCA-3.pem");
265 RTPrintf("Old way: rc=%Rrc\n", rc);
272 rc = RTHttpGetBinary(hHttp,
275 if (RT_SUCCESS(rc) && pu8Buf)
279 rc = RTZipPkzipMemDecompress(&pvDecomp, &cbDecomp, pu8Buf, cb,
281 if (RT_SUCCESS(rc))
283 rc = extractPCA3G5(hHttp, CAFile, (uint8_t*)pvDecomp, cbDecomp);
285 rc = RTZipPkzipMemDecompress(&pvDecomp, &cbDecomp, pu8Buf, cb,
287 if (RT_SUCCESS(rc))
289 rc = extractPCA3(hHttp, CAFile, (uint8_t*)pvDecomp, cbDecomp);
295 checkError(hHttp, rc, "roots.zip");
296 RTPrintf("New way: rc=%Rrc\n", rc);
311 if (RT_SUCCESS(rc))
312 rc = RTHttpSetCAFile(hHttp, CAFILE_NAME);
317 if (RT_SUCCESS(rc))
318 rc = RTHttpGetText(hHttp,
322 if ( RT_FAILURE(rc)
323 && rc != VERR_HTTP_COULDNT_CONNECT)
326 if (RT_FAILURE(rc))
327 RTPrintf("Error code: %Rrc\n", rc);