'Unable to write Universal External (InstanceOf) object using AsnWriter
I am currently using the built in System.Formats.Asn1.AsnWriter provided by the latest .Net 6 framework and so far it has worked for all my needs except one, writing an Universal External Object.
Unless I'm missing something, all the provided writing methods except for WriteEncodedValue(ReadOnlySpan), guard against using any other UniversalTagNumber except the expected UniversalTagNumber.
Is there any other way of encoding an UniversalTagNumber.External object using the AsnWriter?
My current workaround is to manually append (and by manually I mean adding the specific bits required) the External tag to my encoded external object and then use the WriteEncodedValue method to write the object. This works but I was wondering if there is a better way to approach this that does not rely on my to manually encode the tag.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
