/*--- proto_register_cms ----------------------------------------------*/ void proto_register_cms(void) { /* List of fields */ static hf_register_info hf[] = { { &hf_cms_ci_contentType, { "contentType", "cms.contentInfo.contentType", FT_OID, BASE_NONE, NULL, 0, NULL, HFILL }}, #include "packet-cms-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { #include "packet-cms-ettarr.c" }; /* Register protocol */ proto_cms = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Register fields and subtrees */ proto_register_field_array(proto_cms, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_ber_syntax_dissector("ContentInfo", proto_cms, dissect_ContentInfo_PDU); register_ber_syntax_dissector("SignedData", proto_cms, dissect_SignedData_PDU); register_ber_oid_syntax(".p7s", NULL, "ContentInfo"); register_ber_oid_syntax(".p7m", NULL, "ContentInfo"); register_ber_oid_syntax(".p7c", NULL, "ContentInfo"); }
/*--- proto_reg_handoff_x509af -------------------------------------------*/ void proto_reg_handoff_x509af(void) { dissector_handle_t pkix_crl_handle; pkix_crl_handle = new_create_dissector_handle(dissect_pkix_crl, proto_x509af); dissector_add_string("media_type", "application/pkix-crl", pkix_crl_handle); #include "packet-x509af-dis-tab.c" /*XXX these should really go to a better place but since that I have not that ITU standard, ill put it here for the time being. Only implemented those algorithms that take no parameters for the time being, ronnie */ /* from http://www.alvestrand.no/objectid/1.3.14.3.2.html */ register_ber_oid_dissector("1.3.14.3.2.2", dissect_ber_oid_NULL_callback, proto_x509af, "md4WithRSA"); register_ber_oid_dissector("1.3.14.3.2.3", dissect_ber_oid_NULL_callback, proto_x509af, "md5WithRSA"); register_ber_oid_dissector("1.3.14.3.2.4", dissect_ber_oid_NULL_callback, proto_x509af, "md4WithRSAEncryption"); register_ber_oid_dissector("1.3.14.3.2.6", dissect_ber_oid_NULL_callback, proto_x509af, "desECB"); register_ber_oid_dissector("1.3.14.3.2.11", dissect_ber_oid_NULL_callback, proto_x509af, "rsaSignature"); register_ber_oid_dissector("1.3.14.3.2.14", dissect_ber_oid_NULL_callback, proto_x509af, "mdc2WithRSASignature"); register_ber_oid_dissector("1.3.14.3.2.15", dissect_ber_oid_NULL_callback, proto_x509af, "shaWithRSASignature"); register_ber_oid_dissector("1.3.14.3.2.16", dissect_ber_oid_NULL_callback, proto_x509af, "dhWithCommonModulus"); register_ber_oid_dissector("1.3.14.3.2.17", dissect_ber_oid_NULL_callback, proto_x509af, "desEDE"); register_ber_oid_dissector("1.3.14.3.2.18", dissect_ber_oid_NULL_callback, proto_x509af, "sha"); register_ber_oid_dissector("1.3.14.3.2.19", dissect_ber_oid_NULL_callback, proto_x509af, "mdc-2"); register_ber_oid_dissector("1.3.14.3.2.20", dissect_ber_oid_NULL_callback, proto_x509af, "dsaCommon"); register_ber_oid_dissector("1.3.14.3.2.21", dissect_ber_oid_NULL_callback, proto_x509af, "dsaCommonWithSHA"); register_ber_oid_dissector("1.3.14.3.2.22", dissect_ber_oid_NULL_callback, proto_x509af, "rsaKeyTransport"); register_ber_oid_dissector("1.3.14.3.2.23", dissect_ber_oid_NULL_callback, proto_x509af, "keyed-hash-seal"); register_ber_oid_dissector("1.3.14.3.2.24", dissect_ber_oid_NULL_callback, proto_x509af, "md2WithRSASignature"); register_ber_oid_dissector("1.3.14.3.2.25", dissect_ber_oid_NULL_callback, proto_x509af, "md5WithRSASignature"); register_ber_oid_dissector("1.3.14.3.2.26", dissect_ber_oid_NULL_callback, proto_x509af, "SHA-1"); register_ber_oid_dissector("1.3.14.3.2.27", dissect_ber_oid_NULL_callback, proto_x509af, "dsaWithSHA1"); register_ber_oid_dissector("1.3.14.3.2.28", dissect_ber_oid_NULL_callback, proto_x509af, "dsaWithCommonSHA1"); register_ber_oid_dissector("1.3.14.3.2.29", dissect_ber_oid_NULL_callback, proto_x509af, "sha-1WithRSAEncryption"); /* these will generally be encoded as ";binary" in LDAP */ register_ldap_name_dissector("cACertificate", dissect_x509af_Certificate_PDU, proto_x509af); register_ldap_name_dissector("userCertificate", dissect_x509af_Certificate_PDU, proto_x509af); register_ldap_name_dissector("certificateRevocationList", dissect_CertificateList_PDU, proto_x509af); register_ldap_name_dissector("crl", dissect_CertificateList_PDU, proto_x509af); register_ldap_name_dissector("authorityRevocationList", dissect_CertificateList_PDU, proto_x509af); register_ldap_name_dissector("arl", dissect_CertificateList_PDU, proto_x509af); register_ldap_name_dissector("crossCertificatePair", dissect_CertificatePair_PDU, proto_x509af); register_ber_syntax_dissector("Certificate", proto_x509af, dissect_x509af_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); }
/*--- proto_register_p772 -------------------------------------------*/ void proto_register_p772(void) { /* List of fields */ static hf_register_info hf[] = { #include "packet-p772-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { &ett_p772, #include "packet-p772-ettarr.c" }; /* Register protocol */ proto_p772 = proto_register_protocol(PNAME, PSNAME, PFNAME); register_dissector("p772", dissect_p772, proto_p772); /* Register fields and subtrees */ proto_register_field_array(proto_p772, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_ber_syntax_dissector("STANAG 4406", proto_p772, dissect_p772); register_ber_oid_syntax(".p772", NULL, "STANAG 4406"); }
/*--- proto_reg_handoff_s4406 --- */ 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"); }
/*--- proto_register_x509af ----------------------------------------------*/ void proto_register_x509af(void) { /* List of fields */ static hf_register_info hf[] = { { &hf_x509af_algorithm_id, { "Algorithm Id", "x509af.algorithm.id", FT_OID, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_x509af_extension_id, { "Extension Id", "x509af.extension.id", FT_OID, BASE_NONE, NULL, 0, NULL, HFILL }}, #include "packet-x509af-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { &ett_pkix_crl, #include "packet-x509af-ettarr.c" }; /* Register protocol */ proto_x509af = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Register fields and subtrees */ proto_register_field_array(proto_x509af, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_ber_syntax_dissector("Certificate", proto_x509af, dissect_x509af_Certificate_PDU); register_ber_syntax_dissector("CertificateList", proto_x509af, dissect_CertificateList_PDU); register_ber_syntax_dissector("CrossCertificatePair", proto_x509af, dissect_CertificatePair_PDU); register_ber_oid_syntax(".cer", NULL, "Certificate"); register_ber_oid_syntax(".crt", NULL, "Certificate"); register_ber_oid_syntax(".crl", NULL, "CertificateList"); }
/*--- proto_register_pkcs12 ----------------------------------------------*/ void proto_register_pkcs12(void) { /* List of fields */ static hf_register_info hf[] = { { &hf_pkcs12_X509Certificate_PDU, { "X509Certificate", "pkcs12.X509Certificate", FT_NONE, BASE_NONE, NULL, 0, "pkcs12.X509Certificate", HFILL }}, #include "packet-pkcs12-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { &ett_decrypted_pbe, #include "packet-pkcs12-ettarr.c" }; module_t *pkcs12_module; /* Register protocol */ proto_pkcs12 = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Register fields and subtrees */ proto_register_field_array(proto_pkcs12, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* Register preferences */ pkcs12_module = prefs_register_protocol(proto_pkcs12, NULL); prefs_register_string_preference(pkcs12_module, "password", "Password to decrypt the file with", "The password to used to decrypt the encrypted elements within" " the PKCS#12 file", &password); prefs_register_bool_preference(pkcs12_module, "try_null_password", "Try to decrypt with a empty password", "Whether to try and decrypt the encrypted data within the" " PKCS#12 with a NULL password", &try_null_password); register_ber_syntax_dissector("PKCS#12", proto_pkcs12, dissect_PFX_PDU); register_ber_oid_syntax(".p12", NULL, "PKCS#12"); register_ber_oid_syntax(".pfx", NULL, "PKCS#12"); }
/*--- proto_register_pkcs10 ----------------------------------------------*/ void proto_register_pkcs10(void) { /* List of fields */ static hf_register_info hf[] = { #include "packet-pkcs10-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { #include "packet-pkcs10-ettarr.c" }; /* Register protocol */ proto_pkcs10 = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Register fields and subtrees */ proto_register_field_array(proto_pkcs10, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_ber_syntax_dissector("CertificationRequest", proto_pkcs10, dissect_CertificationRequest_PDU); register_ber_oid_syntax(".p10", NULL, "CertificationRequest"); register_ber_oid_syntax(".csr", NULL, "CertificationRequest"); }
/*--- proto_register_p1 -------------------------------------------*/ void proto_register_p1(void) { /* List of fields */ static hf_register_info hf[] = { /* "Created by defining PDU in .cnf */ { &hf_p1_MTABindArgument_PDU, { "MTABindArgument", "p1.MTABindArgument", FT_UINT32, BASE_DEC, VALS(p1_MTABindArgument_vals), 0, "p1.MTABindArgument", HFILL }}, { &hf_p1_MTABindResult_PDU, { "MTABindResult", "p1.MTABindResult", FT_UINT32, BASE_DEC, VALS(p1_MTABindResult_vals), 0, "p1.MTABindResult", HFILL }}, { &hf_p1_MTABindError_PDU, { "MTABindError", "p1.MTABindError", FT_UINT32, BASE_DEC, VALS(p1_MTABindError_vals), 0, "p1.MTABindError", HFILL }}, { &hf_p1_MTS_APDU_PDU, { "MTS-APDU", "p1.MTS_APDU", FT_UINT32, BASE_DEC, VALS(p1_MTS_APDU_vals), 0, "p1.MTS_APDU", HFILL }}, #include "packet-p1-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { &ett_p1, &ett_p3, &ett_p1_content_unknown, &ett_p1_bilateral_information, &ett_p1_additional_information, &ett_p1_unknown_standard_extension, &ett_p1_unknown_extension_attribute_type, &ett_p1_unknown_tokendata_type, #include "packet-p1-ettarr.c" }; static ei_register_info ei[] = { { &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }}, { &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }}, { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "P1 Unknown Content (unknown built-in content-type)", EXPFILL }}, { &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }}, { &ei_p1_unsupported_pdu, { "p1.unsupported_pdu", PI_UNDECODED, PI_WARN, "Unsupported P1 PDU", EXPFILL }}, { &ei_p1_zero_pdu, { "p1.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte P1 PDU", EXPFILL }}, }; expert_module_t* expert_p1; module_t *p1_module; /* Register protocol */ proto_p1 = proto_register_protocol(PNAME, PSNAME, PFNAME); new_register_dissector("p1", dissect_p1, proto_p1); proto_p3 = proto_register_protocol("X.411 Message Access Service", "P3", "p3"); /* Register fields and subtrees */ proto_register_field_array(proto_p1, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_p1 = expert_register_protocol(proto_p1); expert_register_field_array(expert_p1, ei, array_length(ei)); p1_extension_dissector_table = register_dissector_table("p1.extension", "P1-EXTENSION", FT_UINT32, BASE_DEC); p1_extension_attribute_dissector_table = register_dissector_table("p1.extension-attribute", "P1-EXTENSION-ATTRIBUTE", FT_UINT32, BASE_DEC); p1_tokendata_dissector_table = register_dissector_table("p1.tokendata", "P1-TOKENDATA", FT_UINT32, BASE_DEC); /* Register our configuration options for P1, particularly our port */ p1_module = prefs_register_protocol_subtree("OSI/X.400", proto_p1, prefs_register_p1); prefs_register_uint_preference(p1_module, "tcp.port", "P1 TCP Port", "Set the port for P1 operations (if other" " than the default of 102)", 10, &global_p1_tcp_port); register_ber_syntax_dissector("P1 Message", proto_p1, dissect_p1_mts_apdu); #include "packet-p1-syn-reg.c" }
/*--- proto_register_p1 -------------------------------------------*/ void proto_register_p1(void) { /* List of fields */ static hf_register_info hf[] = { /* "Created by defining PDU in .cnf */ { &hf_p1_MTABindArgument_PDU, { "MTABindArgument", "p1.MTABindArgument", FT_UINT32, BASE_DEC, VALS(p1_MTABindArgument_vals), 0, "p1.MTABindArgument", HFILL }}, { &hf_p1_MTABindResult_PDU, { "MTABindResult", "p1.MTABindResult", FT_UINT32, BASE_DEC, VALS(p1_MTABindResult_vals), 0, "p1.MTABindResult", HFILL }}, { &hf_p1_MTABindError_PDU, { "MTABindError", "p1.MTABindError", FT_UINT32, BASE_DEC, VALS(p1_MTABindError_vals), 0, "p1.MTABindError", HFILL }}, { &hf_p1_MTS_APDU_PDU, { "MTS-APDU", "p1.MTS_APDU", FT_UINT32, BASE_DEC, VALS(p1_MTS_APDU_vals), 0, "p1.MTS_APDU", HFILL }}, #include "packet-p1-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { &ett_p1, &ett_p3, &ett_p1_content_unknown, &ett_p1_bilateral_information, &ett_p1_additional_information, &ett_p1_unknown_standard_extension, &ett_p1_unknown_extension_attribute_type, &ett_p1_unknown_tokendata_type, #include "packet-p1-ettarr.c" }; module_t *p1_module; /* Register protocol */ proto_p1 = proto_register_protocol(PNAME, PSNAME, PFNAME); register_dissector("p1", dissect_p1, proto_p1); proto_p3 = proto_register_protocol("X.411 Message Access Service", "P3", "p3"); /* Register fields and subtrees */ proto_register_field_array(proto_p1, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); p1_extension_dissector_table = register_dissector_table("p1.extension", "P1-EXTENSION", FT_UINT32, BASE_DEC); p1_extension_attribute_dissector_table = register_dissector_table("p1.extension-attribute", "P1-EXTENSION-ATTRIBUTE", FT_UINT32, BASE_DEC); p1_tokendata_dissector_table = register_dissector_table("p1.tokendata", "P1-TOKENDATA", FT_UINT32, BASE_DEC); /* Register our configuration options for P1, particularly our port */ p1_module = prefs_register_protocol_subtree("OSI/X.400", proto_p1, prefs_register_p1); prefs_register_uint_preference(p1_module, "tcp.port", "P1 TCP Port", "Set the port for P1 operations (if other" " than the default of 102)", 10, &global_p1_tcp_port); register_ber_syntax_dissector("P1 Message", proto_p1, dissect_p1_mts_apdu); }