As part of investigating indygreg/PyOxidizer#482 I was looking at what other ASN.1 implementations do for GeneralizedTime.
This project's implementation - like mine - assumes the no fractional seconds allowed definition of GeneralizedTime per RFCs like 5280. However, the ASN.1 definition of GeneralizedTime (I think X.690 is the current specification) allows multiple representations, including with fractional seconds and/or with a time zone differentiator. At least 1 crypto related RFC (3161 - Time-Stamp Protocol) allows use of the form with fractional seconds.
I know less about crypto than this project's maintainers. But I think there is a compelling case to allow GeneralizedTime to accept fractional seconds or to define a variant of this type that allows fractional seconds since there is at least 1 crypto RFC needing it - and one used as part of many PKI systems at that. I'm leaning towards making GeneralizedTime generic over an enum that controls which forms are allowed but I haven't decided yet. I'll be very curious to see what this project decides!
As part of investigating indygreg/PyOxidizer#482 I was looking at what other ASN.1 implementations do for
GeneralizedTime.This project's implementation - like mine - assumes the no fractional seconds allowed definition of
GeneralizedTimeper RFCs like 5280. However, the ASN.1 definition ofGeneralizedTime(I think X.690 is the current specification) allows multiple representations, including with fractional seconds and/or with a time zone differentiator. At least 1 crypto related RFC (3161 - Time-Stamp Protocol) allows use of the form with fractional seconds.I know less about crypto than this project's maintainers. But I think there is a compelling case to allow
GeneralizedTimeto accept fractional seconds or to define a variant of this type that allows fractional seconds since there is at least 1 crypto RFC needing it - and one used as part of many PKI systems at that. I'm leaning towards makingGeneralizedTimegeneric over an enum that controls which forms are allowed but I haven't decided yet. I'll be very curious to see what this project decides!