Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in server #118

Open
ekr opened this issue Jan 24, 2017 · 1 comment
Open

Panic in server #118

ekr opened this issue Jan 24, 2017 · 1 comment

Comments

@ekr
Copy link
Collaborator

ekr commented Jan 24, 2017

Got this connecting with Firefox..

2017/01/24 12:58:51 Listening on port 4430
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x1171e4]

goroutine 1 [running]:
panic(0x3e4260, 0xc82000a0f0)
/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/bifurcation/mint.(*ServerHandshake).HandleClientHello(0xc820436000, 0xc820427520, 0x661174, 0x2, 0x2, 0x6612a0, 0x4, 0x4, 0x6613f8, 0x6, ...)
/Users/ekr/dev/go/src/github.com/bifurcation/mint/handshake.go:849 +0x2634
github.com/bifurcation/mint.(*Conn).serverHandshake(0xc82040b950, 0x0, 0x0)
/Users/ekr/dev/go/src/github.com/bifurcation/mint/conn.go:671 +0x53c
github.com/bifurcation/mint.(*Conn).Handshake(0xc82040b950, 0x0, 0x0)
/Users/ekr/dev/go/src/github.com/bifurcation/mint/conn.go:469 +0x321
github.com/bifurcation/mint.(*Listener).Accept(0xc820427440, 0x7a9a60, 0xc820028050, 0x0, 0x0)
/Users/ekr/dev/go/src/github.com/bifurcation/mint/tls.go:42 +0xbf
net/http.(*Server).Serve(0xc820413480, 0x7a9a00, 0xc820427440, 0x0, 0x0)
/usr/local/Cellar/go/1.6/libexec/src/net/http/server.go:2117 +0x129
main.main()
/Users/ekr/dev/go/src/github.com/bifurcation/mint/bin/mint-server-https/main.go:123 +0x1006
exit status 2

@alexwebr
Copy link

alexwebr commented Mar 1, 2017

At least for me, this is happening because cert is nil when doing len(cert.Chain):

    certificate := &CertificateBody{
      CertificateList: make([]CertificateEntry, len(cert.Chain)),
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants