packages feed

asn1-encoding 0.9.1 → 0.9.2

raw patch · 2 files changed

+12/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/ASN1/Prim.hs view
@@ -263,16 +263,22 @@     | hasNonASCII bs = decodingError "contains non ASCII characters"     | otherwise      =         case timeParseE format (BC.unpack bs) of -- BC.unpack is safe as we check ASCIIness first-            Left _  -> decodingError ("cannot convert string " ++ BC.unpack bs)-            Right r ->-                case parseTimezone $ parseMs $ first adjustUTC $ r of-                    Left err        -> decodingError err-                    Right (dt', tz) -> Right $ ASN1Time timeType dt' tz+            Left _  ->+                case timeParseE formatNoSeconds (BC.unpack bs) of+                    Left _  -> decodingError ("cannot convert string " ++ BC.unpack bs)+                    Right r -> parseRemaining r+            Right r -> parseRemaining r   where+        parseRemaining r =+            case parseTimezone $ parseMs $ first adjustUTC r of+                Left err        -> decodingError err+                Right (dt', tz) -> Right $ ASN1Time timeType dt' tz+         adjustUTC dt@(DateTime (Date y m d) tod)             | timeType == TimeGeneralized = dt             | y > 2050                    = DateTime (Date (y - 100) m d) tod             | otherwise                   = dt+        formatNoSeconds = init format         format | timeType == TimeGeneralized = 'Y':'Y':baseFormat                | otherwise                   = baseFormat         baseFormat = "YYMMDDHMIS"
asn1-encoding.cabal view
@@ -1,5 +1,5 @@ Name:                asn1-encoding-Version:             0.9.1+Version:             0.9.2 Synopsis:            ASN1 data reader and writer in RAW, BER and DER forms Description:     ASN1 data reader and writer in raw form with supports for high level forms of ASN1 (BER, and DER).