Commit graph

37 commits

Author SHA1 Message Date
Vincent Hanquez
4179ceba82 start using Client and Server distinction for want client cert and session resume with 2012-07-12 09:02:10 +01:00
Vincent Hanquez
c8d9f0677b switch session related callback to a new SessionManager class.
add necessary helper setSessionManager to not have to propagate
Rank2Types and ExistentialQuantification to the user.
2012-07-12 08:59:59 +01:00
Vincent Hanquez
55763d646b expand tabs in Tests 2012-03-28 08:06:13 +01:00
Vincent Hanquez
e9a97bedb1 Merge branch 'npn' into next
Conflicts:
	Network/TLS/Core.hs
2012-03-15 08:59:04 +00:00
Lennart Kolmodin
5db6dac5c8 Add roundtrip test for Next Protocol Negotiation.
Adds a test where both client/server knows we're going to use NPN, and make
sure that they agree on a protocol.
2012-02-16 12:13:13 +04:00
Vincent Hanquez
8a335b1b53 fix tests 2012-02-07 20:48:52 +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
1e6edaaab5 add a test for session resumption. 2011-12-20 07:51:12 +00:00
Vincent Hanquez
fdbe011616 add more connection tests. renegociation. 2011-12-11 20:43:53 +00:00
Vincent Hanquez
8cc094e3f4 cleanup various errors from Tests.hs 2011-12-01 08:52:01 +00:00
Vincent Hanquez
1c52e0e984 code movement in Tests. 2011-12-01 08:47:34 +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
69e16aa056 refactor exn handling function. 2011-11-16 21:14:32 +00:00
Vincent Hanquez
147f1edfbf be polite and say bye to server. 2011-11-14 22:18:30 +00:00
Vincent Hanquez
88b8da59f0 rename handle to context 2011-11-14 22:16:52 +00:00
Vincent Hanquez
50a1186ab8 add some basic handshake testing in tls directly. 2011-11-14 22:12:09 +00:00
Vincent Hanquez
c3da1074dc unnecessary symbol 2011-11-12 16:09:39 +00:00
Vincent Hanquez
f9bc797977 re-introduce certificate marshalling tests now that we can generate keys. 2011-11-11 22:53:17 +00:00
Vincent Hanquez
8ec95dc7aa move to applicative style 2011-10-23 18:00:45 +01:00
Vincent Hanquez
5d7ba39fe3 remove useless symbols 2011-10-23 17:57:21 +01:00
Vincent Hanquez
7c081d9fee upgrade test suite to test-framework 2011-10-23 17:54:07 +01:00
Vincent Hanquez
5ecff01d94 fix tests 2011-06-12 21:38:51 +01:00
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
893bb92cbf fix tests 2011-05-12 08:16:38 +01:00
Vincent Hanquez
56d9de4b1d bump certificate to 0.9.0
side effect: comment quickcheck code linked to certificate
2011-05-11 08:12:30 +01:00
Vincent Hanquez
4b5ee43a92 remove commented tests that were moved to tls-extra 2011-04-11 19:47:51 +01:00
Vincent Hanquez
346b550b7c move most tests to tls-extra, only keep the marshalling test. 2011-03-19 09:19:35 +00:00
Vincent Hanquez
18cf6a5392 test ciphers in a basic fashion for now. 2010-12-07 09:15:34 +00:00
Vincent Hanquez
07da6e5b06 Add monadic IO test that establish connection from a client and server.
The test establish a TLS connection on a socketpair, and then
check that by injecting arbitrary data in the client we receive
the exact same thing on the server side.

The test need more sophistication in general, as to arbitrarily test
TLS versions, different ciphers & key exchange, certificates, etc.
2010-11-30 08:31:09 +00:00
Vincent Hanquez
bc638906f2 move the marshal test into a specific file. 2010-11-30 08:26:22 +00:00
Vincent Hanquez
c9f4cbbd70 create a common test file 2010-11-30 08:21:10 +00:00
Vincent Hanquez
f4841baa80 add support for quickcheck 2.3 2010-11-03 23:04:03 +00:00
Vincent Hanquez
5a6ff3abe8 take in account that we can receive multiple handshakes in the same tls fragment. 2010-10-02 10:58:41 +01:00
Vincent Hanquez
8f91009884 use strict bytestring instead of lazy bytestring.
the API stays mostly similar except for clientkeyxchg that need a bytes instead of [word8].
remove lots of unnessary packing/unpacking when setting up ciphers.
2010-09-26 10:34:47 +01:00
Vincent Hanquez
d3a6b4ff97 add some more tests 2010-09-13 21:11:20 +01:00
Vincent Hanquez
c1b21f6a24 move tests to quickcheck2 2010-09-10 23:33:09 +01:00
Vincent Hanquez
0b5a0dc548 initial import 2010-09-09 22:47:19 +01:00