2 * Routines for RFC2511 Certificate Request Message Format packet dissection
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
31 #include <epan/packet.h>
32 #include <epan/oids.h>
33 #include <epan/asn1.h>
35 #include "packet-ber.h"
36 #include "packet-crmf.h"
37 #include "packet-cms.h"
38 #include "packet-pkix1explicit.h"
39 #include "packet-pkix1implicit.h"
41 #define PNAME "Certificate Request Message Format"
45 /* Initialize the protocol and registered fields */
46 static int proto_crmf = -1;
47 static int hf_crmf_type_oid = -1;
48 #include "packet-crmf-hf.c"
50 /* Initialize the subtree pointers */
51 #include "packet-crmf-ett.c"
53 static const char *object_identifier_id;
55 #include "packet-crmf-fn.c"
58 /*--- proto_register_crmf ----------------------------------------------*/
59 void proto_register_crmf(void) {
62 static hf_register_info hf[] = {
64 { "Type", "crmf.type.oid",
65 FT_STRING, BASE_NONE, NULL, 0,
66 "Type of AttributeTypeAndValue", HFILL }},
67 #include "packet-crmf-hfarr.c"
70 /* List of subtrees */
71 static gint *ett[] = {
72 #include "packet-crmf-ettarr.c"
75 /* Register protocol */
76 proto_crmf = proto_register_protocol(PNAME, PSNAME, PFNAME);
78 /* Register fields and subtrees */
79 proto_register_field_array(proto_crmf, hf, array_length(hf));
80 proto_register_subtree_array(ett, array_length(ett));
85 /*--- proto_reg_handoff_crmf -------------------------------------------*/
86 void proto_reg_handoff_crmf(void) {
87 oid_add_from_string("id-pkip","1.3.6.1.5.5.7.5");
88 oid_add_from_string("id-regCtrl","1.3.6.1.5.5.7.5.1");
89 oid_add_from_string("id-regInfo","1.3.6.1.5.5.7.5.2");
90 #include "packet-crmf-dis-tab.c"