Stability | Experimental |
---|---|
Maintainer | PAF01143@nifty.ne.jp |
Safe Haskell | None |
- 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
- = CipherSuite KeyEx BulkEnc
- | EMPTY_RENEGOTIATION_INFO
- | CipherSuiteRaw Word8 Word8
- 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 SystemRNGSource
Show h => Show (TlsHandle h g) | |
(ValidateHandle h, CPRG g) => HandleLike (TlsHandle h g) |
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.
getNames :: HandleLike h => TlsHandle h g -> TlsM h g [String]Source
getCertificate :: HandleLike h => TlsHandle h g -> TlsM h g SignedCertificateSource
checkName :: HandleLike h => TlsHandle h g -> String -> TlsM h g BoolSource
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
CipherSuite KeyEx BulkEnc | |
EMPTY_RENEGOTIATION_INFO | |
CipherSuiteRaw Word8 Word8 |
Eq CipherSuite | |
Read CipherSuite | |
Show CipherSuite | |
IsString CipherSuite | |
Bytable CipherSuite |
Others
class HandleLike h => ValidateHandle h whereSource
validate :: h -> CertificateStore -> CertificateChain -> HandleMonad h [FailedReason]Source
ValidateHandle Handle | |
ValidateHandle h => ValidateHandle (DebugHandle h) |
data CertSecretKey Source
Show CertSecretKey |