I'd like to make a PR for this, but I have to say it's unlikely these days. But here is the issue, and the options, at least. I'd be interested in hearing what you maintainer(s) think. Thanks for this code!
Problem
the Certificate type contains DateTime which allows for fractions of seconds.
However, the rfc says, that there should only be full seconds.
This leads to the odd behavior that roundtrip serialization-deserialization changes some values of this type.
Options
Make the type opaque and add a smart constructor that rounds the seconds.
Add a custom date type that cannot carry fractions of seconds.
I like 2. better because it allows the constructor to be left exposed. Migrating to a new version where this happens could be made easier by offering a smart constructor that takes DateTime values, and maybe some more conversions functions if we can think of any.
I'd like to make a PR for this, but I have to say it's unlikely these days. But here is the issue, and the options, at least. I'd be interested in hearing what you maintainer(s) think. Thanks for this code!
Problem
the Certificate type contains
DateTime
which allows for fractions of seconds.However, the rfc says, that there should only be full seconds.
This leads to the odd behavior that roundtrip serialization-deserialization changes some values of this type.
Options
I like 2. better because it allows the constructor to be left exposed. Migrating to a new version where this happens could be made easier by offering a smart constructor that takes
DateTime
values, and maybe some more conversions functions if we can think of any.