gnutls-0.1.4: Bindings for GNU libgnutls

Safe Haskell | None

Network.Protocol.TLS.GNU

Contents

- Settings

Synopsis

- data TLS a
- data Session
- data Error = Error Integer
- runTLS :: Session -> TLS a -> IO (Either Error a)
- runClient :: Transport -> TLS a -> IO (Either Error a)
- getSession :: TLS Session
- handshake :: TLS ()
- rehandshake :: TLS ()
- putBytes :: ByteString -> TLS ()
- getBytes :: Integer -> TLS ByteString
- checkPending :: TLS Integer
- data Transport = Transport {
  - transportPush :: ByteString -> IO ()
  - transportPull :: Integer -> IO ByteString
  }
- handleTransport :: Handle -> Transport
- data Credentials
- setCredentials :: Credentials -> TLS ()
- certificateCredentials :: TLS Credentials
- class Prioritised a
- setPriority :: Prioritised a => [a] -> TLS ()
- data CertificateType
  - = X509
  - | OpenPGP

# Documentation

data TLS a Source

Instances

Monad TLS |
Functor TLS |
MonadIO TLS |
MonadError TLS |

data Session Source

data Error Source

Constructors

Error Integer |

Instances

Show Error |

runTLS :: Session -> TLS a -> IO (Either Error a)Source

runClient :: Transport -> TLS a -> IO (Either Error a)Source

getSession :: TLS Session Source

handshake :: TLS ()Source

rehandshake :: TLS ()Source

putBytes :: ByteString -> TLS ()Source

getBytes :: Integer -> TLS ByteString Source

checkPending :: TLS Integer Source

# Settings

data Transport Source

Constructors

Transport |

Fields

transportPush :: ByteString -> IO ()
transportPull :: Integer -> IO ByteString

handleTransport :: Handle -> Transport Source

data Credentials Source

setCredentials :: Credentials -> TLS ()Source

certificateCredentials :: TLS Credentials Source

class Prioritised a Source

Instances

Prioritised CertificateType |

setPriority :: Prioritised a => [a] -> TLS ()Source

data CertificateType Source

Constructors

X509 |
OpenPGP |

Instances

Show CertificateType |
Prioritised CertificateType |