#include <string.h> and/or #include <stdio.h> not needed.
[obnox/wireshark/wip.git] / epan / dissectors / packet-h235.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* packet-h235.c                                                              */
4 /* ../../tools/asn2wrs.py -e -p h235 -c ./h235.cnf -s ./packet-h235-template -D . H235-SECURITY-MESSAGES.asn H235-SRTP.asn */
5
6 /* Input file: packet-h235-template.c */
7
8 #line 1 "packet-h235-template.c"
9 /* packet-h235.c
10  * Routines for H.235 packet dissection
11  * 2004  Tomas Kukosa
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32  */
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <glib.h>
39 #include <epan/packet.h>
40 #include <epan/oids.h>
41 #include <epan/asn1.h>
42
43 #include "packet-per.h"
44 #include "packet-h235.h"
45 #include "packet-h225.h"
46
47 #define PNAME  "H235-SECURITY-MESSAGES"
48 #define PSNAME "H.235"
49 #define PFNAME "h235"
50
51 #define OID_MIKEY         "0.0.8.235.0.3.76"
52 #define OID_MIKEY_PS      "0.0.8.235.0.3.72"
53 #define OID_MIKEY_DHHMAC  "0.0.8.235.0.3.73"
54 #define OID_MIKEY_PK_SIGN "0.0.8.235.0.3.74"
55 #define OID_MIKEY_DH_SIGN "0.0.8.235.0.3.75"
56 #define OID_TG            "0.0.8.235.0.3.70"
57 #define OID_SG            "0.0.8.235.0.3.71"
58
59 /* Initialize the protocol and registered fields */
60 static int proto_h235 = -1;
61
62 /*--- Included file: packet-h235-hf.c ---*/
63 #line 1 "packet-h235-hf.c"
64 static int hf_h235_SrtpCryptoCapability_PDU = -1;  /* SrtpCryptoCapability */
65 static int hf_h235_nonStandardIdentifier = -1;    /* OBJECT_IDENTIFIER */
66 static int hf_h235_data = -1;                     /* OCTET_STRING */
67 static int hf_h235_halfkey = -1;                  /* BIT_STRING_SIZE_0_2048 */
68 static int hf_h235_modSize = -1;                  /* BIT_STRING_SIZE_0_2048 */
69 static int hf_h235_generator = -1;                /* BIT_STRING_SIZE_0_2048 */
70 static int hf_h235_x = -1;                        /* BIT_STRING_SIZE_0_511 */
71 static int hf_h235_y = -1;                        /* BIT_STRING_SIZE_0_511 */
72 static int hf_h235_eckasdhp = -1;                 /* T_eckasdhp */
73 static int hf_h235_public_key = -1;               /* ECpoint */
74 static int hf_h235_modulus = -1;                  /* BIT_STRING_SIZE_0_511 */
75 static int hf_h235_base = -1;                     /* ECpoint */
76 static int hf_h235_weierstrassA = -1;             /* BIT_STRING_SIZE_0_511 */
77 static int hf_h235_weierstrassB = -1;             /* BIT_STRING_SIZE_0_511 */
78 static int hf_h235_eckasdh2 = -1;                 /* T_eckasdh2 */
79 static int hf_h235_fieldSize = -1;                /* BIT_STRING_SIZE_0_511 */
80 static int hf_h235_type = -1;                     /* OBJECT_IDENTIFIER */
81 static int hf_h235_certificatedata = -1;          /* OCTET_STRING */
82 static int hf_h235_default = -1;                  /* NULL */
83 static int hf_h235_radius = -1;                   /* NULL */
84 static int hf_h235_dhExch = -1;                   /* NULL */
85 static int hf_h235_pwdSymEnc = -1;                /* NULL */
86 static int hf_h235_pwdHash = -1;                  /* NULL */
87 static int hf_h235_certSign = -1;                 /* NULL */
88 static int hf_h235_ipsec = -1;                    /* NULL */
89 static int hf_h235_tls = -1;                      /* NULL */
90 static int hf_h235_nonStandard = -1;              /* NonStandardParameter */
91 static int hf_h235_authenticationBES = -1;        /* AuthenticationBES */
92 static int hf_h235_keyExch = -1;                  /* OBJECT_IDENTIFIER */
93 static int hf_h235_tokenOID = -1;                 /* OBJECT_IDENTIFIER */
94 static int hf_h235_timeStamp = -1;                /* TimeStamp */
95 static int hf_h235_password = -1;                 /* Password */
96 static int hf_h235_dhkey = -1;                    /* DHset */
97 static int hf_h235_challenge = -1;                /* ChallengeString */
98 static int hf_h235_random = -1;                   /* RandomVal */
99 static int hf_h235_certificate = -1;              /* TypedCertificate */
100 static int hf_h235_generalID = -1;                /* Identifier */
101 static int hf_h235_eckasdhkey = -1;               /* ECKASDH */
102 static int hf_h235_sendersID = -1;                /* Identifier */
103 static int hf_h235_h235Key = -1;                  /* H235Key */
104 static int hf_h235_profileInfo = -1;              /* SEQUENCE_OF_ProfileElement */
105 static int hf_h235_profileInfo_item = -1;         /* ProfileElement */
106 static int hf_h235_elementID = -1;                /* INTEGER_0_255 */
107 static int hf_h235_paramS = -1;                   /* Params */
108 static int hf_h235_element = -1;                  /* Element */
109 static int hf_h235_octets = -1;                   /* OCTET_STRING */
110 static int hf_h235_integer = -1;                  /* INTEGER */
111 static int hf_h235_bits = -1;                     /* BIT_STRING */
112 static int hf_h235_name = -1;                     /* BMPString */
113 static int hf_h235_flag = -1;                     /* BOOLEAN */
114 static int hf_h235_toBeSigned = -1;               /* ToBeSigned */
115 static int hf_h235_algorithmOID = -1;             /* OBJECT_IDENTIFIER */
116 static int hf_h235_signaturedata = -1;            /* BIT_STRING */
117 static int hf_h235_encryptedData = -1;            /* OCTET_STRING */
118 static int hf_h235_hash = -1;                     /* BIT_STRING */
119 static int hf_h235_ranInt = -1;                   /* INTEGER */
120 static int hf_h235_iv8 = -1;                      /* IV8 */
121 static int hf_h235_iv16 = -1;                     /* IV16 */
122 static int hf_h235_iv = -1;                       /* OCTET_STRING */
123 static int hf_h235_clearSalt = -1;                /* OCTET_STRING */
124 static int hf_h235_cryptoEncryptedToken = -1;     /* T_cryptoEncryptedToken */
125 static int hf_h235_encryptedToken = -1;           /* ENCRYPTED */
126 static int hf_h235_cryptoSignedToken = -1;        /* T_cryptoSignedToken */
127 static int hf_h235_signedToken = -1;              /* SIGNED */
128 static int hf_h235_cryptoHashedToken = -1;        /* T_cryptoHashedToken */
129 static int hf_h235_hashedVals = -1;               /* ClearToken */
130 static int hf_h235_hashedToken = -1;              /* HASHED */
131 static int hf_h235_cryptoPwdEncr = -1;            /* ENCRYPTED */
132 static int hf_h235_secureChannel = -1;            /* KeyMaterial */
133 static int hf_h235_sharedSecret = -1;             /* ENCRYPTED */
134 static int hf_h235_certProtectedKey = -1;         /* SIGNED */
135 static int hf_h235_secureSharedSecret = -1;       /* V3KeySyncMaterial */
136 static int hf_h235_encryptedSessionKey = -1;      /* OCTET_STRING */
137 static int hf_h235_encryptedSaltingKey = -1;      /* OCTET_STRING */
138 static int hf_h235_clearSaltingKey = -1;          /* OCTET_STRING */
139 static int hf_h235_paramSsalt = -1;               /* Params */
140 static int hf_h235_keyDerivationOID = -1;         /* OBJECT_IDENTIFIER */
141 static int hf_h235_genericKeyMaterial = -1;       /* OCTET_STRING */
142 static int hf_h235_SrtpCryptoCapability_item = -1;  /* SrtpCryptoInfo */
143 static int hf_h235_cryptoSuite = -1;              /* OBJECT_IDENTIFIER */
144 static int hf_h235_sessionParams = -1;            /* SrtpSessionParameters */
145 static int hf_h235_allowMKI = -1;                 /* BOOLEAN */
146 static int hf_h235_SrtpKeys_item = -1;            /* SrtpKeyParameters */
147 static int hf_h235_masterKey = -1;                /* OCTET_STRING */
148 static int hf_h235_masterSalt = -1;               /* OCTET_STRING */
149 static int hf_h235_lifetime = -1;                 /* T_lifetime */
150 static int hf_h235_powerOfTwo = -1;               /* INTEGER */
151 static int hf_h235_specific = -1;                 /* INTEGER */
152 static int hf_h235_mki = -1;                      /* T_mki */
153 static int hf_h235_length = -1;                   /* INTEGER_1_128 */
154 static int hf_h235_value = -1;                    /* OCTET_STRING */
155 static int hf_h235_kdr = -1;                      /* INTEGER_0_24 */
156 static int hf_h235_unencryptedSrtp = -1;          /* BOOLEAN */
157 static int hf_h235_unencryptedSrtcp = -1;         /* BOOLEAN */
158 static int hf_h235_unauthenticatedSrtp = -1;      /* BOOLEAN */
159 static int hf_h235_fecOrder = -1;                 /* FecOrder */
160 static int hf_h235_windowSizeHint = -1;           /* INTEGER_64_65535 */
161 static int hf_h235_newParameter = -1;             /* SEQUENCE_OF_GenericData */
162 static int hf_h235_newParameter_item = -1;        /* GenericData */
163 static int hf_h235_fecBeforeSrtp = -1;            /* NULL */
164 static int hf_h235_fecAfterSrtp = -1;             /* NULL */
165
166 /*--- End of included file: packet-h235-hf.c ---*/
167 #line 54 "packet-h235-template.c"
168
169 /* Initialize the subtree pointers */
170
171 /*--- Included file: packet-h235-ett.c ---*/
172 #line 1 "packet-h235-ett.c"
173 static gint ett_h235_NonStandardParameter = -1;
174 static gint ett_h235_DHset = -1;
175 static gint ett_h235_ECpoint = -1;
176 static gint ett_h235_ECKASDH = -1;
177 static gint ett_h235_T_eckasdhp = -1;
178 static gint ett_h235_T_eckasdh2 = -1;
179 static gint ett_h235_TypedCertificate = -1;
180 static gint ett_h235_AuthenticationBES = -1;
181 static gint ett_h235_AuthenticationMechanism = -1;
182 static gint ett_h235_ClearToken = -1;
183 static gint ett_h235_SEQUENCE_OF_ProfileElement = -1;
184 static gint ett_h235_ProfileElement = -1;
185 static gint ett_h235_Element = -1;
186 static gint ett_h235_SIGNED = -1;
187 static gint ett_h235_ENCRYPTED = -1;
188 static gint ett_h235_HASHED = -1;
189 static gint ett_h235_Params = -1;
190 static gint ett_h235_CryptoToken = -1;
191 static gint ett_h235_T_cryptoEncryptedToken = -1;
192 static gint ett_h235_T_cryptoSignedToken = -1;
193 static gint ett_h235_T_cryptoHashedToken = -1;
194 static gint ett_h235_H235Key = -1;
195 static gint ett_h235_V3KeySyncMaterial = -1;
196 static gint ett_h235_SrtpCryptoCapability = -1;
197 static gint ett_h235_SrtpCryptoInfo = -1;
198 static gint ett_h235_SrtpKeys = -1;
199 static gint ett_h235_SrtpKeyParameters = -1;
200 static gint ett_h235_T_lifetime = -1;
201 static gint ett_h235_T_mki = -1;
202 static gint ett_h235_SrtpSessionParameters = -1;
203 static gint ett_h235_SEQUENCE_OF_GenericData = -1;
204 static gint ett_h235_FecOrder = -1;
205
206 /*--- End of included file: packet-h235-ett.c ---*/
207 #line 57 "packet-h235-template.c"
208
209
210 static int
211 dissect_xxx_ToBeSigned(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
212 PER_NOT_DECODED_YET("ToBeSigned");
213   return offset;
214 }
215
216
217 /*--- Included file: packet-h235-fn.c ---*/
218 #line 1 "packet-h235-fn.c"
219
220
221 static int
222 dissect_h235_ChallengeString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
223   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
224                                        8, 128, FALSE, NULL);
225
226   return offset;
227 }
228
229
230
231 int
232 dissect_h235_TimeStamp(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
233   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
234                                                             1U, 4294967295U, NULL, FALSE);
235
236   return offset;
237 }
238
239
240
241 static int
242 dissect_h235_RandomVal(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
243   offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, NULL);
244
245   return offset;
246 }
247
248
249
250 static int
251 dissect_h235_Password(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
252   offset = dissect_per_BMPString(tvb, offset, actx, tree, hf_index,
253                                           1, 128, FALSE);
254
255   return offset;
256 }
257
258
259
260 static int
261 dissect_h235_Identifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
262   offset = dissect_per_BMPString(tvb, offset, actx, tree, hf_index,
263                                           1, 128, FALSE);
264
265   return offset;
266 }
267
268
269
270 static int
271 dissect_h235_KeyMaterial(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
272   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
273                                      1, 2048, FALSE, NULL);
274
275   return offset;
276 }
277
278
279
280 static int
281 dissect_h235_OBJECT_IDENTIFIER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
282   offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
283
284   return offset;
285 }
286
287
288
289 static int
290 dissect_h235_OCTET_STRING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
291   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
292                                        NO_BOUND, NO_BOUND, FALSE, NULL);
293
294   return offset;
295 }
296
297
298 static const per_sequence_t NonStandardParameter_sequence[] = {
299   { &hf_h235_nonStandardIdentifier, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
300   { &hf_h235_data           , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING },
301   { NULL, 0, 0, NULL }
302 };
303
304 static int
305 dissect_h235_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
306   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
307                                    ett_h235_NonStandardParameter, NonStandardParameter_sequence);
308
309   return offset;
310 }
311
312
313
314 static int
315 dissect_h235_BIT_STRING_SIZE_0_2048(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
316   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
317                                      0, 2048, FALSE, NULL);
318
319   return offset;
320 }
321
322
323 static const per_sequence_t DHset_sequence[] = {
324   { &hf_h235_halfkey        , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_2048 },
325   { &hf_h235_modSize        , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_2048 },
326   { &hf_h235_generator      , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_2048 },
327   { NULL, 0, 0, NULL }
328 };
329
330 static int
331 dissect_h235_DHset(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
332   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
333                                    ett_h235_DHset, DHset_sequence);
334
335   return offset;
336 }
337
338
339
340 static int
341 dissect_h235_BIT_STRING_SIZE_0_511(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
342   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
343                                      0, 511, FALSE, NULL);
344
345   return offset;
346 }
347
348
349 static const per_sequence_t ECpoint_sequence[] = {
350   { &hf_h235_x              , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_BIT_STRING_SIZE_0_511 },
351   { &hf_h235_y              , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_BIT_STRING_SIZE_0_511 },
352   { NULL, 0, 0, NULL }
353 };
354
355 static int
356 dissect_h235_ECpoint(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
357   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
358                                    ett_h235_ECpoint, ECpoint_sequence);
359
360   return offset;
361 }
362
363
364 static const per_sequence_t T_eckasdhp_sequence[] = {
365   { &hf_h235_public_key     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ECpoint },
366   { &hf_h235_modulus        , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_511 },
367   { &hf_h235_base           , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ECpoint },
368   { &hf_h235_weierstrassA   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_511 },
369   { &hf_h235_weierstrassB   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_511 },
370   { NULL, 0, 0, NULL }
371 };
372
373 static int
374 dissect_h235_T_eckasdhp(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
375   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
376                                    ett_h235_T_eckasdhp, T_eckasdhp_sequence);
377
378   return offset;
379 }
380
381
382 static const per_sequence_t T_eckasdh2_sequence[] = {
383   { &hf_h235_public_key     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ECpoint },
384   { &hf_h235_fieldSize      , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_511 },
385   { &hf_h235_base           , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ECpoint },
386   { &hf_h235_weierstrassA   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_511 },
387   { &hf_h235_weierstrassB   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING_SIZE_0_511 },
388   { NULL, 0, 0, NULL }
389 };
390
391 static int
392 dissect_h235_T_eckasdh2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
393   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
394                                    ett_h235_T_eckasdh2, T_eckasdh2_sequence);
395
396   return offset;
397 }
398
399
400 static const value_string h235_ECKASDH_vals[] = {
401   {   0, "eckasdhp" },
402   {   1, "eckasdh2" },
403   { 0, NULL }
404 };
405
406 static const per_choice_t ECKASDH_choice[] = {
407   {   0, &hf_h235_eckasdhp       , ASN1_EXTENSION_ROOT    , dissect_h235_T_eckasdhp },
408   {   1, &hf_h235_eckasdh2       , ASN1_EXTENSION_ROOT    , dissect_h235_T_eckasdh2 },
409   { 0, NULL, 0, NULL }
410 };
411
412 static int
413 dissect_h235_ECKASDH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
414   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
415                                  ett_h235_ECKASDH, ECKASDH_choice,
416                                  NULL);
417
418   return offset;
419 }
420
421
422 static const per_sequence_t TypedCertificate_sequence[] = {
423   { &hf_h235_type           , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
424   { &hf_h235_certificatedata, ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING },
425   { NULL, 0, 0, NULL }
426 };
427
428 static int
429 dissect_h235_TypedCertificate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
430   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
431                                    ett_h235_TypedCertificate, TypedCertificate_sequence);
432
433   return offset;
434 }
435
436
437
438 static int
439 dissect_h235_NULL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
440   offset = dissect_per_null(tvb, offset, actx, tree, hf_index);
441
442   return offset;
443 }
444
445
446 static const value_string h235_AuthenticationBES_vals[] = {
447   {   0, "default" },
448   {   1, "radius" },
449   { 0, NULL }
450 };
451
452 static const per_choice_t AuthenticationBES_choice[] = {
453   {   0, &hf_h235_default        , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
454   {   1, &hf_h235_radius         , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
455   { 0, NULL, 0, NULL }
456 };
457
458 static int
459 dissect_h235_AuthenticationBES(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
460   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
461                                  ett_h235_AuthenticationBES, AuthenticationBES_choice,
462                                  NULL);
463
464   return offset;
465 }
466
467
468 const value_string h235_AuthenticationMechanism_vals[] = {
469   {   0, "dhExch" },
470   {   1, "pwdSymEnc" },
471   {   2, "pwdHash" },
472   {   3, "certSign" },
473   {   4, "ipsec" },
474   {   5, "tls" },
475   {   6, "nonStandard" },
476   {   7, "authenticationBES" },
477   {   8, "keyExch" },
478   { 0, NULL }
479 };
480
481 static const per_choice_t AuthenticationMechanism_choice[] = {
482   {   0, &hf_h235_dhExch         , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
483   {   1, &hf_h235_pwdSymEnc      , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
484   {   2, &hf_h235_pwdHash        , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
485   {   3, &hf_h235_certSign       , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
486   {   4, &hf_h235_ipsec          , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
487   {   5, &hf_h235_tls            , ASN1_EXTENSION_ROOT    , dissect_h235_NULL },
488   {   6, &hf_h235_nonStandard    , ASN1_EXTENSION_ROOT    , dissect_h235_NonStandardParameter },
489   {   7, &hf_h235_authenticationBES, ASN1_NOT_EXTENSION_ROOT, dissect_h235_AuthenticationBES },
490   {   8, &hf_h235_keyExch        , ASN1_NOT_EXTENSION_ROOT, dissect_h235_OBJECT_IDENTIFIER },
491   { 0, NULL, 0, NULL }
492 };
493
494 int
495 dissect_h235_AuthenticationMechanism(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
496   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
497                                  ett_h235_AuthenticationMechanism, AuthenticationMechanism_choice,
498                                  NULL);
499
500   return offset;
501 }
502
503
504
505 static int
506 dissect_h235_INTEGER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
507   offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, NULL);
508
509   return offset;
510 }
511
512
513
514 static int
515 dissect_h235_IV8(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
516   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
517                                        8, 8, FALSE, NULL);
518
519   return offset;
520 }
521
522
523
524 static int
525 dissect_h235_IV16(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
526   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
527                                        16, 16, FALSE, NULL);
528
529   return offset;
530 }
531
532
533 static const per_sequence_t Params_sequence[] = {
534   { &hf_h235_ranInt         , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_INTEGER },
535   { &hf_h235_iv8            , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_IV8 },
536   { &hf_h235_iv16           , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_IV16 },
537   { &hf_h235_iv             , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_OCTET_STRING },
538   { &hf_h235_clearSalt      , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_OCTET_STRING },
539   { NULL, 0, 0, NULL }
540 };
541
542 static int
543 dissect_h235_Params(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
544   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
545                                    ett_h235_Params, Params_sequence);
546
547   return offset;
548 }
549
550
551 static const per_sequence_t ENCRYPTED_sequence[] = {
552   { &hf_h235_algorithmOID   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
553   { &hf_h235_paramS         , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_Params },
554   { &hf_h235_encryptedData  , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING },
555   { NULL, 0, 0, NULL }
556 };
557
558 int
559 dissect_h235_ENCRYPTED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
560 #line 65 "h235.cnf"
561   proto_item  *hidden_item;
562   hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, FALSE);
563   PROTO_ITEM_SET_HIDDEN(hidden_item);
564
565   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
566                                    ett_h235_ENCRYPTED, ENCRYPTED_sequence);
567
568   return offset;
569 }
570
571
572
573 static int
574 dissect_h235_BIT_STRING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
575   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
576                                      NO_BOUND, NO_BOUND, FALSE, NULL);
577
578   return offset;
579 }
580
581
582 static const per_sequence_t SIGNED_sequence[] = {
583   { &hf_h235_toBeSigned     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_xxx_ToBeSigned },
584   { &hf_h235_algorithmOID   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
585   { &hf_h235_paramS         , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_Params },
586   { &hf_h235_signaturedata  , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING },
587   { NULL, 0, 0, NULL }
588 };
589
590 int
591 dissect_h235_SIGNED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
592 #line 60 "h235.cnf"
593   proto_item  *hidden_item;
594   hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, FALSE);
595   PROTO_ITEM_SET_HIDDEN(hidden_item);
596
597   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
598                                    ett_h235_SIGNED, SIGNED_sequence);
599
600   return offset;
601 }
602
603
604 static const per_sequence_t V3KeySyncMaterial_sequence[] = {
605   { &hf_h235_generalID      , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_Identifier },
606   { &hf_h235_algorithmOID   , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_OBJECT_IDENTIFIER },
607   { &hf_h235_paramS         , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_Params },
608   { &hf_h235_encryptedSessionKey, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_OCTET_STRING },
609   { &hf_h235_encryptedSaltingKey, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_OCTET_STRING },
610   { &hf_h235_clearSaltingKey, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_OCTET_STRING },
611   { &hf_h235_paramSsalt     , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_Params },
612   { &hf_h235_keyDerivationOID, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_OBJECT_IDENTIFIER },
613   { &hf_h235_genericKeyMaterial, ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_OCTET_STRING },
614   { NULL, 0, 0, NULL }
615 };
616
617 static int
618 dissect_h235_V3KeySyncMaterial(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
619   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
620                                    ett_h235_V3KeySyncMaterial, V3KeySyncMaterial_sequence);
621
622   return offset;
623 }
624
625
626 static const value_string h235_H235Key_vals[] = {
627   {   0, "secureChannel" },
628   {   1, "sharedSecret" },
629   {   2, "certProtectedKey" },
630   {   3, "secureSharedSecret" },
631   { 0, NULL }
632 };
633
634 static const per_choice_t H235Key_choice[] = {
635   {   0, &hf_h235_secureChannel  , ASN1_EXTENSION_ROOT    , dissect_h235_KeyMaterial },
636   {   1, &hf_h235_sharedSecret   , ASN1_EXTENSION_ROOT    , dissect_h235_ENCRYPTED },
637   {   2, &hf_h235_certProtectedKey, ASN1_EXTENSION_ROOT    , dissect_h235_SIGNED },
638   {   3, &hf_h235_secureSharedSecret, ASN1_NOT_EXTENSION_ROOT, dissect_h235_V3KeySyncMaterial },
639   { 0, NULL, 0, NULL }
640 };
641
642 static int
643 dissect_h235_H235Key(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
644   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
645                                  ett_h235_H235Key, H235Key_choice,
646                                  NULL);
647
648   return offset;
649 }
650
651
652
653 static int
654 dissect_h235_INTEGER_0_255(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
655   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
656                                                             0U, 255U, NULL, FALSE);
657
658   return offset;
659 }
660
661
662
663 static int
664 dissect_h235_BMPString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
665   offset = dissect_per_BMPString(tvb, offset, actx, tree, hf_index,
666                                           NO_BOUND, NO_BOUND, FALSE);
667
668   return offset;
669 }
670
671
672
673 static int
674 dissect_h235_BOOLEAN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
675   offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, NULL);
676
677   return offset;
678 }
679
680
681 static const value_string h235_Element_vals[] = {
682   {   0, "octets" },
683   {   1, "integer" },
684   {   2, "bits" },
685   {   3, "name" },
686   {   4, "flag" },
687   { 0, NULL }
688 };
689
690 static const per_choice_t Element_choice[] = {
691   {   0, &hf_h235_octets         , ASN1_EXTENSION_ROOT    , dissect_h235_OCTET_STRING },
692   {   1, &hf_h235_integer        , ASN1_EXTENSION_ROOT    , dissect_h235_INTEGER },
693   {   2, &hf_h235_bits           , ASN1_EXTENSION_ROOT    , dissect_h235_BIT_STRING },
694   {   3, &hf_h235_name           , ASN1_EXTENSION_ROOT    , dissect_h235_BMPString },
695   {   4, &hf_h235_flag           , ASN1_EXTENSION_ROOT    , dissect_h235_BOOLEAN },
696   { 0, NULL, 0, NULL }
697 };
698
699 static int
700 dissect_h235_Element(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
701   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
702                                  ett_h235_Element, Element_choice,
703                                  NULL);
704
705   return offset;
706 }
707
708
709 static const per_sequence_t ProfileElement_sequence[] = {
710   { &hf_h235_elementID      , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_INTEGER_0_255 },
711   { &hf_h235_paramS         , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_Params },
712   { &hf_h235_element        , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_Element },
713   { NULL, 0, 0, NULL }
714 };
715
716 static int
717 dissect_h235_ProfileElement(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
718   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
719                                    ett_h235_ProfileElement, ProfileElement_sequence);
720
721   return offset;
722 }
723
724
725 static const per_sequence_t SEQUENCE_OF_ProfileElement_sequence_of[1] = {
726   { &hf_h235_profileInfo_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ProfileElement },
727 };
728
729 static int
730 dissect_h235_SEQUENCE_OF_ProfileElement(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
731   offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
732                                       ett_h235_SEQUENCE_OF_ProfileElement, SEQUENCE_OF_ProfileElement_sequence_of);
733
734   return offset;
735 }
736
737
738 static const per_sequence_t ClearToken_sequence[] = {
739   { &hf_h235_tokenOID       , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
740   { &hf_h235_timeStamp      , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_TimeStamp },
741   { &hf_h235_password       , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_Password },
742   { &hf_h235_dhkey          , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_DHset },
743   { &hf_h235_challenge      , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_ChallengeString },
744   { &hf_h235_random         , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_RandomVal },
745   { &hf_h235_certificate    , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_TypedCertificate },
746   { &hf_h235_generalID      , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_Identifier },
747   { &hf_h235_nonStandard    , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_NonStandardParameter },
748   { &hf_h235_eckasdhkey     , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_ECKASDH },
749   { &hf_h235_sendersID      , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_Identifier },
750   { &hf_h235_h235Key        , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_H235Key },
751   { &hf_h235_profileInfo    , ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL    , dissect_h235_SEQUENCE_OF_ProfileElement },
752   { NULL, 0, 0, NULL }
753 };
754
755 int
756 dissect_h235_ClearToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
757 #line 76 "h235.cnf"
758   proto_item  *hidden_item;
759   hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, FALSE);
760   PROTO_ITEM_SET_HIDDEN(hidden_item);
761
762   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
763                                    ett_h235_ClearToken, ClearToken_sequence);
764
765   return offset;
766 }
767
768
769 static const per_sequence_t HASHED_sequence[] = {
770   { &hf_h235_algorithmOID   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
771   { &hf_h235_paramS         , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_Params },
772   { &hf_h235_hash           , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_BIT_STRING },
773   { NULL, 0, 0, NULL }
774 };
775
776 int
777 dissect_h235_HASHED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
778 #line 70 "h235.cnf"
779   proto_item  *hidden_item;
780   hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, FALSE);
781   PROTO_ITEM_SET_HIDDEN(hidden_item);
782
783   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
784                                    ett_h235_HASHED, HASHED_sequence);
785
786   return offset;
787 }
788
789
790 static const per_sequence_t T_cryptoEncryptedToken_sequence[] = {
791   { &hf_h235_tokenOID       , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
792   { &hf_h235_encryptedToken , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ENCRYPTED },
793   { NULL, 0, 0, NULL }
794 };
795
796 static int
797 dissect_h235_T_cryptoEncryptedToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
798   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
799                                    ett_h235_T_cryptoEncryptedToken, T_cryptoEncryptedToken_sequence);
800
801   return offset;
802 }
803
804
805 static const per_sequence_t T_cryptoSignedToken_sequence[] = {
806   { &hf_h235_tokenOID       , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
807   { &hf_h235_signedToken    , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_SIGNED },
808   { NULL, 0, 0, NULL }
809 };
810
811 static int
812 dissect_h235_T_cryptoSignedToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
813   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
814                                    ett_h235_T_cryptoSignedToken, T_cryptoSignedToken_sequence);
815
816   return offset;
817 }
818
819
820 static const per_sequence_t T_cryptoHashedToken_sequence[] = {
821   { &hf_h235_tokenOID       , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_OBJECT_IDENTIFIER },
822   { &hf_h235_hashedVals     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_ClearToken },
823   { &hf_h235_hashedToken    , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_HASHED },
824   { NULL, 0, 0, NULL }
825 };
826
827 static int
828 dissect_h235_T_cryptoHashedToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
829   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
830                                    ett_h235_T_cryptoHashedToken, T_cryptoHashedToken_sequence);
831
832   return offset;
833 }
834
835
836 const value_string h235_CryptoToken_vals[] = {
837   {   0, "cryptoEncryptedToken" },
838   {   1, "cryptoSignedToken" },
839   {   2, "cryptoHashedToken" },
840   {   3, "cryptoPwdEncr" },
841   { 0, NULL }
842 };
843
844 static const per_choice_t CryptoToken_choice[] = {
845   {   0, &hf_h235_cryptoEncryptedToken, ASN1_EXTENSION_ROOT    , dissect_h235_T_cryptoEncryptedToken },
846   {   1, &hf_h235_cryptoSignedToken, ASN1_EXTENSION_ROOT    , dissect_h235_T_cryptoSignedToken },
847   {   2, &hf_h235_cryptoHashedToken, ASN1_EXTENSION_ROOT    , dissect_h235_T_cryptoHashedToken },
848   {   3, &hf_h235_cryptoPwdEncr  , ASN1_EXTENSION_ROOT    , dissect_h235_ENCRYPTED },
849   { 0, NULL, 0, NULL }
850 };
851
852 int
853 dissect_h235_CryptoToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
854 #line 82 "h235.cnf"
855   proto_item  *hidden_item;
856   hidden_item = proto_tree_add_item(tree, proto_h235, tvb, offset, 0, FALSE);
857   PROTO_ITEM_SET_HIDDEN(hidden_item);
858
859   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
860                                  ett_h235_CryptoToken, CryptoToken_choice,
861                                  NULL);
862
863   return offset;
864 }
865
866
867
868 static int
869 dissect_h235_INTEGER_0_24(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
870   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
871                                                             0U, 24U, NULL, FALSE);
872
873   return offset;
874 }
875
876
877 static const per_sequence_t FecOrder_sequence[] = {
878   { &hf_h235_fecBeforeSrtp  , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_NULL },
879   { &hf_h235_fecAfterSrtp   , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_NULL },
880   { NULL, 0, 0, NULL }
881 };
882
883 static int
884 dissect_h235_FecOrder(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
885   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
886                                    ett_h235_FecOrder, FecOrder_sequence);
887
888   return offset;
889 }
890
891
892
893 static int
894 dissect_h235_INTEGER_64_65535(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
895   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
896                                                             64U, 65535U, NULL, FALSE);
897
898   return offset;
899 }
900
901
902 static const per_sequence_t SEQUENCE_OF_GenericData_sequence_of[1] = {
903   { &hf_h235_newParameter_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h225_GenericData },
904 };
905
906 static int
907 dissect_h235_SEQUENCE_OF_GenericData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
908   offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
909                                       ett_h235_SEQUENCE_OF_GenericData, SEQUENCE_OF_GenericData_sequence_of);
910
911   return offset;
912 }
913
914
915 static const per_sequence_t SrtpSessionParameters_sequence[] = {
916   { &hf_h235_kdr            , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_INTEGER_0_24 },
917   { &hf_h235_unencryptedSrtp, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_BOOLEAN },
918   { &hf_h235_unencryptedSrtcp, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_BOOLEAN },
919   { &hf_h235_unauthenticatedSrtp, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_BOOLEAN },
920   { &hf_h235_fecOrder       , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_FecOrder },
921   { &hf_h235_windowSizeHint , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_INTEGER_64_65535 },
922   { &hf_h235_newParameter   , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_SEQUENCE_OF_GenericData },
923   { NULL, 0, 0, NULL }
924 };
925
926 static int
927 dissect_h235_SrtpSessionParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
928   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
929                                    ett_h235_SrtpSessionParameters, SrtpSessionParameters_sequence);
930
931   return offset;
932 }
933
934
935 static const per_sequence_t SrtpCryptoInfo_sequence[] = {
936   { &hf_h235_cryptoSuite    , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_OBJECT_IDENTIFIER },
937   { &hf_h235_sessionParams  , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_SrtpSessionParameters },
938   { &hf_h235_allowMKI       , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_BOOLEAN },
939   { NULL, 0, 0, NULL }
940 };
941
942 static int
943 dissect_h235_SrtpCryptoInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
944   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
945                                    ett_h235_SrtpCryptoInfo, SrtpCryptoInfo_sequence);
946
947   return offset;
948 }
949
950
951 static const per_sequence_t SrtpCryptoCapability_sequence_of[1] = {
952   { &hf_h235_SrtpCryptoCapability_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_SrtpCryptoInfo },
953 };
954
955 static int
956 dissect_h235_SrtpCryptoCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
957   offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
958                                       ett_h235_SrtpCryptoCapability, SrtpCryptoCapability_sequence_of);
959
960   return offset;
961 }
962
963
964 static const value_string h235_T_lifetime_vals[] = {
965   {   0, "powerOfTwo" },
966   {   1, "specific" },
967   { 0, NULL }
968 };
969
970 static const per_choice_t T_lifetime_choice[] = {
971   {   0, &hf_h235_powerOfTwo     , ASN1_EXTENSION_ROOT    , dissect_h235_INTEGER },
972   {   1, &hf_h235_specific       , ASN1_EXTENSION_ROOT    , dissect_h235_INTEGER },
973   { 0, NULL, 0, NULL }
974 };
975
976 static int
977 dissect_h235_T_lifetime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
978   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
979                                  ett_h235_T_lifetime, T_lifetime_choice,
980                                  NULL);
981
982   return offset;
983 }
984
985
986
987 static int
988 dissect_h235_INTEGER_1_128(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
989   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
990                                                             1U, 128U, NULL, FALSE);
991
992   return offset;
993 }
994
995
996 static const per_sequence_t T_mki_sequence[] = {
997   { &hf_h235_length         , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_INTEGER_1_128 },
998   { &hf_h235_value          , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING },
999   { NULL, 0, 0, NULL }
1000 };
1001
1002 static int
1003 dissect_h235_T_mki(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1004   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1005                                    ett_h235_T_mki, T_mki_sequence);
1006
1007   return offset;
1008 }
1009
1010
1011 static const per_sequence_t SrtpKeyParameters_sequence[] = {
1012   { &hf_h235_masterKey      , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING },
1013   { &hf_h235_masterSalt     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING },
1014   { &hf_h235_lifetime       , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_T_lifetime },
1015   { &hf_h235_mki            , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_h235_T_mki },
1016   { NULL, 0, 0, NULL }
1017 };
1018
1019 static int
1020 dissect_h235_SrtpKeyParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1021   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1022                                    ett_h235_SrtpKeyParameters, SrtpKeyParameters_sequence);
1023
1024   return offset;
1025 }
1026
1027
1028 static const per_sequence_t SrtpKeys_sequence_of[1] = {
1029   { &hf_h235_SrtpKeys_item  , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_h235_SrtpKeyParameters },
1030 };
1031
1032 int
1033 dissect_h235_SrtpKeys(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1034   offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index,
1035                                       ett_h235_SrtpKeys, SrtpKeys_sequence_of);
1036
1037   return offset;
1038 }
1039
1040 /*--- PDUs ---*/
1041
1042 static int dissect_SrtpCryptoCapability_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1043   int offset = 0;
1044   asn1_ctx_t asn1_ctx;
1045   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1046   offset = dissect_h235_SrtpCryptoCapability(tvb, offset, &asn1_ctx, tree, hf_h235_SrtpCryptoCapability_PDU);
1047   offset += 7; offset >>= 3;
1048   return offset;
1049 }
1050
1051
1052 /*--- End of included file: packet-h235-fn.c ---*/
1053 #line 66 "packet-h235-template.c"
1054
1055
1056 /*--- proto_register_h235 ----------------------------------------------*/
1057 void proto_register_h235(void) {
1058
1059   /* List of fields */
1060   static hf_register_info hf[] = {
1061
1062 /*--- Included file: packet-h235-hfarr.c ---*/
1063 #line 1 "packet-h235-hfarr.c"
1064     { &hf_h235_SrtpCryptoCapability_PDU,
1065       { "SrtpCryptoCapability", "h235.SrtpCryptoCapability",
1066         FT_UINT32, BASE_DEC, NULL, 0,
1067         "h235.SrtpCryptoCapability", HFILL }},
1068     { &hf_h235_nonStandardIdentifier,
1069       { "nonStandardIdentifier", "h235.nonStandardIdentifier",
1070         FT_OID, BASE_NONE, NULL, 0,
1071         "h235.OBJECT_IDENTIFIER", HFILL }},
1072     { &hf_h235_data,
1073       { "data", "h235.data",
1074         FT_UINT32, BASE_DEC, NULL, 0,
1075         "h235.OCTET_STRING", HFILL }},
1076     { &hf_h235_halfkey,
1077       { "halfkey", "h235.halfkey",
1078         FT_BYTES, BASE_NONE, NULL, 0,
1079         "h235.BIT_STRING_SIZE_0_2048", HFILL }},
1080     { &hf_h235_modSize,
1081       { "modSize", "h235.modSize",
1082         FT_BYTES, BASE_NONE, NULL, 0,
1083         "h235.BIT_STRING_SIZE_0_2048", HFILL }},
1084     { &hf_h235_generator,
1085       { "generator", "h235.generator",
1086         FT_BYTES, BASE_NONE, NULL, 0,
1087         "h235.BIT_STRING_SIZE_0_2048", HFILL }},
1088     { &hf_h235_x,
1089       { "x", "h235.x",
1090         FT_BYTES, BASE_NONE, NULL, 0,
1091         "h235.BIT_STRING_SIZE_0_511", HFILL }},
1092     { &hf_h235_y,
1093       { "y", "h235.y",
1094         FT_BYTES, BASE_NONE, NULL, 0,
1095         "h235.BIT_STRING_SIZE_0_511", HFILL }},
1096     { &hf_h235_eckasdhp,
1097       { "eckasdhp", "h235.eckasdhp",
1098         FT_NONE, BASE_NONE, NULL, 0,
1099         "h235.T_eckasdhp", HFILL }},
1100     { &hf_h235_public_key,
1101       { "public-key", "h235.public_key",
1102         FT_NONE, BASE_NONE, NULL, 0,
1103         "h235.ECpoint", HFILL }},
1104     { &hf_h235_modulus,
1105       { "modulus", "h235.modulus",
1106         FT_BYTES, BASE_NONE, NULL, 0,
1107         "h235.BIT_STRING_SIZE_0_511", HFILL }},
1108     { &hf_h235_base,
1109       { "base", "h235.base",
1110         FT_NONE, BASE_NONE, NULL, 0,
1111         "h235.ECpoint", HFILL }},
1112     { &hf_h235_weierstrassA,
1113       { "weierstrassA", "h235.weierstrassA",
1114         FT_BYTES, BASE_NONE, NULL, 0,
1115         "h235.BIT_STRING_SIZE_0_511", HFILL }},
1116     { &hf_h235_weierstrassB,
1117       { "weierstrassB", "h235.weierstrassB",
1118         FT_BYTES, BASE_NONE, NULL, 0,
1119         "h235.BIT_STRING_SIZE_0_511", HFILL }},
1120     { &hf_h235_eckasdh2,
1121       { "eckasdh2", "h235.eckasdh2",
1122         FT_NONE, BASE_NONE, NULL, 0,
1123         "h235.T_eckasdh2", HFILL }},
1124     { &hf_h235_fieldSize,
1125       { "fieldSize", "h235.fieldSize",
1126         FT_BYTES, BASE_NONE, NULL, 0,
1127         "h235.BIT_STRING_SIZE_0_511", HFILL }},
1128     { &hf_h235_type,
1129       { "type", "h235.type",
1130         FT_OID, BASE_NONE, NULL, 0,
1131         "h235.OBJECT_IDENTIFIER", HFILL }},
1132     { &hf_h235_certificatedata,
1133       { "certificate", "h235.certificate",
1134         FT_BYTES, BASE_NONE, NULL, 0,
1135         "h235.OCTET_STRING", HFILL }},
1136     { &hf_h235_default,
1137       { "default", "h235.default",
1138         FT_NONE, BASE_NONE, NULL, 0,
1139         "h235.NULL", HFILL }},
1140     { &hf_h235_radius,
1141       { "radius", "h235.radius",
1142         FT_NONE, BASE_NONE, NULL, 0,
1143         "h235.NULL", HFILL }},
1144     { &hf_h235_dhExch,
1145       { "dhExch", "h235.dhExch",
1146         FT_NONE, BASE_NONE, NULL, 0,
1147         "h235.NULL", HFILL }},
1148     { &hf_h235_pwdSymEnc,
1149       { "pwdSymEnc", "h235.pwdSymEnc",
1150         FT_NONE, BASE_NONE, NULL, 0,
1151         "h235.NULL", HFILL }},
1152     { &hf_h235_pwdHash,
1153       { "pwdHash", "h235.pwdHash",
1154         FT_NONE, BASE_NONE, NULL, 0,
1155         "h235.NULL", HFILL }},
1156     { &hf_h235_certSign,
1157       { "certSign", "h235.certSign",
1158         FT_NONE, BASE_NONE, NULL, 0,
1159         "h235.NULL", HFILL }},
1160     { &hf_h235_ipsec,
1161       { "ipsec", "h235.ipsec",
1162         FT_NONE, BASE_NONE, NULL, 0,
1163         "h235.NULL", HFILL }},
1164     { &hf_h235_tls,
1165       { "tls", "h235.tls",
1166         FT_NONE, BASE_NONE, NULL, 0,
1167         "h235.NULL", HFILL }},
1168     { &hf_h235_nonStandard,
1169       { "nonStandard", "h235.nonStandard",
1170         FT_NONE, BASE_NONE, NULL, 0,
1171         "h235.NonStandardParameter", HFILL }},
1172     { &hf_h235_authenticationBES,
1173       { "authenticationBES", "h235.authenticationBES",
1174         FT_UINT32, BASE_DEC, VALS(h235_AuthenticationBES_vals), 0,
1175         "h235.AuthenticationBES", HFILL }},
1176     { &hf_h235_keyExch,
1177       { "keyExch", "h235.keyExch",
1178         FT_OID, BASE_NONE, NULL, 0,
1179         "h235.OBJECT_IDENTIFIER", HFILL }},
1180     { &hf_h235_tokenOID,
1181       { "tokenOID", "h235.tokenOID",
1182         FT_OID, BASE_NONE, NULL, 0,
1183         "h235.OBJECT_IDENTIFIER", HFILL }},
1184     { &hf_h235_timeStamp,
1185       { "timeStamp", "h235.timeStamp",
1186         FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
1187         "h235.TimeStamp", HFILL }},
1188     { &hf_h235_password,
1189       { "password", "h235.password",
1190         FT_STRING, BASE_NONE, NULL, 0,
1191         "h235.Password", HFILL }},
1192     { &hf_h235_dhkey,
1193       { "dhkey", "h235.dhkey",
1194         FT_NONE, BASE_NONE, NULL, 0,
1195         "h235.DHset", HFILL }},
1196     { &hf_h235_challenge,
1197       { "challenge", "h235.challenge",
1198         FT_BYTES, BASE_NONE, NULL, 0,
1199         "h235.ChallengeString", HFILL }},
1200     { &hf_h235_random,
1201       { "random", "h235.random",
1202         FT_INT32, BASE_DEC, NULL, 0,
1203         "h235.RandomVal", HFILL }},
1204     { &hf_h235_certificate,
1205       { "certificate", "h235.certificate",
1206         FT_NONE, BASE_NONE, NULL, 0,
1207         "h235.TypedCertificate", HFILL }},
1208     { &hf_h235_generalID,
1209       { "generalID", "h235.generalID",
1210         FT_STRING, BASE_NONE, NULL, 0,
1211         "h235.Identifier", HFILL }},
1212     { &hf_h235_eckasdhkey,
1213       { "eckasdhkey", "h235.eckasdhkey",
1214         FT_UINT32, BASE_DEC, VALS(h235_ECKASDH_vals), 0,
1215         "h235.ECKASDH", HFILL }},
1216     { &hf_h235_sendersID,
1217       { "sendersID", "h235.sendersID",
1218         FT_STRING, BASE_NONE, NULL, 0,
1219         "h235.Identifier", HFILL }},
1220     { &hf_h235_h235Key,
1221       { "h235Key", "h235.h235Key",
1222         FT_UINT32, BASE_DEC, VALS(h235_H235Key_vals), 0,
1223         "h235.H235Key", HFILL }},
1224     { &hf_h235_profileInfo,
1225       { "profileInfo", "h235.profileInfo",
1226         FT_UINT32, BASE_DEC, NULL, 0,
1227         "h235.SEQUENCE_OF_ProfileElement", HFILL }},
1228     { &hf_h235_profileInfo_item,
1229       { "ProfileElement", "h235.ProfileElement",
1230         FT_NONE, BASE_NONE, NULL, 0,
1231         "h235.ProfileElement", HFILL }},
1232     { &hf_h235_elementID,
1233       { "elementID", "h235.elementID",
1234         FT_UINT32, BASE_DEC, NULL, 0,
1235         "h235.INTEGER_0_255", HFILL }},
1236     { &hf_h235_paramS,
1237       { "paramS", "h235.paramS",
1238         FT_NONE, BASE_NONE, NULL, 0,
1239         "h235.Params", HFILL }},
1240     { &hf_h235_element,
1241       { "element", "h235.element",
1242         FT_UINT32, BASE_DEC, VALS(h235_Element_vals), 0,
1243         "h235.Element", HFILL }},
1244     { &hf_h235_octets,
1245       { "octets", "h235.octets",
1246         FT_BYTES, BASE_NONE, NULL, 0,
1247         "h235.OCTET_STRING", HFILL }},
1248     { &hf_h235_integer,
1249       { "integer", "h235.integer",
1250         FT_INT32, BASE_DEC, NULL, 0,
1251         "h235.INTEGER", HFILL }},
1252     { &hf_h235_bits,
1253       { "bits", "h235.bits",
1254         FT_BYTES, BASE_NONE, NULL, 0,
1255         "h235.BIT_STRING", HFILL }},
1256     { &hf_h235_name,
1257       { "name", "h235.name",
1258         FT_STRING, BASE_NONE, NULL, 0,
1259         "h235.BMPString", HFILL }},
1260     { &hf_h235_flag,
1261       { "flag", "h235.flag",
1262         FT_BOOLEAN, BASE_NONE, NULL, 0,
1263         "h235.BOOLEAN", HFILL }},
1264     { &hf_h235_toBeSigned,
1265       { "toBeSigned", "h235.toBeSigned",
1266         FT_NONE, BASE_NONE, NULL, 0,
1267         "xxx.ToBeSigned", HFILL }},
1268     { &hf_h235_algorithmOID,
1269       { "algorithmOID", "h235.algorithmOID",
1270         FT_OID, BASE_NONE, NULL, 0,
1271         "h235.OBJECT_IDENTIFIER", HFILL }},
1272     { &hf_h235_signaturedata,
1273       { "signature", "h235.signature",
1274         FT_BYTES, BASE_NONE, NULL, 0,
1275         "h235.BIT_STRING", HFILL }},
1276     { &hf_h235_encryptedData,
1277       { "encryptedData", "h235.encryptedData",
1278         FT_BYTES, BASE_NONE, NULL, 0,
1279         "h235.OCTET_STRING", HFILL }},
1280     { &hf_h235_hash,
1281       { "hash", "h235.hash",
1282         FT_BYTES, BASE_NONE, NULL, 0,
1283         "h235.BIT_STRING", HFILL }},
1284     { &hf_h235_ranInt,
1285       { "ranInt", "h235.ranInt",
1286         FT_INT32, BASE_DEC, NULL, 0,
1287         "h235.INTEGER", HFILL }},
1288     { &hf_h235_iv8,
1289       { "iv8", "h235.iv8",
1290         FT_BYTES, BASE_NONE, NULL, 0,
1291         "h235.IV8", HFILL }},
1292     { &hf_h235_iv16,
1293       { "iv16", "h235.iv16",
1294         FT_BYTES, BASE_NONE, NULL, 0,
1295         "h235.IV16", HFILL }},
1296     { &hf_h235_iv,
1297       { "iv", "h235.iv",
1298         FT_BYTES, BASE_NONE, NULL, 0,
1299         "h235.OCTET_STRING", HFILL }},
1300     { &hf_h235_clearSalt,
1301       { "clearSalt", "h235.clearSalt",
1302         FT_BYTES, BASE_NONE, NULL, 0,
1303         "h235.OCTET_STRING", HFILL }},
1304     { &hf_h235_cryptoEncryptedToken,
1305       { "cryptoEncryptedToken", "h235.cryptoEncryptedToken",
1306         FT_NONE, BASE_NONE, NULL, 0,
1307         "h235.T_cryptoEncryptedToken", HFILL }},
1308     { &hf_h235_encryptedToken,
1309       { "token", "h235.token",
1310         FT_NONE, BASE_NONE, NULL, 0,
1311         "h235.ENCRYPTED", HFILL }},
1312     { &hf_h235_cryptoSignedToken,
1313       { "cryptoSignedToken", "h235.cryptoSignedToken",
1314         FT_NONE, BASE_NONE, NULL, 0,
1315         "h235.T_cryptoSignedToken", HFILL }},
1316     { &hf_h235_signedToken,
1317       { "token", "h235.token",
1318         FT_NONE, BASE_NONE, NULL, 0,
1319         "h235.SIGNED", HFILL }},
1320     { &hf_h235_cryptoHashedToken,
1321       { "cryptoHashedToken", "h235.cryptoHashedToken",
1322         FT_NONE, BASE_NONE, NULL, 0,
1323         "h235.T_cryptoHashedToken", HFILL }},
1324     { &hf_h235_hashedVals,
1325       { "hashedVals", "h235.hashedVals",
1326         FT_NONE, BASE_NONE, NULL, 0,
1327         "h235.ClearToken", HFILL }},
1328     { &hf_h235_hashedToken,
1329       { "token", "h235.token",
1330         FT_NONE, BASE_NONE, NULL, 0,
1331         "h235.HASHED", HFILL }},
1332     { &hf_h235_cryptoPwdEncr,
1333       { "cryptoPwdEncr", "h235.cryptoPwdEncr",
1334         FT_NONE, BASE_NONE, NULL, 0,
1335         "h235.ENCRYPTED", HFILL }},
1336     { &hf_h235_secureChannel,
1337       { "secureChannel", "h235.secureChannel",
1338         FT_BYTES, BASE_NONE, NULL, 0,
1339         "h235.KeyMaterial", HFILL }},
1340     { &hf_h235_sharedSecret,
1341       { "sharedSecret", "h235.sharedSecret",
1342         FT_NONE, BASE_NONE, NULL, 0,
1343         "h235.ENCRYPTED", HFILL }},
1344     { &hf_h235_certProtectedKey,
1345       { "certProtectedKey", "h235.certProtectedKey",
1346         FT_NONE, BASE_NONE, NULL, 0,
1347         "h235.SIGNED", HFILL }},
1348     { &hf_h235_secureSharedSecret,
1349       { "secureSharedSecret", "h235.secureSharedSecret",
1350         FT_NONE, BASE_NONE, NULL, 0,
1351         "h235.V3KeySyncMaterial", HFILL }},
1352     { &hf_h235_encryptedSessionKey,
1353       { "encryptedSessionKey", "h235.encryptedSessionKey",
1354         FT_BYTES, BASE_NONE, NULL, 0,
1355         "h235.OCTET_STRING", HFILL }},
1356     { &hf_h235_encryptedSaltingKey,
1357       { "encryptedSaltingKey", "h235.encryptedSaltingKey",
1358         FT_BYTES, BASE_NONE, NULL, 0,
1359         "h235.OCTET_STRING", HFILL }},
1360     { &hf_h235_clearSaltingKey,
1361       { "clearSaltingKey", "h235.clearSaltingKey",
1362         FT_BYTES, BASE_NONE, NULL, 0,
1363         "h235.OCTET_STRING", HFILL }},
1364     { &hf_h235_paramSsalt,
1365       { "paramSsalt", "h235.paramSsalt",
1366         FT_NONE, BASE_NONE, NULL, 0,
1367         "h235.Params", HFILL }},
1368     { &hf_h235_keyDerivationOID,
1369       { "keyDerivationOID", "h235.keyDerivationOID",
1370         FT_OID, BASE_NONE, NULL, 0,
1371         "h235.OBJECT_IDENTIFIER", HFILL }},
1372     { &hf_h235_genericKeyMaterial,
1373       { "genericKeyMaterial", "h235.genericKeyMaterial",
1374         FT_BYTES, BASE_NONE, NULL, 0,
1375         "h235.OCTET_STRING", HFILL }},
1376     { &hf_h235_SrtpCryptoCapability_item,
1377       { "SrtpCryptoInfo", "h235.SrtpCryptoInfo",
1378         FT_NONE, BASE_NONE, NULL, 0,
1379         "h235.SrtpCryptoInfo", HFILL }},
1380     { &hf_h235_cryptoSuite,
1381       { "cryptoSuite", "h235.cryptoSuite",
1382         FT_OID, BASE_NONE, NULL, 0,
1383         "h235.OBJECT_IDENTIFIER", HFILL }},
1384     { &hf_h235_sessionParams,
1385       { "sessionParams", "h235.sessionParams",
1386         FT_NONE, BASE_NONE, NULL, 0,
1387         "h235.SrtpSessionParameters", HFILL }},
1388     { &hf_h235_allowMKI,
1389       { "allowMKI", "h235.allowMKI",
1390         FT_BOOLEAN, BASE_NONE, NULL, 0,
1391         "h235.BOOLEAN", HFILL }},
1392     { &hf_h235_SrtpKeys_item,
1393       { "SrtpKeyParameters", "h235.SrtpKeyParameters",
1394         FT_NONE, BASE_NONE, NULL, 0,
1395         "h235.SrtpKeyParameters", HFILL }},
1396     { &hf_h235_masterKey,
1397       { "masterKey", "h235.masterKey",
1398         FT_BYTES, BASE_NONE, NULL, 0,
1399         "h235.OCTET_STRING", HFILL }},
1400     { &hf_h235_masterSalt,
1401       { "masterSalt", "h235.masterSalt",
1402         FT_BYTES, BASE_NONE, NULL, 0,
1403         "h235.OCTET_STRING", HFILL }},
1404     { &hf_h235_lifetime,
1405       { "lifetime", "h235.lifetime",
1406         FT_UINT32, BASE_DEC, VALS(h235_T_lifetime_vals), 0,
1407         "h235.T_lifetime", HFILL }},
1408     { &hf_h235_powerOfTwo,
1409       { "powerOfTwo", "h235.powerOfTwo",
1410         FT_INT32, BASE_DEC, NULL, 0,
1411         "h235.INTEGER", HFILL }},
1412     { &hf_h235_specific,
1413       { "specific", "h235.specific",
1414         FT_INT32, BASE_DEC, NULL, 0,
1415         "h235.INTEGER", HFILL }},
1416     { &hf_h235_mki,
1417       { "mki", "h235.mki",
1418         FT_NONE, BASE_NONE, NULL, 0,
1419         "h235.T_mki", HFILL }},
1420     { &hf_h235_length,
1421       { "length", "h235.length",
1422         FT_UINT32, BASE_DEC, NULL, 0,
1423         "h235.INTEGER_1_128", HFILL }},
1424     { &hf_h235_value,
1425       { "value", "h235.value",
1426         FT_BYTES, BASE_NONE, NULL, 0,
1427         "h235.OCTET_STRING", HFILL }},
1428     { &hf_h235_kdr,
1429       { "kdr", "h235.kdr",
1430         FT_UINT32, BASE_DEC, NULL, 0,
1431         "h235.INTEGER_0_24", HFILL }},
1432     { &hf_h235_unencryptedSrtp,
1433       { "unencryptedSrtp", "h235.unencryptedSrtp",
1434         FT_BOOLEAN, BASE_NONE, NULL, 0,
1435         "h235.BOOLEAN", HFILL }},
1436     { &hf_h235_unencryptedSrtcp,
1437       { "unencryptedSrtcp", "h235.unencryptedSrtcp",
1438         FT_BOOLEAN, BASE_NONE, NULL, 0,
1439         "h235.BOOLEAN", HFILL }},
1440     { &hf_h235_unauthenticatedSrtp,
1441       { "unauthenticatedSrtp", "h235.unauthenticatedSrtp",
1442         FT_BOOLEAN, BASE_NONE, NULL, 0,
1443         "h235.BOOLEAN", HFILL }},
1444     { &hf_h235_fecOrder,
1445       { "fecOrder", "h235.fecOrder",
1446         FT_NONE, BASE_NONE, NULL, 0,
1447         "h235.FecOrder", HFILL }},
1448     { &hf_h235_windowSizeHint,
1449       { "windowSizeHint", "h235.windowSizeHint",
1450         FT_UINT32, BASE_DEC, NULL, 0,
1451         "h235.INTEGER_64_65535", HFILL }},
1452     { &hf_h235_newParameter,
1453       { "newParameter", "h235.newParameter",
1454         FT_UINT32, BASE_DEC, NULL, 0,
1455         "h235.SEQUENCE_OF_GenericData", HFILL }},
1456     { &hf_h235_newParameter_item,
1457       { "GenericData", "h235.GenericData",
1458         FT_NONE, BASE_NONE, NULL, 0,
1459         "h225.GenericData", HFILL }},
1460     { &hf_h235_fecBeforeSrtp,
1461       { "fecBeforeSrtp", "h235.fecBeforeSrtp",
1462         FT_NONE, BASE_NONE, NULL, 0,
1463         "h235.NULL", HFILL }},
1464     { &hf_h235_fecAfterSrtp,
1465       { "fecAfterSrtp", "h235.fecAfterSrtp",
1466         FT_NONE, BASE_NONE, NULL, 0,
1467         "h235.NULL", HFILL }},
1468
1469 /*--- End of included file: packet-h235-hfarr.c ---*/
1470 #line 74 "packet-h235-template.c"
1471   };
1472
1473   /* List of subtrees */
1474   static gint *ett[] = {
1475
1476 /*--- Included file: packet-h235-ettarr.c ---*/
1477 #line 1 "packet-h235-ettarr.c"
1478     &ett_h235_NonStandardParameter,
1479     &ett_h235_DHset,
1480     &ett_h235_ECpoint,
1481     &ett_h235_ECKASDH,
1482     &ett_h235_T_eckasdhp,
1483     &ett_h235_T_eckasdh2,
1484     &ett_h235_TypedCertificate,
1485     &ett_h235_AuthenticationBES,
1486     &ett_h235_AuthenticationMechanism,
1487     &ett_h235_ClearToken,
1488     &ett_h235_SEQUENCE_OF_ProfileElement,
1489     &ett_h235_ProfileElement,
1490     &ett_h235_Element,
1491     &ett_h235_SIGNED,
1492     &ett_h235_ENCRYPTED,
1493     &ett_h235_HASHED,
1494     &ett_h235_Params,
1495     &ett_h235_CryptoToken,
1496     &ett_h235_T_cryptoEncryptedToken,
1497     &ett_h235_T_cryptoSignedToken,
1498     &ett_h235_T_cryptoHashedToken,
1499     &ett_h235_H235Key,
1500     &ett_h235_V3KeySyncMaterial,
1501     &ett_h235_SrtpCryptoCapability,
1502     &ett_h235_SrtpCryptoInfo,
1503     &ett_h235_SrtpKeys,
1504     &ett_h235_SrtpKeyParameters,
1505     &ett_h235_T_lifetime,
1506     &ett_h235_T_mki,
1507     &ett_h235_SrtpSessionParameters,
1508     &ett_h235_SEQUENCE_OF_GenericData,
1509     &ett_h235_FecOrder,
1510
1511 /*--- End of included file: packet-h235-ettarr.c ---*/
1512 #line 79 "packet-h235-template.c"
1513   };
1514
1515   /* Register protocol */
1516   proto_h235 = proto_register_protocol(PNAME, PSNAME, PFNAME);
1517
1518   /* Register fields and subtrees */
1519   proto_register_field_array(proto_h235, hf, array_length(hf));
1520   proto_register_subtree_array(ett, array_length(ett));
1521
1522   /* OID names */
1523   /* H.235.1, Chapter 15, Table 3 */
1524     /* A */
1525     oid_add_from_string("all fields in RAS/CS","0.0.8.235.0.1.1");
1526     oid_add_from_string("all fields in RAS/CS","0.0.8.235.0.2.1");
1527     /* T */
1528     oid_add_from_string("ClearToken","0.0.8.235.0.1.5");
1529     oid_add_from_string("ClearToken","0.0.8.235.0.2.5");
1530     /* U */
1531     oid_add_from_string("HMAC-SHA1-96","0.0.8.235.0.1.6");
1532     oid_add_from_string("HMAC-SHA1-96","0.0.8.235.0.2.6");
1533   /* H.235.7, Chapter 5, Table 1 */
1534     oid_add_from_string("MIKEY",                OID_MIKEY);
1535     oid_add_from_string("MIKEY-PS",             OID_MIKEY_PS);
1536     oid_add_from_string("MIKEY-DHHMAC",         OID_MIKEY_DHHMAC);
1537     oid_add_from_string("MIKEY-PK-SIGN",        OID_MIKEY_PK_SIGN);
1538     oid_add_from_string("MIKEY-DH-SIGN",        OID_MIKEY_DH_SIGN);
1539   /* H.235.7, Chapter 8.5 */
1540     oid_add_from_string("TG",OID_TG);
1541   /* H.235.7, Chapter 9.5 */
1542     oid_add_from_string("SG",OID_SG);
1543   /* H.235.8, Chapter 4.2, Table 2 */
1544     oid_add_from_string("AES_CM_128_HMAC_SHA1_80","0.0.8.235.0.4.91");
1545     oid_add_from_string("AES_CM_128_HMAC_SHA1_32","0.0.8.235.0.4.92");
1546     oid_add_from_string("F8_128_HMAC_SHA1_80","0.0.8.235.0.4.93");
1547 }
1548
1549
1550 /*--- proto_reg_handoff_h235 -------------------------------------------*/
1551 void proto_reg_handoff_h235(void) {
1552   dissector_handle_t mikey_handle;
1553
1554   mikey_handle = find_dissector("mikey");
1555
1556   /* H.235.7, Chapter 7.1, MIKEY operation at "session level" */
1557   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY         "/nonCollapsing/0", mikey_handle);
1558   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PS      "/nonCollapsing/0", mikey_handle);
1559   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DHHMAC  "/nonCollapsing/0", mikey_handle);
1560   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PK_SIGN "/nonCollapsing/0", mikey_handle);
1561   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DH_SIGN "/nonCollapsing/0", mikey_handle);
1562   dissector_add_string("h245.gef.content", "EncryptionSync/0", mikey_handle);
1563   /* H.235.7, Chapter 7.2, MIKEY operation at "media level" */
1564   dissector_add_string("h245.gef.content", "EncryptionSync/76", mikey_handle);
1565   dissector_add_string("h245.gef.content", "EncryptionSync/72", mikey_handle);
1566   dissector_add_string("h245.gef.content", "EncryptionSync/73", mikey_handle);
1567   dissector_add_string("h245.gef.content", "EncryptionSync/74", mikey_handle);
1568   dissector_add_string("h245.gef.content", "EncryptionSync/75", mikey_handle);
1569   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY         "/nonCollapsing/76", mikey_handle);
1570   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PS      "/nonCollapsing/72", mikey_handle);
1571   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DHHMAC  "/nonCollapsing/73", mikey_handle);
1572   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PK_SIGN "/nonCollapsing/74", mikey_handle);
1573   dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DH_SIGN "/nonCollapsing/75", mikey_handle);
1574
1575   /* H.235.8, Chapter 4.1.2, SrtpCryptoCapability transport */
1576   dissector_add_string("h245.gef.content", "GenericCapability/0.0.8.235.0.4.90/nonCollapsingRaw", 
1577                        new_create_dissector_handle(dissect_SrtpCryptoCapability_PDU, proto_h235));
1578
1579 }
1580