Vincent Hanquez
d8d049726d
move Handshake into its own module
2012-04-27 07:28:17 +01:00
Vincent Hanquez
f93312b50f
separate lowlevel IO operation in its own module.
2012-04-27 07:21:29 +01:00
Vincent Hanquez
8c5640114e
rename connection* accessor to context*.
2012-03-31 23:15:23 +01:00
Vincent Hanquez
9da6b9c8c8
expand tabs.
2012-03-27 08:57:51 +01:00
Vincent Hanquez
3b4baf2f91
move encoding and decoding of NPN packet from Wire to Packet
2012-03-16 08:06:55 +00:00
Vincent Hanquez
e9a97bedb1
Merge branch 'npn' into next
...
Conflicts:
Network/TLS/Core.hs
2012-03-15 08:59:04 +00:00
Vincent Hanquez
750cbdce75
remove client, server, clientWith, serverWith in favor of just
...
contextNew and contextNewOnHandle
2012-03-15 08:16:48 +00:00
Vincent Hanquez
1d30a9479d
rename newCtx into contextNewOnHandle
...
newCtxWith is now contextNew
2012-03-15 07:55:38 +00:00
Vincent Hanquez
f889defc57
more rename
2012-03-15 07:53:03 +00:00
Vincent Hanquez
da3a3e7e4b
Remove TLS prefix in a few types.
...
Add compatibility types aliases definitions to the new names.
2012-03-14 08:56:28 +00:00
Vincent Hanquez
4b28c5735f
Create a backend abstraction that facilitate moving arguments around.
2012-03-12 08:48:03 +00:00
Vincent Hanquez
7e8f0d0cf9
use record pattern match syntax.
2012-03-12 07:11:21 +00:00
Joey Adams
3d0071d952
Fix spelling of negotiate/negotiation in documentation
2012-03-10 16:04:44 -05:00
Joey Adams
cbfe10e9f6
Add links to the 'BufferMode' type in 'client' and 'server'
2012-03-10 15:51:46 -05:00
Lennart Kolmodin
2ed8c777b6
Add client side of Next Protocol Negotiation.
2012-02-16 12:13:13 +04:00
Vincent Hanquez
2a781dbc44
Merge remote-tracking branch 'kolmodin/npn' into npn
2012-02-14 03:54:09 +08:00
Vincent Hanquez
81464e7f1b
Merge branch 'master' into npn
2012-02-14 03:52:35 +08:00
Lennart Kolmodin
1bd53d9790
Spell 'negotiation' as in the spec.
2012-02-13 22:54:04 +04:00
Lennart Kolmodin
c6d50d5fb8
Simplify server handshake state machine.
2012-02-13 12:11:12 +04:00
Lennart Kolmodin
ab2a28ada6
Use callback instead of static state for supported NPN protocols.
...
onSuggestNextProtocols in TLSParams.
Expose getNegotiatedProtocol to users.
Fix condition for when to understand NPN messages.
2012-02-12 22:59:19 +04:00
Vincent Hanquez
5c4a0d345b
rename more Bytes to B.ByteString.
2012-02-11 10:50:41 +00:00
Vincent Hanquez
e0610c7f66
use ByteString instead of Bytes which is not exported.
2012-02-11 08:49:49 +00:00
Lennart Kolmodin
e3e7e3c02a
Partial, but working, implementation of serverside NPN.
2012-02-08 13:20:28 +04:00
Vincent Hanquez
c17aa30599
prepare source for NPN.
2012-02-07 21:24:30 +00:00
Vincent Hanquez
08ddc1523c
make recvData use strict bytestring as this more natural to the tls code.
...
also add a recvData' to get the same behavior as before.
2012-02-07 20:45:22 +00:00
Vincent Hanquez
db362230ec
more documentation
2012-02-07 06:26:26 +00:00
Vincent Hanquez
4f450935f5
reorganize sendData slightly
2012-01-25 16:03:31 +00:00
Vincent Hanquez
80998d0bb5
track in the context if the tls pipe is established or not.
...
raise exception ConnectionNotEstablished in sendData and recvData if
trying to use an invalid Context.
2012-01-25 16:01:55 +00:00
Vincent Hanquez
3e7a6c5c17
export the content of HandshakeFailed
2012-01-19 05:31:31 +00:00
Vincent Hanquez
c846d9a360
Switch handshake to exception instead of returning a bool.
...
Bool return value doesn't provide any information on why the handshake failed,
hence remove the Bool value, and return (), and in case of handshake failure,
raise a HandshakeFailed exception with the TLSError associated with it.
2012-01-18 06:29:29 +00:00
Vincent Hanquez
aad62f89a7
catch exception during certificate callback and returns a certificate rejection on exception.
2012-01-16 12:36:45 +00:00
Vincent Hanquez
89ad99004b
properly call/switch things in server when trying to resume session.
2011-12-20 07:51:12 +00:00
Vincent Hanquez
98427b4fae
switch client to process Server hello explicitely.
...
also switch everything properly when receiving a server hello with session.
2011-12-20 07:51:07 +00:00
Vincent Hanquez
8ff0d85a0e
send session if the user says so (through sessionResumeWith) in client.
...
and properly switch to session resuming packet flow if resuming.
2011-12-20 07:43:43 +00:00
Vincent Hanquez
13b3873b82
add an helper to create a new session.
2011-12-20 07:42:13 +00:00
Vincent Hanquez
be3ab515de
rename processServerHello to onServerHello.
2011-12-20 07:41:53 +00:00
Vincent Hanquez
b3b7051129
callback to user when a session has been successfully established.
...
it's up to the user to store the session id + session data for later recovery.
2011-12-20 07:39:24 +00:00
Vincent Hanquez
34b186b852
differentiate set master secret from a premaster secret or an already existing master secret
2011-12-20 07:30:19 +00:00
Vincent Hanquez
5601170a1f
clean up handshake states after handshake is done.
2011-12-12 08:43:52 +00:00
Vincent Hanquez
ccb94cea50
Merge branch 'master' into session
2011-12-06 00:23:18 +00:00
Vincent Hanquez
86335f18ce
split context structure and accessor out of Core.
2011-12-06 00:15:00 +00:00
Vincent Hanquez
a269d84256
fix client side encoding of client key exchange on RSA.
2011-12-06 00:12:00 +00:00
Vincent Hanquez
4ef7b0098f
Merge branch 'master' into session
...
Conflicts:
Network/TLS/Core.hs
2011-12-01 22:33:53 +00:00
Vincent Hanquez
9ec505a59a
Merge branch 'hsm'
...
Conflicts:
Network/TLS/Core.hs
2011-12-01 08:55:44 +00:00
Vincent Hanquez
adf45a537d
handle digest update after processing the packet
2011-12-01 08:42:43 +00:00
Vincent Hanquez
e1fea031af
consider clientkeyxchg as an opaque structure in internal layers, and make/process the content in higher layer.
2011-12-01 08:41:01 +00:00
Vincent Hanquez
eba62f6f74
append actual raised exception in the error.
2011-12-01 08:36:56 +00:00
Vincent Hanquez
3bdad41e21
consume ServerKeyExchange if it show up.
2011-12-01 08:34:41 +00:00
Vincent Hanquez
d6a198dad5
split recvRecord out of recvPacket.
2011-11-30 22:01:31 +00:00
Vincent Hanquez
2a685b2601
remove the state machine is favor of a straightforward pattern matching state machine.
...
simplify code massively and make it easy to support other packet flow later.
2011-11-29 08:59:41 +00:00