Thanks for your help. I think I understood the problem I was having.
In the original code (not the example in this email) things that would
normally go to a CHOICE field were marshalled into a RawValue, which
then got switched on RawValue.Tag to decide where to go (it's part of
the protocol, unrelated to asn.1). That raw value consumed a tag, but
the subsequent structs that were supposed to be unmarshalled from that
did not expect that tag to be consumed.

In the end my solution came down to calling
asn1.UnmarshalWithParams("tag:X") on the RawValue's FullBytes instead
of Bytes.

I hope we get support for CHOICE some day. I fear my understanding for
asn.1 is becoming sufficiently (in)adequate that I may soon be tempted
to do my own unmarshaller for our special case data...

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to