{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15749","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15749/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15749/comments","events_url":"https://api.github.com/repos/golang/go/issues/15749/events","html_url":"https://github.com/golang/go/issues/15749","id":155762637,"number":15749,"title":"crypto/x509: CentOS 7 \"x509: failed to load system roots and no roots provided\" issues.","user":{"login":"mckn","id":172951,"avatar_url":"https://avatars.githubusercontent.com/u/172951?v=3","gravatar_id":"","url":"https://api.github.com/users/mckn","html_url":"https://github.com/mckn","followers_url":"https://api.github.com/users/mckn/followers","following_url":"https://api.github.com/users/mckn/following{/other_user}","gists_url":"https://api.github.com/users/mckn/gists{/gist_id}","starred_url":"https://api.github.com/users/mckn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckn/subscriptions","organizations_url":"https://api.github.com/users/mckn/orgs","repos_url":"https://api.github.com/users/mckn/repos","events_url":"https://api.github.com/users/mckn/events{/privacy}","received_events_url":"https://api.github.com/users/mckn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/38","html_url":"https://github.com/golang/go/milestones/Go1.8","labels_url":"https://api.github.com/repos/golang/go/milestones/38/labels","id":1709363,"number":38,"title":"Go1.8","description":"","creator":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"open_issues":254,"closed_issues":14,"state":"open","created_at":"2016-04-15T16:30:23Z","updated_at":"2016-05-31T15:28:02Z","due_on":"2017-02-01T08:00:00Z","closed_at":null},"comments":2,"created_at":"2016-05-19T15:15:32Z","updated_at":"2016-05-31T20:34:16Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\n1.6.2\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nI am running go 1.6.2 from the official docker container with CentOS7 as the hosting os.\r\n\r\n3. What did you do?\r\nI was using the http.Client and I did a request to a https:// endpoint. \r\n\r\n4. What did you expect to see?\r\nI was expecting to get a 200OK request. If I did the same request with curl or wget it worked like a charm so it wasnt any problems with the certs on the OS.\r\n\r\n5. What did you see instead?\r\nWhen I was doing the request I got the following error: \"x509: failed to load system roots and no roots provided\"\r\n\r\n**Solution:**\r\nSo since other tools worked with https on the host I knew that it was not any problems with the certificates. I checked where the ca bundle was located on the host system and compared it with the following file:\r\n\r\nhttps://github.com/golang/go/blob/master/src/crypto/x509/root_linux.go\r\n\r\nOn CentOS 7 the certificate bundle is located at the following path:\r\n`/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem`\r\n\r\nThen there are a link to that file on the following path:\r\n`/etc/ssl/ca-bundle.crt` \r\n\r\nNote that it is `.crt`instead of `.pem`as in the `root_linux.go`file.\r\n\r\nSo I tried to run my container to link the `/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem` to `/etc/ssl/ca-bundle.pem` and everything works. It was a work around to get my application to work but I would prefer it if we can add the `/etc/ssl/ca-bundle.crt` to the paths in root_linux.go.\r\n\r\nHope this is possible! Thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/222811568","html_url":"https://github.com/golang/go/issues/15749#issuecomment-222811568","issue_url":"https://api.github.com/repos/golang/go/issues/15749","id":222811568,"user":{"login":"driusan","id":498329,"avatar_url":"https://avatars.githubusercontent.com/u/498329?v=3","gravatar_id":"","url":"https://api.github.com/users/driusan","html_url":"https://github.com/driusan","followers_url":"https://api.github.com/users/driusan/followers","following_url":"https://api.github.com/users/driusan/following{/other_user}","gists_url":"https://api.github.com/users/driusan/gists{/gist_id}","starred_url":"https://api.github.com/users/driusan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driusan/subscriptions","organizations_url":"https://api.github.com/users/driusan/orgs","repos_url":"https://api.github.com/users/driusan/repos","events_url":"https://api.github.com/users/driusan/events{/privacy}","received_events_url":"https://api.github.com/users/driusan/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T20:34:16Z","updated_at":"2016-05-31T20:34:16Z","body":"I'm having a very similar problem under darwin/amd64 under both 1.6.2 and tip. I get an error \"x509: certificate signed by unknown authority\" for a certificate which is valid and works under chrome, safari, and curl. I've verified that the root authority being used by chrome is in the system keychain.\r\n\r\nIt seems like at a higher level than the _linux.go file it's somehow not parsing all the valid root authorities on the system."}}
{"actor":{"display_login":"driusan"}}