packages feed

peyotls-codec 0.2.0.0 → 0.3.0.0

raw patch · 5 files changed

+129/−7 lines, 5 filesdep ~asn1-encodingdep ~asn1-typesdep ~x509PVP ok

version bump matches the API change (PVP)

Dependency ranges changed: asn1-encoding, asn1-types, x509, x509-store

API changes (from Hackage documentation)

Files

peyotls-codec.cabal view
@@ -2,7 +2,7 @@ cabal-version:	>= 1.8  name:		peyotls-codec-version:	0.2.0.0+version:	0.3.0.0 stability:	Experimental author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp> maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>@@ -22,7 +22,7 @@ source-repository	this     type:	git     location:	git://github.com/YoshikuniJujo/peyotls.git-    tag:	peyotls-0.1.6.8+    tag:	peyotls-0.1.6.9  library     hs-source-dirs:	src@@ -36,8 +36,8 @@             Network.PeyoTLS.CipherSuite     build-depends:         base == 4.*, word24 == 1.0.*, bytestring == 0.10.*,-        asn1-encoding == 0.8.*, asn1-types == 0.2.*,-        x509 == 1.4.*, x509-store == 1.4.*,+        asn1-encoding == 0.9.*, asn1-types == 0.3.*,+        x509 == 1.5.*, x509-store == 1.5.*,         crypto-pubkey == 0.2.*, crypto-pubkey-types == 0.4.*,         bytable == 0.1.*     ghc-options:	-Wall
src/Network/PeyoTLS/CipherSuite.hs view
@@ -13,6 +13,108 @@ modNm :: String modNm = "Network.PeyoTLS.CipherSuite" +-- | RFC 5246 7.4.1.2. Client Hello+--+-- @+-- uint8 CipherSuite[2];+-- @+--+-- RFC 5246 A.5. The Cipher Suite+--+-- @+-- CipherSuite TLS_NULL_WITH_NULL_NULL		= { 0x00, 0x00 };+-- CipherSuite TLS_RSA_WITH_NULL_MD5		= { 0x00, 0x01 };+-- CipherSuite TLS_RSA_WITH_NULL_SHA		= { 0x00, 0x02 };+-- CipherSuite TLS_RSA_WITH_NULL_SHA256		= { 0x00, 0x3B };+-- CipherSuite TLS_RSA_WITH_RC4_128_MD5		= { 0x00, 0x04 };+-- CipherSuite TLS_RSA_WITH_RC4_128_SHA		= { 0x00, 0x05 };+-- CipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA	= { 0x00, 0x0A };+-- CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA	= { 0x00, 0x2F };+-- CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA	= { 0x00, 0x35 };+-- CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256	= { 0x00, 0x3C };+-- CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256	= { 0x00, 0x3D };+-- @+--+-- @+-- CipherSuite TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA	= { 0x00, 0x0D };+-- CipherSuite TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA	= { 0x00, 0x10 };+-- CipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA	= { 0x00, 0x13 };+-- CipherSuite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA	= { 0x00, 0x16 };+-- CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA	= { 0x00, 0x30 };+-- CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA	= { 0x00, 0x31 };+-- CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA	= { 0x00, 0x32 };+-- CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA	= { 0x00, 0x33 };+-- CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA	= { 0x00, 0x36 };+-- CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA	= { 0x00, 0x37 };+-- CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA	= { 0x00, 0x38 };+-- CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA	= { 0x00, 0x39 };+-- CipherSuite TLS_DH_DSS_WITH_AES_128_CBC_SHA256	= { 0x00, 0x3E };+-- CipherSuite TLS_DH_RSA_WITH_AES_128_CBC_SHA256	= { 0x00, 0x3F };+-- CipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256= { 0x00, 0x40 };+-- CipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA256= { 0x00, 0x67 };+-- CipherSuite TLS_DH_DSS_WITH_AES_256_CBC_SHA256	= { 0x00, 0x68 };+-- CipherSuite TLS_DH_RSA_WITH_AES_256_CBC_SHA256	= { 0x00, 0x69 };+-- CipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256= { 0x00, 0x6A };+-- CipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA256= { 0x00, 0x6B };+-- @+--+-- @+-- CipherSuite TLS_DH_anon_WITH_RC4_128_MD5	= { 0x00, 0x00 };+-- CipherSuite TLS_DH_anon_WITH_3DES_EDE_CBC_SHA	= { 0x00, 0x00 };+-- CipherSuite TLS_DH_anon_WITH_AES_128_CBC_SHA	= { 0x00, 0x00 };+-- CipherSuite TLS_DH_anon_WITH_AES_256_CBC_SHA	= { 0x00, 0x00 };+-- CipherSuite TLS_DH_anon_WITH_AES_128_CBC_SHA256= { 0x00, 0x00 };+-- CipherSuite TLS_DH_anon_WITH_AES_256_CBC_SHA256= { 0x00, 0x00 };+-- @+--+-- RFC 4492 6. Cipher Suites+--+-- @+-- CipherSuite TLS_ECDH_ECDSA_WITH_NULL_SHA		= { 0xC0, 0x01 };+-- CipherSuite TLS_ECDH_ECDSA_WITH_RC4_128_SHA		= { 0xC0, 0x02 };+-- CipherSuite TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA	= { 0xC0, 0x03 };+-- CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA	= { 0xC0, 0x04 };+-- CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA	= { 0xC0, 0x05 };+-- @+--+-- @+-- CipyherSuite TLS_ECDHE_ECDSA_WITH_NULL_SHA		= { 0xC0, 0x06 };+-- CipyherSuite TLS_ECDHE_ECDSA_WITH_RC4_128_SHA		= { 0xC0, 0x07};+-- CipyherSuite TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA	= { 0xC0, 0x08 };+-- CipyherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA	= { 0xC0, 0x09 };+-- CipyherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA	= { 0xC0, 0x0A };+-- @+--+-- @+-- CipherSuite TLS_ECDH_RSA_WITH_NULL_SHA			= { 0xC0, 0x0B };+-- CipherSuite TLS_ECDH_RSA_WITH_RC4_128_SHA		= { 0xC0, 0x0C };+-- CipherSuite TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA		= { 0xC0, 0x0D };+-- CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA		= { 0xC0, 0x0E };+-- CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA		= { 0xC0, 0x0F };+-- @+--+-- @+-- CipherSuite TLS_ECDHE_RSA_WITH_NULL_SHA		= { 0xC0, 0x10 };+-- CipherSuite TLS_ECDHE_RSA_WITH_RC4_128_SHA		= { 0xC0, 0x11 };+-- CipherSuite TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA	= { 0xC0, 0x12 };+-- CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA		= { 0xC0, 0x13 };+-- CipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA		= { 0xC0, 0x14 };+-- @+--+-- @+-- CipherSuite TLS_ECDH_anon_WITH_NULL_SHA		= { 0xC0, 0x15 };+-- CipherSuite TLS_ECDH_anon_WITH_RC4_128_SHA		= { 0xC0, 0x16 };+-- CipherSuite TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA	= { 0xC0, 0x17 };+-- CipherSuite TLS_ECDH_anon_WITH_AES_128_CBC_SHA		= { 0xC0, 0x18 };+-- CipherSuite TLS_ECDH_anon_WITH_AES_256_CBC_SHA		= { 0xC0, 0x19 };+-- @+--+-- RFC 5746 3.3. Renegotiation Protection Request Signaling Cipher Suite Value+--+-- @+-- CipherSuite TLS_EMPTY_RENEGOTIATION_INFO_SCSV	= {0x00, 0xFF}+-- @+ data CipherSuite 	= CipherSuite KeyEx BulkEnc 	| EMPTY_RENEGOTIATION_INFO
src/Network/PeyoTLS/Codec.hs view
@@ -126,6 +126,14 @@ 	toHandshake (Left l) = toHandshake l 	toHandshake (Right r) = toHandshake r +-- | RFC 5246+--+-- @+-- struct {+-- 	enum { change_cipher_spec(1), (255) } type;+-- } ChangeCipherSpec;+-- @+ data CCSpec = CCSpec | CCSpecRaw Word8 deriving Show  instance HandshakeItem CCSpec where
src/Network/PeyoTLS/Codec/HSAlg.hs view
@@ -11,7 +11,7 @@ modNm :: String modNm = "Network.PeyoTLS.Codec.HSAlg" --- | RFC 5246 7.4.1.4.1.+-- | RFC 5246 7.4.1.4.1. Signature Algorithms -- -- @ -- struct {@@ -27,7 +27,7 @@ 	decode hasa = let (ha, sa) = BS.splitAt 1 hasa in 		HSAlg <$> B.decode ha <*> B.decode sa --- | RFC 5246 7.4.1.4.1.+-- | RFC 5246 7.4.1.4.1. Signature Algorithms -- -- @ -- enum {@@ -58,7 +58,7 @@ 		_ -> Left $ modNm ++ ": HashAlg.decode" instance B.Parsable HashAlg where parse = B.take 1 --- | RFC 5246 7.4.1.4.1.+-- | RFC 5246 7.4.1.4.1. Signature Algorithms -- -- @ -- enum { anonymous(0), rsa(1), dsa(2), ecdsa(3), (255) }
src/Network/PeyoTLS/Codec/Hello.hs view
@@ -105,9 +105,21 @@ 		maybe "" (B.addLen w16 . BS.concat . map B.encode) mes ] 	encode (SvHelloRaw sh) = sh +-- | RFC 5246 7.4.1.2 Client Hello+--+-- @+-- opaque SessionID\<0..32>;+-- @+ data SssnId = SssnId BS.ByteString deriving Show  instance B.Bytable SssnId where decode = Right . SssnId; encode (SssnId bs) = bs++-- | RFC 5246 7.4.1.2. Client Hello+--+-- @+-- enum { null(0), (255) } CompressionMethod;+-- @  data CmpMtd = CmpMtdNull | CmpMtdRaw Word8 deriving (Show, Eq)