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