Small cleans up of x.encoding.asn1
module
#22847
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains some smalls cleans up to the
x.encoding.asn1
, ie,@[noinit]
tag from public struct, Its can makes an issue when custom structure contains the standard universal element tagged with@[noinit]
tag. For examples, when developing certificates parser, its requires to just instantiate some element withCertificate{}
call directly and validates it later, but currently this would gives us an error similar withstruct x.encoding.asn1.Integer` is declared with a `@[noinit]` attribute, so it cannot be initialized with `x.encoding.asn1.Integer{}`
and other error with other standard element tagged withnoinit
. Removes this tag makes it more flexible. Standard universal class has builtin check when this element was serialized, so, i think its safe to remove this tag.UtcTime
andGeneralizedTime
from standardtime.Time
module. Its still rather a hack thing, but can be improved later.Any
element intoAnyDefinedBy
element, to reflect underlying ASN.1 syntax for this, ieANY DEFINED BY
schema.Any
maybe good for arbitrary other name, also removes internal marker string, its not relevant now.modules.vlang.io
)Best regards and thanks.