Commit graph

97 commits

Author SHA1 Message Date
Vincent Hanquez
f464927a0b add a structure to parametrize decoding encoding related to version, key exchange type, ... 2011-05-12 09:13:53 +01:00
Vincent Hanquez
4b5812529b derive Show and Eq from CipherKeyExchangeType 2011-05-12 09:13:53 +01:00
Vincent Hanquez
1e294bbbff rename cipherkeyexchange types 2011-05-12 09:13:49 +01:00
Vincent Hanquez
c111389b30 capitalize DH 2011-05-11 07:34:15 +01:00
Vincent Hanquez
969a62b79a bump certificate version to 0.8.1 2011-05-09 09:15:36 +01:00
Vincent Hanquez
7f6f511839 Add a way to show packet sent and received at the protocol level. very useful for debugging. 2011-05-04 08:41:16 +01:00
Vincent Hanquez
69d3604a64 do not call new variable state. it's already defined by the state module. 2011-04-24 13:43:57 +01:00
Vincent Hanquez
ad226f7fb9 usless import in wire module 2011-04-24 13:43:27 +01:00
Vincent Hanquez
4a84e9415f comment fixup 2011-04-24 13:43:18 +01:00
Vincent Hanquez
d983d4ebc8 remove now useless extension 2011-04-24 13:43:08 +01:00
Vincent Hanquez
7cce3fca0c use functor's <$> instead of a return construct 2011-04-24 13:39:52 +01:00
Vincent Hanquez
a1524bf673 refactor processclientkeyxchg 2011-04-24 11:34:11 +01:00
Vincent Hanquez
9f3714dd1c simplify parsing of packets
- use fail instead of throwerror, since cereal do not raise but return an either.
- remove the get monad definition
- add some helper
- remove dependency on binary and use cereal exclusively.
2011-04-24 09:44:18 +01:00
Vincent Hanquez
b472d891c4 set the error instance of TLSError with the definition of TLSError. prevent orphan instance 2011-04-24 09:32:49 +01:00
Vincent Hanquez
a7aaa3eee7 Remove the hardcoded srandomgen in favor of any cryptorandomgen instance.
srandomgen is available separately in the cprng-aes package as Crypto.Random.AESCtr
2011-04-11 19:56:43 +01:00
Vincent Hanquez
55b7490102 a packet can contain multiple appdata, process it as such. 2011-03-23 21:48:58 +00:00
Vincent Hanquez
74633cd68f add internal module as backdoor for hidden function/definition.
also export core sendPacket/recvPacket
2011-03-19 21:45:43 +00:00
Vincent Hanquez
476b0a8f82 remove commented description of ciphers 2011-03-19 21:42:59 +00:00
Vincent Hanquez
a4b4d54821 move default ciphers to tls-extra 2011-03-19 09:22:12 +00:00
Vincent Hanquez
da6e72ba7e correct comment 2011-03-19 08:37:47 +00:00
Vincent Hanquez
5ab032b3c9 add more haddock related stuff 2011-03-02 08:43:05 +00:00
Vincent Hanquez
14f635cf3e Fix documentation and cleanup remaining bits 2011-03-02 07:56:37 +00:00
Vincent Hanquez
a8d1e05179 fold remaining bit of client/server in core. cleanup 2011-03-02 07:41:59 +00:00
Vincent Hanquez
7237bec83e fold handshake stuff from server to core. 2011-03-02 07:35:25 +00:00
Vincent Hanquez
fc598287ad remove fromJust 2011-03-01 23:18:09 +00:00
Vincent Hanquez
73979e9db4 move initiate into handshake in core. 2011-03-01 23:09:17 +00:00
Vincent Hanquez
9083c53453 style change and use modify instead of get/put 2011-03-01 20:01:40 +00:00
Vincent Hanquez
c1a20efe74 move sendData to core 2011-03-01 20:01:40 +00:00
Vincent Hanquez
43a2ae9dae remove language extensions not needed anymore 2011-03-01 20:01:40 +00:00
Vincent Hanquez
353783abdf put server/client in core 2011-03-01 20:01:40 +00:00
Vincent Hanquez
f4cc8999db move 'close' api to core and rename to 'bye' to avoid a meaning conflict with unix close. 2011-03-01 20:01:40 +00:00
Vincent Hanquez
f260c5b9cf modify client API to be like the server API. 2011-03-01 20:01:40 +00:00
Vincent Hanquez
5481816e0e remove old import 2011-03-01 20:01:40 +00:00
Vincent Hanquez
5e8d2fa776 move server to the new split API and have the server function in a monadIO monad.
the state mvar is for now mostly useless, although completly harmeless; it will
be useful to be able to use the ctx in a threaded context.
2011-03-01 20:01:40 +00:00
Vincent Hanquez
c997045372 remove old code 2011-03-01 20:01:40 +00:00
Vincent Hanquez
6a0578ad0c simplify state manipulation
separate the pure state manipulation from the monad doing the IO.
add some duplicate helpers to use the new monad.
2011-03-01 20:01:40 +00:00
Vincent Hanquez
9586b05395 unify clientparams and serverparams 2011-03-01 20:01:40 +00:00
Vincent Hanquez
fc420e13f8 add nullCompression and an instance of show for compression data. 2011-03-01 20:01:40 +00:00
Vincent Hanquez
d592c7aad7 update for latest certificate 0.7 2011-02-20 17:43:10 +00:00
Vincent Hanquez
c6154ae126 fix a bug with SSL3 during the creation of crypt state.
The test for partition was too strict, and the SSL3 generator
is quite likely to generate more data whereas the TLS generator
generate the correct amount every time.

now bigger bytestring than necessary are now valid as well.
2011-02-20 08:49:23 +00:00
Vincent Hanquez
693891ad0c add a dedicated fromJust
compared to the normal fromJust, it take an extra string to report
what kind of fromJust we were doing. it's quite valuable when
shuffling code and assertion break.

at some point, it need to be removed completely in favor of better types
that better reflect the actual state on the connection.
2011-02-20 08:37:19 +00:00
Vincent Hanquez
22ea02ffe4 move to certificate >= 0.6 2011-02-20 08:35:14 +00:00
Vincent Hanquez
a3ea15886f use AES in cryptocipher 0.2.5 2011-02-20 08:13:53 +00:00
Vincent Hanquez
af02dd0839 add stricter partition(3|6) utils that doesn't use wire (and thus no binary) 2011-01-05 09:24:58 +00:00
Vincent Hanquez
857a4a06b8 add some assertion checking 2011-01-05 09:24:58 +00:00
Vincent Hanquez
a78162e298 add support for ciphers without encryption. 2011-01-05 09:24:58 +00:00
Vincent Hanquez
54640db618 add cipher 0x1 and 0x2 (no encryption with RSA) 2011-01-05 09:24:46 +00:00
Vincent Hanquez
e5e331fdf1 move to certificate 0.5 2011-01-02 09:49:21 +00:00
Vincent Hanquez
4b3cd2c2f7 export key/iv 2010-12-07 09:15:22 +00:00
Vincent Hanquez
701643a863 remove old comment 2010-12-06 22:54:56 +00:00