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
b3416be594
Merge pull request #4 from DougBurke/master
...
Report unsupported platform message to stderr rather than stdout
2012-02-26 12:59:33 -08:00
Doug Burke
42fd1dc562
Added cabal-dev to .gitignore
2012-02-22 16:20:45 -05:00
Doug Burke
a9126610a7
Minor doc and code clean up
2012-02-22 16:18:04 -05:00
Doug Burke
e7ba558d30
certificateVerifyChain now writes error message to stderr for unsupported systems
2012-02-22 16:09:13 -05:00
Vincent Hanquez
dbd294c522
Merge branch 'npn', remote-tracking branch 'kolmodin/npn' into npn
2012-02-20 04:54:36 +08: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
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
7845e60ba8
Compare FQDN name also with the SubjectAltName X509 extension if there's one.
2012-02-07 21:22:06 +00:00
Vincent Hanquez
e8a4c2a640
require certificate 1.1
2012-02-07 21:21:55 +00:00
Vincent Hanquez
e895f667d7
require new certificate version
2012-02-07 21:19:51 +00:00
Vincent Hanquez
fb0f2e8f39
fix for latest version of tls. recvData is now strict.
2012-02-07 21:18:01 +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
b3671bdb38
bump version ahead of release
2012-01-21 07:06:12 +00:00
Vincent Hanquez
dcd8d82eae
Fix certificates that are received not in the dependency order.
...
Some server give certificates not necessarily in the order we expect it to be,
so reorder them correctly before verifying them to each other.
2012-01-21 07:02:58 +00:00
Vincent Hanquez
e2297626e5
improve the example program a bit so that we can use any host/port.
2012-01-19 07:07:00 +00:00
Vincent Hanquez
681992eeb5
bump version requirements
2012-01-19 06:05:05 +00:00
Vincent Hanquez
87d1afc1a4
bump version for next version.
2012-01-19 05:44:28 +00:00
Vincent Hanquez
e026e281bd
use new handshake in tests
2012-01-19 05:35:51 +00:00
Vincent Hanquez
ec0e6bc987
use catch from control.exception
2012-01-19 05:35:10 +00:00
Vincent Hanquez
370994a302
use the new handshake that doesn't returns anything.
2012-01-19 05:35:05 +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
5765e27bb1
bump version to 0.4.2
2011-12-20 08:00:52 +00:00
Vincent Hanquez
5a54c39714
bump depedencies on tls to 0.8.4 to get session code working.
2011-12-20 07:59:17 +00:00
Vincent Hanquez
2e2278226d
add simple client as an executable in cabal file.
2011-12-20 07:58:36 +00:00
Vincent Hanquez
779220b4f1
add some session related code in stunnel.
2011-12-20 07:58:12 +00:00