Skipping unrecognised tags

"Padraig Murtagh" <[email protected]> Mon, 10 Oct 2005 17:35:27 +0100
Newsgroups gmane.comp.gnu.snacc
Message-ID <[email protected]>
I have an application which needs to be made forward compatible.
Basically my application needs to ignore/skip pdus received with unknown
but valid tlvs that are not in my asn1 definition of the pdu
Example:
I expect a pdu consisting of a SET of the following tags <tag1> <tag2>
<tag3>
My application receives the following
<tag1><len1><val1><tag4><len4><val4><tag2><len2><val2>
=20
Currently the decoding fails as follows:
=20
	 =09
          break;
=20
       default:
         Asn1Err("Unexpected Tag on SET elmt." );
         longjmp (env, -113);
    } // end switch
  } // end for loop
=20
    The question is how can I ensure that the decode does not fail but
merely skips past the unknown tag (<tag4>) in the case above
=20
Thanks,
p
=09