Edson
Новичок
CURL SSL проблема подключения
Код скрипта
Лог подключения
* About to connect() to www.promptparts.com port 443
* Trying 213.42.17.43... * connected
* Connected to www.promptparts.com (213.42.17.43) port 443
* successfully set certificate verify locations:
* CAfile: /var/www/samurai/data/www/*/cron/autoquery/gcc_cer/cert.crt
CApath: none
* SSL connection using RC4-MD5
* Server certificate:
* subject: /C=AE/L=Dubai/ST=Dubai/O=Al Anqaa Trading/OU=Al Anqaa Trading/CN=www.promptparts.com
* start date: 2008-01-06 09:23:16 GMT
* expire date: 2010-01-06 09:23:16 GMT
* common name: www.promptparts.com (matched)
* issuer: /C=AE/O=Etisalat/OU=Etisalat eBusiness Services/CN=Comtrust Server Certification Authority
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Host: www.promptparts.com
Accept: */*
< HTTP/1.1 403 Access Forbidden
< Server: Microsoft-IIS/5.0
< Date: Tue, 15 Dec 2009 09:00:42 GMT
< Connection: close
< Content-Length: 4280
< Content-Type: text/html
* Closing connection #0
Скрипт проработал 3 месяца и в какой-то момент перестал подключаться. Срок сертификата еще не истек. Что означает ошибка "SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway."? Может какие-то опции нужно активировать?
Код скрипта
PHP:
curl_setopt($ch, CURLOPT_URL, $site_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path.'cook_ty.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path.'cook_ty.txt');
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_CAINFO, $absolute_path.'cron/autoquery/gcc_cer/cert.crt');
curl_setopt($ch, CURLOPT_SSLCERT, $absolute_path.'cron/autoquery/gcc_cer/cert.pem');
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, '*');
* About to connect() to www.promptparts.com port 443
* Trying 213.42.17.43... * connected
* Connected to www.promptparts.com (213.42.17.43) port 443
* successfully set certificate verify locations:
* CAfile: /var/www/samurai/data/www/*/cron/autoquery/gcc_cer/cert.crt
CApath: none
* SSL connection using RC4-MD5
* Server certificate:
* subject: /C=AE/L=Dubai/ST=Dubai/O=Al Anqaa Trading/OU=Al Anqaa Trading/CN=www.promptparts.com
* start date: 2008-01-06 09:23:16 GMT
* expire date: 2010-01-06 09:23:16 GMT
* common name: www.promptparts.com (matched)
* issuer: /C=AE/O=Etisalat/OU=Etisalat eBusiness Services/CN=Comtrust Server Certification Authority
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Host: www.promptparts.com
Accept: */*
< HTTP/1.1 403 Access Forbidden
< Server: Microsoft-IIS/5.0
< Date: Tue, 15 Dec 2009 09:00:42 GMT
< Connection: close
< Content-Length: 4280
< Content-Type: text/html
* Closing connection #0
Скрипт проработал 3 месяца и в какой-то момент перестал подключаться. Срок сертификата еще не истек. Что означает ошибка "SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway."? Может какие-то опции нужно активировать?