Ethereal-dev: Re: [Ethereal-dev] H235 & ASN1 compiler]

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Tomas Kukosa <tomas.kukosa@xxxxxxxxxxx>
Date: Mon, 14 Jun 2004 15:45:48 +0200
Hi Ronnie,
  I made small progress in ASN1 compiler too. The patch is attached.

Changes in the asn2eth compiler:
- support for value assignments (INTEGER and OBJECT IDENTIFIER are tested)
  There are two new output files:
   packet-xxx-val.h - values which are not exported
   packet-xxxx-valexp.h - exported values
- new directive INCLUDE in conformation file
- new directive IMPORT_TAG in conformation file
  It determines tags for imported type.
- all output files are created only if they are not empty
- fix for BITS STRING support


Ronnie Sahlberg wrote:
1,  the imported types get class/tag  == -1.   I have to manually massage
the .c files and replace -1 with the proper tag/class to get it working.
No major problem,

You can use new directive IMPORT_TAG in conformation file now.
(see attached example)

   but can/should  say dissect_ber_sequence|set|...   be
changed so that if   BER_FLAGS_NOOWNTAG is set and
if class==tag==-1   then just ignore checking their values? And just pass
them on to the subdissector helper, no questions asked?
Or do you have a better solution planned?

The BER_FLAGS_NOTCHKTAG is implemented to do that but we can discuss it.

2, I think I need support for the type ANY in the compiler.  This will
require changes/additions to packet-ber.c as well I think.
It might be easiest to implement it as something that is identical to
dissect_ber_octet_string   but that it doesnt check the class/tag at all
and just looks at the len.   then it, just as the real octet_string one,
creates a subset tvb and passes it on through teh callback, if specified.
To print the ANY fields,   just use a FT_BYTES, BASE_NONE hf field and treat
it as an octet string.

I can implement it into ASN1 compiler. Could you implement is into packet-ber dissector?
I would recommend to implement the function without callback too. (the same as for octet string)

apart from that,   i managed to generate semicomplete  CMS,
InformationFramework and X509AF   and tied them into the partial pkinit
dissection in packet-kerberos.c and it works semi-well.


----- Original Message ----- From: "Tomas Kukosa"
Sent: Monday, June 07, 2004 6:43 PM
Subject: [Fwd: Re: [Ethereal-dev] H235 & ASN1 compiler]


Hi Ronnie,
   it seems that the mailing list does not work now.
So I send it directly to you so as you can continue with the X509.

   Regards,
     Tom



_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev


--
_________________________________________________

ANF DATA              ANF DATA spol. s r. o.
a SIEMENS Company     M-palác, Heršpická 5
                      639 00 Brno
                      Czech Republic
Tomáš Kukosa          Tel.: +420 - 5 4310 6822
PSE ECT AES 6         Fax: +420 - 5 4324 8780
Room: 8.24            mailto:tomas.kukosa@xxxxxxxxxxx
_________________________________________________

Attachment: asn2eth.py.diff.gz
Description: GNU Zip compressed data

Attachment: example_x509af_4.tgz
Description: Binary data