vincenthz/hs-tls — pull request #5 by kolmodin (2012-02-08 16:19:42+00:00)
Title: Patch for NPN

Initial patch for NPN. Serverside works, not implemented for client side.

Things to improve;
- in Core.hs, recvClientData does two runRecvState instead of just one. Not sure if I'm lucky that Chrome sends two groups of Handshakes, or if it must be fixed. Probably best to fix.
- magic numbers here and there for extension.
- CurrentParams has field cParamsSupportNPN which we set to true if the client asked for NPN, but here we don't know if the server accepted the extension.
- client implementation. possibly a "onNPN :: [Bytes] -> IO Bytes" handler in TLSParams to select the next protocol.