diff options
author | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-01-13 12:59:27 +0000 |
---|---|---|
committer | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-01-13 12:59:27 +0000 |
commit | 2fd7d2c62078813f44e78f0b4b9f8b0e6e5928fb (patch) | |
tree | 8bc3e25bd6afc1b8eeb5ae59ab92988c18a6dcc8 /asn1 | |
parent | 13a095e055798295514d723c15f72e8f2cd89a3e (diff) |
New "decode as ..." feature for BER-encoded files (WTAP_FILE_BER).
A BER-encoded file can be dissected as one of a number of registered syntaxes (registered using register_ber_syntax_dissector()).
Syntaxes may also be associated with OIDs (or other strings) using register_ber_oid_syntax().
A default syntax with which to dissect a BER-encoded file is determined from its filename (extension). For example, ".cer" and ".crt" files will be dissected as "Certificate".
svn path=/trunk/; revision=20414
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/s4406/packet-s4406-template.c | 4 | ||||
-rw-r--r-- | asn1/x509af/packet-x509af-template.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/asn1/s4406/packet-s4406-template.c b/asn1/s4406/packet-s4406-template.c index ff8bb0d368..57e0dcea24 100644 --- a/asn1/s4406/packet-s4406-template.c +++ b/asn1/s4406/packet-s4406-template.c @@ -113,4 +113,8 @@ void proto_reg_handoff_s4406(void) { #include "packet-s4406-dis-tab.c" register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_s4406, proto_s4406, "Military Message"); + + register_ber_syntax_dissector("MilitaryMessage", proto_s4406, dissect_s4406); + register_ber_oid_syntax(".p772", NULL, "MilitaryMessage"); + } diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c index f8ac215681..a784b9b700 100644 --- a/asn1/x509af/packet-x509af-template.c +++ b/asn1/x509af/packet-x509af-template.c @@ -170,5 +170,12 @@ void proto_reg_handoff_x509af(void) { register_ldap_name_dissector("crossCertificatePair", dissect_CertificatePair_PDU, proto_x509af); + register_ber_syntax_dissector("Certificate", proto_x509af, dissect_Certificate_PDU); + register_ber_oid_syntax(".cer", NULL, "Certificate"); + register_ber_oid_syntax(".crt", NULL, "Certificate"); + register_ber_syntax_dissector("CertificateList", proto_x509af, dissect_CertificateList_PDU); + register_ber_oid_syntax(".crl", NULL, "CertificateList"); + register_ber_syntax_dissector("CrossCertificatePair", proto_x509af, dissect_CertificatePair_PDU); + } |