{"action":"opened","issue":{"url":"https://api.github.com/repos/nfephp-org/nfephp/issues/825","repository_url":"https://api.github.com/repos/nfephp-org/nfephp","labels_url":"https://api.github.com/repos/nfephp-org/nfephp/issues/825/labels{/name}","comments_url":"https://api.github.com/repos/nfephp-org/nfephp/issues/825/comments","events_url":"https://api.github.com/repos/nfephp-org/nfephp/issues/825/events","html_url":"https://github.com/nfephp-org/nfephp/issues/825","id":159264668,"number":825,"title":"Problema de SSL ao transmitir para sefaz de SC","user":{"login":"jeanCarloMachado","id":2252355,"avatar_url":"https://avatars.githubusercontent.com/u/2252355?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanCarloMachado","html_url":"https://github.com/jeanCarloMachado","followers_url":"https://api.github.com/users/jeanCarloMachado/followers","following_url":"https://api.github.com/users/jeanCarloMachado/following{/other_user}","gists_url":"https://api.github.com/users/jeanCarloMachado/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanCarloMachado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanCarloMachado/subscriptions","organizations_url":"https://api.github.com/users/jeanCarloMachado/orgs","repos_url":"https://api.github.com/users/jeanCarloMachado/repos","events_url":"https://api.github.com/users/jeanCarloMachado/events{/privacy}","received_events_url":"https://api.github.com/users/jeanCarloMachado/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-08T20:35:51Z","updated_at":"2016-06-08T20:35:51Z","closed_at":null,"body":"Segue o erro \r\n\r\n```\r\nPHPUnit 5.2.12 by Sebastian Bergmann and contributors.\r\n\r\n*   Trying 200.233.4.140...\r\n* Connected to nfe-homologacao.svrs.rs.gov.br (200.233.4.140) port 443 (#0)\r\n* ALPN, offering http/1.1\r\n* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH\r\n* successfully set certificate verify locations:\r\n*   CAfile: /etc/ssl/certs/ca-certificates.crt\r\n  CApath: none\r\n* SSL connection using TLSv1.0 / AES128-SHA\r\n* ALPN, server did not agree to a protocol\r\n* Server certificate:\r\n*  subject: C=BR; O=ICP-Brasil; OU=Secretaria da Receita Federal do Brasil - RFB; OU=ARSERPRO; OU=RFB e-Servidor A1; CN=*.svrs.rs.gov.br\r\n*  start date: Nov  3 12:39:42 2015 GMT\r\n*  expire date: Nov  2 12:39:42 2016 GMT\r\n*  subjectAltName does not match nfe-homologacao.svrs.rs.gov.br\r\n* SSL: no alternative certificate subject name matches target host name 'nfe-homologacao.svrs.rs.gov.br'\r\n* Closing connection 0\r\nE                                                                   1 / 1 (100%)\r\n\r\nTime: 810 ms, Memory: 18.00Mb\r\n\r\nThere was 1 error:\r\n\r\n1) FiscalTest\\Service\\NFE\\TransmitterTest::testTransmit\r\nNFePHP\\Common\\Exception\\RuntimeException: Não houve retorno do Curl.\r\n SSL: no alternative certificate subject name matches target host name 'nfe-homologacao.svrs.rs.gov.br'\r\n\r\n/home/jean/projects/compufacil/Backend/vendor/nfephp-org/nfephp/libs/Common/Soap/CurlSoap.php:180\r\n/home/jean/projects/compufacil/Backend/vendor/nfephp-org/nfephp/libs/NFe/ToolsNFe.php:698\r\n/home/jean/projects/compufacil/Backend/module/Fiscal/src/Fiscal/Service/NFE/Transmitter.php:31\r\n/home/jean/projects/compufacil/Backend/module/Fiscal/tests/src/FiscalTest/Service/NFE/TransmitterTest.php:40\r\n/home/jean/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:162\r\n/home/jean/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:113\r\n\r\nERRORS!\r\nTests: 1, Assertions: 0, Errors: 1.\r\ncgexec -g memory:development phpunit -c /home/jean/projects/compufacil/Backend/phpunit.xml.dist --filter testTransmit /home/jean/projects/compufacil/Backend/module/Fiscal/tests/src/FiscalTest/Service/NFE/TransmitterTest.php\r\n\r\n```\r\n\r\nConsigo contornar o problema se eu trocar as linhas 290 e 291 do arquivo `vendor/nfephp-org/nfephp/libs/Common/Soap/CurlSoap.php`\r\n\r\n\r\nde:\r\n```\r\n        curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, 2);\r\n        curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, 0);\r\n```\r\n\r\npor:\r\n\r\n```\r\n        curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, false);\r\n        curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, false);\r\n```\r\n\r\nMas acho que trocar essa configuração poderia causar problemas para outros usuários, certo?\r\nPosso tornar isso uma configuração setada no arquivo de config, só preciso do \"aval\" de vocês se esse é o jeito correto de proceder ou se estou esquecendo algo.\r\n\r\n\r\n"}}
{"actor":{"display_login":"jeanCarloMachado"}}