schmite
Forum Replies Created
-
Estou com o mesmo problema de:
SSL certificate problem: unable to get local issuer certificate
Já atualizei o openssl:
# openssl version OpenSSL 1.0.2e 3 Dec 2015
E o curl:
# curl --version curl 7.38.0 (x86_64-unknown-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp Features: IDN Largefile NTLM NTLM_WB SSL libz
Mesmo assim o erro persiste:
[http_request_failed] => Array ( [0] => SSL certificate problem: unable to get local issuer certificate )
Fiz o seguinte trecho de código para efeito de teste:
<?php $ch = curl_init(); $options = array( CURLOPT_URL => 'https://qasecommerce.cielo.com.br/servicos/ecommwsec.do', CURLOPT_POST => 1, CURLOPT_VERBOSE => 1, CURLOPT_POSTFIELDS => $postvals, CURLOPT_RETURNTRANSFER => 1, CURLOPT_CAINFO => './wp-content/plugins/cielo-woocommerce/includes/certificates/VeriSignClass3PublicPrimaryCertificationAuthority-G5.crt', CURLOPT_SSLVERSION => 4 ); curl_setopt_array($ch, $options); $response = curl_exec($ch); echo curl_error($ch); ?>
Execu??o:
# php teste.php * Hostname was NOT found in DNS cache * Trying 201.18.41.183... * Connected to qasecommerce.cielo.com.br (201.18.41.183) port 443 (#0) * successfully set certificate verify locations: * CAfile: ./wp-content/plugins/cielo-woocommerce/includes/certificates/VeriSignClass3PublicPrimaryCertificationAuthority-G5.crt CApath: none * SSL certificate problem: unable to get local issuer certificate * Closing connection 0
Eu defini o CURLOPT_CAINFO pois é a configura??o que é a mesma setada através ‘sslcertificates’. Se eu n?o setar, ele pega o padr?o do S.O. e consegue validar com sucesso:
# php teste.php * Hostname was NOT found in DNS cache * Trying 201.18.41.183... * Connected to qasecommerce.cielo.com.br (201.18.41.183) port 443 (#0) * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLSv1.0 / AES256-SHA * Server certificate: * subject: C=BR; ST=Sao Paulo; L=Barueri; O=CIELO S.A.; OU=SI Cielo SS; CN=qasecommerce.cielo.com.br * start date: 2015-07-16 00:00:00 GMT * expire date: 2016-07-15 23:59:59 GMT * subjectAltName: qasecommerce.cielo.com.br matched * issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa (c)10; CN=VeriSign Class 3 Secure Server CA - G3 * SSL certificate verify ok. > POST /servicos/ecommwsec.do HTTP/1.1 Host: qasecommerce.cielo.com.br Accept: */* Content-Length: 0 Content-Type: application/x-www-form-urlencoded < HTTP/1.1 200 OK < Date: Tue, 05 Jan 2016 21:17:27 GMT * Server Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8x is not blacklisted < Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8x < Content-Length: 158 < Set-Cookie: JSESSIONID=dxrwWMyGHYyp1fT38tB66csJ2Hw6h2XRjmxPHqYSjM9h2DWYLyPj!1346054325; path=/ < X-Powered-By: Servlet/2.5 JSP/2.1 < Content-Type: text/xml; charset=ISO-8859-1 < * Connection #0 to host qasecommerce.cielo.com.br left intact
O CA do meu servidor está atualizado. O certificado da CA raíz usado pela Cielo é já está no /etc/pki/tls/certs/ca-bundle.crt.
Inclusive, no próprio WordPress (a partir da vers?o 3.7 se n?o me engano) já inclui e atualiza com as atualiza??es do WP os certificados raízes (/wp-includes/certificates/ca-bundle.crt)
Se eu usar esses certificados funciona perfeitamente.Estou meio perdido, o que posso fazer?
Forum: Plugins
In reply to: [Proxy Cache Purge] Debug using varnishlogThank you for commands. Have been useful even in other situations.
It was not working because I forgot to put:define ('VHP_VARNISH_IP', 'xxxx');
inside the wp-config.phpForum: Reviews
In reply to: [Proxy Cache Purge] Works great!For me and my colleagues, it would be more obvious if there was a button Varnish HTTP Purge under Settings (similar to WP Super Cache or other plugins) inside that panel the button for Purge Varnish Cache. Also, put a input field to change the IP of the Varnish server inside this panel.