| Stability | Experimental |
|---|---|
| Maintainer | PAF01143@nifty.ne.jp |
| Safe Haskell | None |
Network.PeyoTLS.Client
Contents
Description
- type PeyotlsM = TlsM Handle SystemRNG
- type PeyotlsHandle = TlsHandle Handle SystemRNG
- type TlsM h g = ErrorT Alert (StateT (TlsState h g) (HandleMonad h))
- data TlsHandle h g
- data Alert
- = Alert AlertLevel AlertDesc String
- | ExternalAlert String
- | NotDetected String
- run :: HandleLike h => TlsM h g a -> g -> HandleMonad h a
- open :: (ValidateHandle h, CPRG g) => h -> [CipherSuite] -> [(CertSecretKey, CertificateChain)] -> CertificateStore -> TlsM h g (TlsHandle h g)
- open' :: (ValidateHandle h, CPRG g) => h -> String -> [CipherSuite] -> [(CertSecretKey, CertificateChain)] -> CertificateStore -> TlsM h g (TlsHandle h g)
- getNames :: HandleLike h => TlsHandle h g -> TlsM h g [String]
- checkName :: HandleLike h => TlsHandle h g -> String -> TlsM h g Bool
- renegotiate :: (ValidateHandle h, CPRG g) => TlsHandle h g -> TlsM h g ()
- setCipherSuites :: (ValidateHandle h, CPRG g) => TlsHandle h g -> [CipherSuite] -> TlsM h g ()
- setKeyCerts :: (ValidateHandle h, CPRG g) => TlsHandle h g -> [(CertSecretKey, CertificateChain)] -> TlsM h g ()
- setCertificateStore :: (ValidateHandle h, CPRG g) => TlsHandle h g -> CertificateStore -> TlsM h g ()
- data CipherSuite
- data KeyEx
- = RSA
- | DHE_RSA
- | ECDHE_RSA
- | ECDHE_ECDSA
- | KE_NULL
- data BulkEnc
- class HandleLike h => ValidateHandle h where
- validate :: h -> CertificateStore -> CertificateChain -> HandleMonad h [FailedReason]
- data CertSecretKey
- = RsaKey {
- rsaKey :: PrivateKey
- | EcdsaKey { }
- = RsaKey {
Basic
Instances
| Show h => Show (TlsHandle h g) | |
| (ValidateHandle h, CPRG g) => HandleLike (TlsHandle h g) |
Constructors
| Alert AlertLevel AlertDesc String | |
| ExternalAlert String | |
| NotDetected String |
run :: HandleLike h => TlsM h g a -> g -> HandleMonad h aSource
open :: (ValidateHandle h, CPRG g) => h -> [CipherSuite] -> [(CertSecretKey, CertificateChain)] -> CertificateStore -> TlsM h g (TlsHandle h g)Source
Don't forget check server name by checkName.
open' :: (ValidateHandle h, CPRG g) => h -> String -> [CipherSuite] -> [(CertSecretKey, CertificateChain)] -> CertificateStore -> TlsM h g (TlsHandle h g)Source
This function open and check server name. Use this so as not to forget to check server name.
Renegotiation
renegotiate :: (ValidateHandle h, CPRG g) => TlsHandle h g -> TlsM h g ()Source
setCipherSuites :: (ValidateHandle h, CPRG g) => TlsHandle h g -> [CipherSuite] -> TlsM h g ()Source
setKeyCerts :: (ValidateHandle h, CPRG g) => TlsHandle h g -> [(CertSecretKey, CertificateChain)] -> TlsM h g ()Source
setCertificateStore :: (ValidateHandle h, CPRG g) => TlsHandle h g -> CertificateStore -> TlsM h g ()Source
Cipher Suite
data CipherSuite Source
Constructors
| CipherSuite KeyEx BulkEnc | |
| EMPTY_RENEGOTIATION_INFO | |
| CipherSuiteRaw Word8 Word8 |
Constructors
| RSA | |
| DHE_RSA | |
| ECDHE_RSA | |
| ECDHE_ECDSA | |
| KE_NULL |
Constructors
| AES_128_CBC_SHA | |
| AES_128_CBC_SHA256 | |
| BE_NULL |
Others
class HandleLike h => ValidateHandle h whereSource
Methods
validate :: h -> CertificateStore -> CertificateChain -> HandleMonad h [FailedReason]Source
Instances