{"action":"opened","issue":{"url":"https://api.github.com/repos/cloudflare/cfssl/issues/560","repository_url":"https://api.github.com/repos/cloudflare/cfssl","labels_url":"https://api.github.com/repos/cloudflare/cfssl/issues/560/labels{/name}","comments_url":"https://api.github.com/repos/cloudflare/cfssl/issues/560/comments","events_url":"https://api.github.com/repos/cloudflare/cfssl/issues/560/events","html_url":"https://github.com/cloudflare/cfssl/issues/560","id":142627313,"number":560,"title":"CheckSignatureFrom: invalid memory address or nil pointer dereference","user":{"login":"matiaskorhonen","id":43314,"avatar_url":"https://avatars.githubusercontent.com/u/43314?v=3","gravatar_id":"","url":"https://api.github.com/users/matiaskorhonen","html_url":"https://github.com/matiaskorhonen","followers_url":"https://api.github.com/users/matiaskorhonen/followers","following_url":"https://api.github.com/users/matiaskorhonen/following{/other_user}","gists_url":"https://api.github.com/users/matiaskorhonen/gists{/gist_id}","starred_url":"https://api.github.com/users/matiaskorhonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiaskorhonen/subscriptions","organizations_url":"https://api.github.com/users/matiaskorhonen/orgs","repos_url":"https://api.github.com/users/matiaskorhonen/repos","events_url":"https://api.github.com/users/matiaskorhonen/events{/privacy}","received_events_url":"https://api.github.com/users/matiaskorhonen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-22T11:50:24Z","updated_at":"2016-03-22T11:50:24Z","closed_at":null,"body":"Some some certificates the revocation check panics, for example:\r\n\r\n```go\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal 0xb code=0x1 addr=0xb0 pc=0x245a31]\r\n\r\ngoroutine 1 [running]:\r\npanic(0x33d920, 0xc82000a140)\r\n\t/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6\r\ngithub.com/cloudflare/cfssl/vendor/golang.org/x/crypto/ocsp.(*Response).CheckSignatureFrom(0x0, 0xc8203d6d80, 0x0, 0x0)\r\n\t$GOPATH/src/github.com/cloudflare/cfssl/vendor/golang.org/x/crypto/ocsp/ocsp.go:356 +0x31\r\ngithub.com/cloudflare/cfssl/revoke.certIsRevokedOCSP(0xc820088d80, 0xc820010f00, 0x0)\r\n\t$GOPATH/src/github.com/cloudflare/cfssl/revoke/revoke.go:243 +0x273\r\ngithub.com/cloudflare/cfssl/revoke.revCheck(0xc820088d80, 0x338ae71d)\r\n\t$GOPATH/src/github.com/cloudflare/cfssl/revoke/revoke.go:81 +0x48e\r\ngithub.com/cloudflare/cfssl/revoke.VerifyCertificate(0xc820088d80, 0xc02f00010303)\r\n\t$GOPATH/src/github.com/cloudflare/cfssl/revoke/revoke.go:188 +0x34f\r\nmain.main()\r\n\t$GOPATH/src/gitlab.com/[REDACTED]/[REDACTED]/main.go:34 +0x3ed\r\nexit status 2\r\n```\r\n\r\nThis is the code I used to get that panic:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"crypto/tls\"\r\n\t\"fmt\"\r\n\t\"log\"\r\n\t\"net\"\r\n\t\"time\"\r\n\r\n\t\"github.com/cloudflare/cfssl/revoke\"\r\n)\r\n\r\nfunc main() {\r\n\thostname := \"workspaces.akselworks.com\"\r\n\tport := 443\r\n\r\n\taddr := fmt.Sprintf(\"%s:%d\", hostname, port)\r\n\r\n\tdialer := net.Dialer{\r\n\t\tTimeout: time.Minute,\r\n\t}\r\n\r\n\ttlsConfig := tls.Config{\r\n\t\tInsecureSkipVerify: false,\r\n\t}\r\n\r\n\tconn, err := tls.DialWithDialer(&dialer, \"tcp\", addr, &tlsConfig)\r\n\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\r\n\tfor _, cert := range conn.ConnectionState().PeerCertificates {\r\n\t\trevoked, ok := revoke.VerifyCertificate(cert)\r\n\t\tlog.Println(revoked, ok)\r\n\t}\r\n}\r\n```\r\n\r\nThis is with Go 1.6 on OS X 10.11.4."}}