The DER decode functions validate that the encoding follows the
restrictions imposed by DER (e.g. that SET OF
components are sorted). If a restriction was violated by the encoder,
the DER decode function will add a CanonicalError to the context's
warnings (asn1rt.OSRTContext.Warnings
). The warnings
are held
in an asn1rt.OSRTWarnings
object. Note the following
properties of asn1rt.OSRTWarnings
:
It implements interface error
. As noted below, Unmarshal will return
it as an error.
Its Remove
function may be used to remove
all CanonicalError
objects from the list, should
you wish to ignore those warnings and treat anything that remains
as an error.
Its RemoveAllExcept
function may be used to
remove all objects except for CanonicalError
objects, should you wish to treat canonical violations, and not
other warnings, as an error.