Is there a algo or way to search a particular tag / tag value in ASN
byte stream ?

If you are using (BER, CER, or DER, yes, it's easy enough. If you are using PER, no, it's not possible since tags are not encoded. I'll assume you're working with BER.

You'll need to examine the initial octet, which is always a tag, and making use of the constructed-bit within the tag and the length following the tag, you should be able to find the following tag, etc.

Please consider reviewing one (or both) of the ASN.1 reference texts which OSS makes available for free download. You will find them at

   http://www.oss.com/asn1/booksintro.html

Neither will explicitly outline an algorithm, but if you understand how tags and lengths are encoded, you can figure one out for yourself. One warning: a cursory examination of a trivial set of tags and lengths might convince you that these fields are only one byte long. The truth is that they can be many bytes long and you need to know when and how. A little study in the texts will go a long way.

=====================================================================
Conrad Sigona                    Voice Mail     : 1-732-302-9669 x400
OSS Nokalva                      Fax            : 1-614-388-4156
[EMAIL PROTECTED]                   My direct line : 1-315-845-1773
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to