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