~singpolyma/network-protocol-xmpp

21fada263c689cfc39bba931748afc682a2fea9d — John Millikin 12 years ago dbad367
Small tweak for first public version of GNU TLS bindings.
1 files changed, 2 insertions(+), 3 deletions(-)

M Network/Protocol/XMPP/Handle.hs
M Network/Protocol/XMPP/Handle.hs => Network/Protocol/XMPP/Handle.hs +2 -3
@@ 46,10 46,9 @@ liftTLS' io = do

startTLS :: Handle -> ErrorT T.Text IO Handle
startTLS (SecureHandle _ _) = E.throwError "Can't start TLS on a secure handle"
startTLS (PlainHandle h) = liftTLS' $ TLS.runClient $ do
	TLS.setTransport $ TLS.transportHandle h
startTLS (PlainHandle h) = liftTLS' $ TLS.runClient (TLS.handleTransport h) $ do
	TLS.setPriority [TLS.X509]
	TLS.setCredentials TLS.certificateCredentials
	TLS.setCredentials =<< TLS.certificateCredentials
	TLS.handshake
	SecureHandle h `fmap` TLS.getSession