问题
Anyone please tell me how we get the CA pem file content which send through PHP CURL CURLOPT_CAINFO or through postman, in server side using PHP
Please check below code
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_CAINFO, "/etc/certs/cabundle.pem");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
In above code cabundle.pem contains certificate content. I need to fetch that content in end point ie.https://example.com/ server using PHP code.
Is that possible?
来源:https://stackoverflow.com/questions/60758515/how-to-get-ca-pem-file-content-using-php-in-server-side