asn1-encoding 0.8.1.2 → 0.8.1.3
raw patch · 2 files changed
+7/−2 lines, 2 files
Files
Data/ASN1/BinaryEncoding/Parse.hs view
@@ -43,6 +43,11 @@ type ParsePosition = Word64 -- | represent the parsing state of an ASN1 stream.+--+-- * the stack of constructed elements.+-- * the next expected type.+-- * the position in the stream.+-- data ParseState = ParseState [ConstructionEndAt] ParseExpect ParsePosition -- | create a new empty parse state. position is 0@@ -96,7 +101,7 @@ Partial f -> Right (([], ParseState stackEnd (ExpectHeader $ Just f) pos), B.empty) Done hdr nPos remBytes | isEOC hdr -> case stackEnd of- [] -> Left StreamUnexpectedEOC+ [] -> Right (([], ParseState [] (ExpectHeader Nothing) nPos), remBytes) Just _:_ -> Left StreamUnexpectedEOC Nothing:newStackEnd -> Right ( ( [ConstructionEnd] , ParseState newStackEnd (ExpectHeader Nothing) nPos)
asn1-encoding.cabal view
@@ -1,5 +1,5 @@ Name: asn1-encoding-Version: 0.8.1.2+Version: 0.8.1.3 Description: ASN1 data reader and writer in raw form with supports for high level forms of ASN1 (BER, and DER). License: BSD3