Commit graph

31 commits

Author SHA1 Message Date
Stephen Paul Weber
5cdfc843ac
Bump to 0.3.1 2024-09-04 17:51:42 -05:00
Stephen Paul Weber
d1da25f3a0
These are ssize_t not size_t
The return negative for error cases and with newer GHCs lying causes a problem.
2024-09-04 17:50:43 -05:00
Stephen Paul Weber
f3c719ae44
Update metadata for 0.3 2024-01-22 11:31:38 -05:00
Stephen Paul Weber
858bf6fe98
Implement hash for sha1 2024-01-22 11:27:00 -05:00
Stephen Paul Weber
06a662e63a
Switch TLS to TLST to allow any Unexceptional base monad 2021-02-16 13:14:37 -05:00
Stephen Paul Weber
ceac3318da runTLS' for when the caller is also using ExceptT 2021-02-16 13:12:55 -05:00
Stephen Paul Weber
955b054ff4 Switch monad transformer stack to a type alias
Since we already allowed injecting any Session via runTLS or throwing any Error
via throwE, this does not reduce safety at all but improves ergonomics
considerably.

The only downside here is that we must say goodbye to our transitional MonadIO
instance.
2021-02-16 13:12:55 -05:00
Stephen Paul Weber
17b9279287 Export local throwE/catchE/fromExceptT helpers 2021-02-16 13:12:55 -05:00
Stephen Paul Weber
decd5d9cb2 Switch base of the transformer stack to UIO
A lot of the utilities are still in IO for now, and we still provide a
transitional MonadIO instance, but the transformer stack itself is Unexceptional now.
2021-02-16 13:12:55 -05:00
Stephen Paul Weber
2882576126 Switch from monads-tf and custom transformer to ExceptT
When this code was written ExceptT didn't exist yet, but there's no reason to
vendor a custom implementation of it any longer.  We're taking very little
advantage of the monads-tf features so just remove that dependency (and the
language extension reliance that goes with it).
2021-02-16 13:12:35 -05:00
Stephen Paul Weber
b32c6617ed We use tabs, so stop whining 2021-02-13 20:06:48 -05:00
John Millikin
9b318950fc
Bump version to 0.2. 2015-06-17 20:48:07 -07:00
John Millikin
4edd87d207
Remove references to gnutls_certificate_type_set_priority.
This function was deprecated at some point in the distant past, and has
now been removed from gnutls upstream. There is no good replacement, and
no current users of the Haskell wrapper, so the easiest solution is to
remove setPriority from the binding.
2015-06-17 20:47:49 -07:00
John Millikin
90aa9e3473
Bump version to 0.1.6. 2015-05-07 18:45:03 -07:00
Michael Alan Dorman
a8b816730b Fixups for AMP changes. 2015-05-07 18:44:25 -07:00
John Millikin
5588ba43c8
Bump version to 0.1.5. 2013-09-07 12:41:00 -07:00
John Millikin
0d7a60a1cc
Fix a crash due to out-of-order garbage collection of Session values.
GnuTLS has separate initialization and deinitialization procedures for
global and per-session state. Previously, haskell-gnutls used Haskell's
garbage collector (via ForeignPtr) to manage these separate states by
creating a dummy GlobalState type representing an initialized global
state. The Session type contained ForeignPtrs to the global and session
state, with the idea that GC would collect them both at the same time
(albeit in non-determinstic order).

It turns out that session deinitialization *requires* an initialized
global state, and calling gnutls_deinit() after gnutls_global_deinit()
can cause a crash.

This patch solves the crash by removing the GlobalState ForeignPtr hack,
and ensuring that gnutls_global_deinit() is always called after
gnutls_deinit().

Originally reported by Keven McKenzie and Joey Hess.
2013-09-07 12:32:39 -07:00
John Millikin
6456ba5220
Update source-repository locations. 2013-09-07 12:31:23 -07:00
John Millikin
173fd08355
Bump version to 0.1.4. 2012-10-26 19:04:13 -07:00
John Millikin
a89dec4839
Remove maximum dependency version on bytestring. 2012-10-26 19:03:54 -07:00
John Millikin
777d600326
After setting credentials, save a reference to the gnutls credentials
struct to keep them alive for the duration of the session.

Fixes a potential crash when opening connections, reported by Joey Hess.
2012-10-26 19:01:52 -07:00
John Millikin
04064950bd
Remove unused FFI imports from gnutls-extra.
Bump version to 0.1.3.
2012-06-14 18:13:41 -07:00
John Millikin
5001417174
Minor cleanups. Remove maximum version of "transformers" dependency. 2012-05-13 14:28:58 -07:00
John Millikin
12aa431864
Bump version to 0.1.1. 2012-02-23 18:34:13 -08:00
John Millikin
05137fd023
Export 'rehandshake'. 2012-02-23 18:33:43 -08:00
John Millikin
c51832cc43
Fix some compilation errors. 2012-02-23 18:33:26 -08:00
John Millikin
c36fdda7d8
Clean up the Cabal file, and move library source to lib/. 2012-02-23 18:30:29 -08:00
John Millikin
f0f4eef863
Fix build in GHC 7.4. 2012-02-23 18:27:26 -08:00
John Millikin
34a2e4129a
Get rid of `-fno-warn-unused-do-bind` compilation flag. 2011-08-16 21:28:51 -07:00
John Millikin
5d711bbb78
TAG gnutls_0.1 2010-05-03 00:39:07 +00:00
John Millikin
fe1cb6a4bc
Initial import 2010-04-26 16:59:24 +00:00