bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

PR: ASN.1 Time validation exception because not too much precision

Open RobLinux opened this issue 2 years ago • 2 comments

Apple has ASN.1 times encoded in this format 20171017112741.65904593Z. If we read it with BC it will throw an exception, because the highest handled precision handled Asn1GeneralizedTime.cs is

case 23: return ParseUtc(s, @"yyyyMMddHHmmss.fffffff\Z");

Solution would be to increase to 24 + 25 with two extra floats.

It's currently a show stopper for my company. Any advice on how to counter it ? (we cannot modify the source data obviously)

RobLinux avatar Dec 27 '22 14:12 RobLinux

https://github.com/bcgit/bc-csharp/pull/410 created a PR for it

RobLinux avatar Dec 27 '22 14:12 RobLinux

Had the same issue lately

ArnoldCell avatar Dec 27 '22 14:12 ArnoldCell