While working with the new asn1 module i stubled upon one limitation when using type aliases. For example this excerpt from the documentation:
@asn1.sequence
class Validity:
not_before: asn1.UTCTime | asn1.GeneralizedTime
not_after: asn1.UTCTime | asn1.GeneralizedTime
I would be nice to instead write:
type Time = asn1.UTCTime | asn1.GeneralizedTime
@asn1.sequence
class Validity:
not_before: Time
not_after: Time
However this is currently not supported by cryptography. I think it would be nice to also support type aliases, so common combinations can be declared and reused.
While working with the new asn1 module i stubled upon one limitation when using type aliases. For example this excerpt from the documentation:
I would be nice to instead write:
However this is currently not supported by cryptography. I think it would be nice to also support type aliases, so common combinations can be declared and reused.