fix a bug with SSL3 during the creation of crypt state.
The test for partition was too strict, and the SSL3 generator is quite likely to generate more data whereas the TLS generator generate the correct amount every time. now bigger bytestring than necessary are now valid as well.
This commit is contained in:
parent
90b7a0fd9b
commit
c6154ae126
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ partition3 bytes (d1,d2,d3) = if B.length bytes /= s then Nothing else Just (p1,
|
||||||
(p3, _) = B.splitAt d3 r2
|
(p3, _) = B.splitAt d3 r2
|
||||||
|
|
||||||
partition6 :: Bytes -> (Int,Int,Int,Int,Int,Int) -> Maybe (Bytes, Bytes, Bytes, Bytes, Bytes, Bytes)
|
partition6 :: Bytes -> (Int,Int,Int,Int,Int,Int) -> Maybe (Bytes, Bytes, Bytes, Bytes, Bytes, Bytes)
|
||||||
partition6 bytes (d1,d2,d3,d4,d5,d6) = if B.length bytes /= s then Nothing else Just (p1,p2,p3,p4,p5,p6)
|
partition6 bytes (d1,d2,d3,d4,d5,d6) = if B.length bytes < s then Nothing else Just (p1,p2,p3,p4,p5,p6)
|
||||||
where
|
where
|
||||||
s = sum [d1,d2,d3,d4,d5,d6]
|
s = sum [d1,d2,d3,d4,d5,d6]
|
||||||
(p1, r1) = B.splitAt d1 bytes
|
(p1, r1) = B.splitAt d1 bytes
|
||||||
|
|
Loading…
Reference in a new issue