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
00c386de3c
add a role params in the params structure.
...
distinguish between server and client related business.
2012-03-15 08:04:16 +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
f5d1553428
remove last two warnings
2012-03-12 08:47:43 +00:00
Vincent Hanquez
d7f05b77eb
remove uneeded imports and 2 useless symbols
2012-03-12 08:33:26 +00:00
Vincent Hanquez
44eb0db409
remove unused imports
2012-03-12 08:29:04 +00:00
Vincent Hanquez
7e8f0d0cf9
use record pattern match syntax.
2012-03-12 07:11:21 +00:00
Vincent Hanquez
05821fa71b
pre bump version to 1.0.0 for development branch
2012-03-11 13:07:55 +00:00
Vincent Hanquez
e6d88c362a
bump version to 0.9.1
2012-03-11 12:13:30 +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
Joey Adams
c1ce196278
Use modifyMVar in usingState for exception safety
...
Also, force the state value, to avoid potential space leaks.
2012-03-10 14:55:04 -05:00
Joey Adams
23e91ae6f4
Fix space leak caused by updateMeasure
...
modifyIORef does not force the value, so if the Measurement object is updated a
bunch of times but never examined, the program will leak memory.
2012-03-10 11:41:01 -05: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
Vincent Hanquez
e895f667d7
require new certificate version
2012-02-07 21:19:51 +00:00
Vincent Hanquez
8a335b1b53
fix tests
2012-02-07 20:48:52 +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
8f706d8a56
only import necessary bits from X509.
2012-02-07 20:39:46 +00:00
Vincent Hanquez
64202c2748
refined wire helper function to support TLS opaque types directly.
...
opaque type are length prefix bytestring and are used everywhere.
the helper simplify their marshalling/unmarshalling and make it less
error prone and semantically better.
2012-02-07 07:48:11 +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
d387959195
documentation correction
2012-01-25 09:32:53 +00:00
Vincent Hanquez
87d1afc1a4
bump version for next version.
2012-01-19 05:44:28 +00:00
Vincent Hanquez
3e7a6c5c17
export the content of HandshakeFailed
2012-01-19 05:31:31 +00:00
Vincent Hanquez
5fc65bb0bb
expose HandshakeFailed exception
2012-01-18 06:41:32 +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
3b271b0c03
tweak warnings flag for tests and remove useless orphan instances and missing signatures.
2012-01-18 04:38:01 +00:00
Vincent Hanquez
49505a3f8d
bump version to 0.8.5
2012-01-16 13:31:50 +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
52497d4dd5
bump version to 0.8.4
2011-12-20 07:51:12 +00:00
Vincent Hanquez
1e6edaaab5
add a test for session resumption.
2011-12-20 07:51:12 +00:00
Vincent Hanquez
de9d75bbaf
add the direction of logging in tests.
2011-12-20 07:51:12 +00:00
Vincent Hanquez
201cd7fd6e
add some helpers for testing session resuming.
2011-12-20 07:51:12 +00:00
Vincent Hanquez
f3e5603bc8
trivial code movement for decryptRSA
2011-12-20 07:51:12 +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
6f02bb8548
generate key block when setting the master secret.
2011-12-20 07:41:15 +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
53a7b48c15
add new state for session tracking.
2011-12-20 07:38:35 +00:00
Vincent Hanquez
7d0e1f77a4
add extra stuff in gitignore.
2011-12-20 07:35:40 +00:00
Vincent Hanquez
83b860726d
add parameters for session resuming
...
mostly callbacks during the handshake, and a parameter to enable session usage.
2011-12-20 07:34:52 +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