File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1261,6 +1261,26 @@ std::string KeyAuth::api::req(std::string data, std::string url) {
1261
1261
1262
1262
debugInfo (data, url, to_return);
1263
1263
1264
+ struct curl_certinfo * ci;
1265
+ code = curl_easy_getinfo (curl, CURLINFO_CERTINFO, &ci);
1266
+
1267
+ if (!code) {
1268
+ bool issuer_found = false ;
1269
+
1270
+ for (int i = 0 ; i < ci->num_of_certs ; i++) {
1271
+ struct curl_slist * slist;
1272
+
1273
+ for (slist = ci->certinfo [i]; slist; slist = slist->next ) {
1274
+ if (std::strstr (slist->data , XorStr (" Google Trust Services" ).c_str ()) != NULL || std::strstr (slist->data , XorStr (" Let's Encrypt" ).c_str ()) != NULL ) {
1275
+ issuer_found = true ;
1276
+ }
1277
+ }
1278
+ }
1279
+
1280
+ if (!issuer_found)
1281
+ error (XorStr (" SSL certificate couldn't be verified" ));
1282
+ }
1283
+
1264
1284
return to_return;
1265
1285
}
1266
1286
void error (std::string message) {
You can’t perform that action at this time.
0 commit comments