Copyright | (c) Yoshikuni Jujo, 2014 |
---|---|
License | BSD3 |
Maintainer | PAF01143@nifty.ne.jp |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell98 |
- 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]
- getCertificate :: HandleLike h => TlsHandle h g -> TlsM h g SignedCertificate
- 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
type PeyotlsHandle = TlsHandle Handle SystemRNG Source
Show h => Show (TlsHandle h g) Source | |
(ValidateHandle h, CPRG g) => HandleLike (TlsHandle h g) Source | |
type DebugLevel (TlsHandle h g) = DebugLevel h Source | |
type HandleMonad (TlsHandle h g) = TlsM h g Source |
Alert AlertLevel AlertDesc String | |
ExternalAlert String | |
NotDetected String |
run :: HandleLike h => TlsM h g a -> g -> HandleMonad h a Source
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.
getCertificate :: HandleLike h => TlsHandle h g -> TlsM h g SignedCertificate Source
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 :: *
Others
class HandleLike h => ValidateHandle h where Source
validate :: h -> CertificateStore -> CertificateChain -> HandleMonad h [FailedReason] Source