Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-novell_pkis.c
blob92c193bbd6253512f3a34d45c1d1657e6346d2c6
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-novell_pkis.c */
4 /* asn2wrs.py -b -u -q -L -p novell_pkis -c ./novell_pkis.cnf -s ./packet-novell_pkis-template -D . -O ../.. novell_pkis.asn */
6 /* packet-novell_pkis.c
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include "config.h"
17 #include <epan/packet.h>
18 #include <epan/expert.h>
19 #include <epan/prefs.h>
20 #include <epan/oids.h>
21 #include <epan/conversation.h>
22 #include <epan/asn1.h>
23 #include <wsutil/array.h>
25 #include "packet-per.h"
26 #include "packet-ber.h"
28 static int hf_novell_pkis_SecurityAttributes_PDU; /* SecurityAttributes */
29 static int hf_novell_pkis_RelianceLimits_PDU; /* RelianceLimits */
30 static int hf_novell_pkis_versionNumber; /* OCTET_STRING_SIZE_2 */
31 static int hf_novell_pkis_nSI; /* BOOLEAN */
32 static int hf_novell_pkis_securityTM; /* T_securityTM */
33 static int hf_novell_pkis_uriReference; /* IA5String */
34 static int hf_novell_pkis_gLBExtensions; /* GLBExtensions */
35 static int hf_novell_pkis_keyQuality; /* KeyQuality */
36 static int hf_novell_pkis_cryptoProcessQuality; /* CryptoProcessQuality */
37 static int hf_novell_pkis_certificateClass; /* CertificateClass */
38 static int hf_novell_pkis_enterpriseId; /* EnterpriseId */
39 static int hf_novell_pkis_enforceQuality; /* BOOLEAN */
40 static int hf_novell_pkis_compusecQuality; /* CompusecQuality */
41 static int hf_novell_pkis_cryptoQuality; /* CryptoQuality */
42 static int hf_novell_pkis_keyStorageQuality; /* INTEGER_0_255 */
43 static int hf_novell_pkis_CompusecQuality_item; /* CompusecQualityPair */
44 static int hf_novell_pkis_compusecCriteria; /* INTEGER_0_255 */
45 static int hf_novell_pkis_compusecRating; /* INTEGER_0_255 */
46 static int hf_novell_pkis_CryptoQuality_item; /* CryptoQualityPair */
47 static int hf_novell_pkis_cryptoModuleCriteria; /* INTEGER_0_255 */
48 static int hf_novell_pkis_cryptoModuleRating; /* INTEGER_0_255 */
49 static int hf_novell_pkis_classValue; /* INTEGER_0_255 */
50 static int hf_novell_pkis_certificateValid; /* BOOLEAN */
51 static int hf_novell_pkis_rootLabel; /* SecurityLabelType1 */
52 static int hf_novell_pkis_registryLabel; /* SecurityLabelType1 */
53 static int hf_novell_pkis_enterpriseLabel; /* SEQUENCE_SIZE_1_1_OF_SecurityLabelType1 */
54 static int hf_novell_pkis_enterpriseLabel_item; /* SecurityLabelType1 */
55 static int hf_novell_pkis_labelType1; /* INTEGER_0_255 */
56 static int hf_novell_pkis_secrecyLevel1; /* INTEGER_0_255 */
57 static int hf_novell_pkis_integrityLevel1; /* INTEGER_0_255 */
58 static int hf_novell_pkis_secrecyCategories1; /* BIT_STRING_SIZE_96 */
59 static int hf_novell_pkis_integrityCategories1; /* BIT_STRING_SIZE_64 */
60 static int hf_novell_pkis_secrecySingletons1; /* Singletons */
61 static int hf_novell_pkis_integritySingletons1; /* Singletons */
62 static int hf_novell_pkis_Singletons_item; /* SingletonChoice */
63 static int hf_novell_pkis_uniqueSingleton; /* INTEGER_0_9223372036854775807 */
64 static int hf_novell_pkis_singletonRange; /* SingletonRange */
65 static int hf_novell_pkis_singletonLowerBound; /* INTEGER_0_9223372036854775807 */
66 static int hf_novell_pkis_singletonUpperBound; /* INTEGER_0_9223372036854775807 */
67 static int hf_novell_pkis_singletonValue; /* BOOLEAN */
68 static int hf_novell_pkis_perTransactionLimit; /* MonetaryValue */
69 static int hf_novell_pkis_perCertificateLimit; /* MonetaryValue */
70 static int hf_novell_pkis_currency; /* Currency */
71 static int hf_novell_pkis_amount; /* INTEGER */
72 static int hf_novell_pkis_amtExp10; /* INTEGER */
73 static int ett_novell_pkis_SecurityAttributes;
74 static int ett_novell_pkis_GLBExtensions;
75 static int ett_novell_pkis_Quality;
76 static int ett_novell_pkis_CompusecQuality;
77 static int ett_novell_pkis_CompusecQualityPair;
78 static int ett_novell_pkis_CryptoQuality;
79 static int ett_novell_pkis_CryptoQualityPair;
80 static int ett_novell_pkis_CertificateClass;
81 static int ett_novell_pkis_EnterpriseId;
82 static int ett_novell_pkis_SEQUENCE_SIZE_1_1_OF_SecurityLabelType1;
83 static int ett_novell_pkis_SecurityLabelType1;
84 static int ett_novell_pkis_Singletons;
85 static int ett_novell_pkis_SingletonChoice;
86 static int ett_novell_pkis_SingletonRange;
87 static int ett_novell_pkis_RelianceLimits;
88 static int ett_novell_pkis_MonetaryValue;
91 static int
92 dissect_novell_pkis_OCTET_STRING_SIZE_2(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
93 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
94 NULL);
96 return offset;
101 static int
102 dissect_novell_pkis_BOOLEAN(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
103 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
105 return offset;
110 static int
111 dissect_novell_pkis_T_securityTM(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
112 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
113 actx, tree, tvb, offset, hf_index,
114 NULL);
116 return offset;
121 static int
122 dissect_novell_pkis_IA5String(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
123 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
124 actx, tree, tvb, offset, hf_index,
125 NULL);
127 return offset;
132 static int
133 dissect_novell_pkis_INTEGER_0_255(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
134 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
135 NULL);
137 return offset;
141 static const ber_sequence_t CompusecQualityPair_sequence[] = {
142 { &hf_novell_pkis_compusecCriteria, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
143 { &hf_novell_pkis_compusecRating, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
144 { NULL, 0, 0, 0, NULL }
147 static int
148 dissect_novell_pkis_CompusecQualityPair(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
149 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
150 CompusecQualityPair_sequence, hf_index, ett_novell_pkis_CompusecQualityPair);
152 return offset;
156 static const ber_sequence_t CompusecQuality_sequence_of[1] = {
157 { &hf_novell_pkis_CompusecQuality_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_CompusecQualityPair },
160 static int
161 dissect_novell_pkis_CompusecQuality(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
162 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
163 CompusecQuality_sequence_of, hf_index, ett_novell_pkis_CompusecQuality);
165 return offset;
169 static const ber_sequence_t CryptoQualityPair_sequence[] = {
170 { &hf_novell_pkis_cryptoModuleCriteria, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
171 { &hf_novell_pkis_cryptoModuleRating, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
172 { NULL, 0, 0, 0, NULL }
175 static int
176 dissect_novell_pkis_CryptoQualityPair(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
177 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
178 CryptoQualityPair_sequence, hf_index, ett_novell_pkis_CryptoQualityPair);
180 return offset;
184 static const ber_sequence_t CryptoQuality_sequence_of[1] = {
185 { &hf_novell_pkis_CryptoQuality_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_CryptoQualityPair },
188 static int
189 dissect_novell_pkis_CryptoQuality(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
190 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
191 CryptoQuality_sequence_of, hf_index, ett_novell_pkis_CryptoQuality);
193 return offset;
197 static const ber_sequence_t Quality_sequence[] = {
198 { &hf_novell_pkis_enforceQuality, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_BOOLEAN },
199 { &hf_novell_pkis_compusecQuality, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_CompusecQuality },
200 { &hf_novell_pkis_cryptoQuality, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_CryptoQuality },
201 { &hf_novell_pkis_keyStorageQuality, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
202 { NULL, 0, 0, 0, NULL }
205 static int
206 dissect_novell_pkis_Quality(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
207 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
208 Quality_sequence, hf_index, ett_novell_pkis_Quality);
210 return offset;
215 static int
216 dissect_novell_pkis_KeyQuality(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
217 offset = dissect_novell_pkis_Quality(implicit_tag, tvb, offset, actx, tree, hf_index);
219 return offset;
224 static int
225 dissect_novell_pkis_CryptoProcessQuality(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
226 offset = dissect_novell_pkis_Quality(implicit_tag, tvb, offset, actx, tree, hf_index);
228 return offset;
232 static const ber_sequence_t CertificateClass_sequence[] = {
233 { &hf_novell_pkis_classValue, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
234 { &hf_novell_pkis_certificateValid, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_BOOLEAN },
235 { NULL, 0, 0, 0, NULL }
238 static int
239 dissect_novell_pkis_CertificateClass(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
240 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
241 CertificateClass_sequence, hf_index, ett_novell_pkis_CertificateClass);
243 return offset;
248 static int
249 dissect_novell_pkis_BIT_STRING_SIZE_96(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
250 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
251 NULL, 0, hf_index, -1,
252 NULL);
254 return offset;
259 static int
260 dissect_novell_pkis_BIT_STRING_SIZE_64(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
261 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
262 NULL, 0, hf_index, -1,
263 NULL);
265 return offset;
270 static int
271 dissect_novell_pkis_INTEGER_0_9223372036854775807(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
272 offset = dissect_ber_integer64(implicit_tag, actx, tree, tvb, offset, hf_index,
273 NULL);
275 return offset;
279 static const ber_sequence_t SingletonRange_sequence[] = {
280 { &hf_novell_pkis_singletonLowerBound, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_9223372036854775807 },
281 { &hf_novell_pkis_singletonUpperBound, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_9223372036854775807 },
282 { &hf_novell_pkis_singletonValue, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_BOOLEAN },
283 { NULL, 0, 0, 0, NULL }
286 static int
287 dissect_novell_pkis_SingletonRange(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
288 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
289 SingletonRange_sequence, hf_index, ett_novell_pkis_SingletonRange);
291 return offset;
295 static const value_string novell_pkis_SingletonChoice_vals[] = {
296 { 0, "uniqueSingleton" },
297 { 1, "singletonRange" },
298 { 0, NULL }
301 static const ber_choice_t SingletonChoice_choice[] = {
302 { 0, &hf_novell_pkis_uniqueSingleton, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_9223372036854775807 },
303 { 1, &hf_novell_pkis_singletonRange, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_SingletonRange },
304 { 0, NULL, 0, 0, 0, NULL }
307 static int
308 dissect_novell_pkis_SingletonChoice(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
309 offset = dissect_ber_choice(actx, tree, tvb, offset,
310 SingletonChoice_choice, hf_index, ett_novell_pkis_SingletonChoice,
311 NULL);
313 return offset;
317 static const ber_sequence_t Singletons_sequence_of[1] = {
318 { &hf_novell_pkis_Singletons_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_novell_pkis_SingletonChoice },
321 static int
322 dissect_novell_pkis_Singletons(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
323 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
324 Singletons_sequence_of, hf_index, ett_novell_pkis_Singletons);
326 return offset;
330 static const ber_sequence_t SecurityLabelType1_sequence[] = {
331 { &hf_novell_pkis_labelType1, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
332 { &hf_novell_pkis_secrecyLevel1, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
333 { &hf_novell_pkis_integrityLevel1, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER_0_255 },
334 { &hf_novell_pkis_secrecyCategories1, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_BIT_STRING_SIZE_96 },
335 { &hf_novell_pkis_integrityCategories1, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_BIT_STRING_SIZE_64 },
336 { &hf_novell_pkis_secrecySingletons1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_Singletons },
337 { &hf_novell_pkis_integritySingletons1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_Singletons },
338 { NULL, 0, 0, 0, NULL }
341 static int
342 dissect_novell_pkis_SecurityLabelType1(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
343 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
344 SecurityLabelType1_sequence, hf_index, ett_novell_pkis_SecurityLabelType1);
346 return offset;
350 static const ber_sequence_t SEQUENCE_SIZE_1_1_OF_SecurityLabelType1_sequence_of[1] = {
351 { &hf_novell_pkis_enterpriseLabel_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_SecurityLabelType1 },
354 static int
355 dissect_novell_pkis_SEQUENCE_SIZE_1_1_OF_SecurityLabelType1(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
356 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
357 SEQUENCE_SIZE_1_1_OF_SecurityLabelType1_sequence_of, hf_index, ett_novell_pkis_SEQUENCE_SIZE_1_1_OF_SecurityLabelType1);
359 return offset;
363 static const ber_sequence_t EnterpriseId_sequence[] = {
364 { &hf_novell_pkis_rootLabel, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_novell_pkis_SecurityLabelType1 },
365 { &hf_novell_pkis_registryLabel, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_novell_pkis_SecurityLabelType1 },
366 { &hf_novell_pkis_enterpriseLabel, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_novell_pkis_SEQUENCE_SIZE_1_1_OF_SecurityLabelType1 },
367 { NULL, 0, 0, 0, NULL }
370 static int
371 dissect_novell_pkis_EnterpriseId(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
372 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
373 EnterpriseId_sequence, hf_index, ett_novell_pkis_EnterpriseId);
375 return offset;
379 static const ber_sequence_t GLBExtensions_sequence[] = {
380 { &hf_novell_pkis_keyQuality, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_novell_pkis_KeyQuality },
381 { &hf_novell_pkis_cryptoProcessQuality, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_novell_pkis_CryptoProcessQuality },
382 { &hf_novell_pkis_certificateClass, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_novell_pkis_CertificateClass },
383 { &hf_novell_pkis_enterpriseId, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_novell_pkis_EnterpriseId },
384 { NULL, 0, 0, 0, NULL }
387 static int
388 dissect_novell_pkis_GLBExtensions(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
389 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
390 GLBExtensions_sequence, hf_index, ett_novell_pkis_GLBExtensions);
392 return offset;
396 static const ber_sequence_t SecurityAttributes_sequence[] = {
397 { &hf_novell_pkis_versionNumber, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_OCTET_STRING_SIZE_2 },
398 { &hf_novell_pkis_nSI , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_BOOLEAN },
399 { &hf_novell_pkis_securityTM, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_T_securityTM },
400 { &hf_novell_pkis_uriReference, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_IA5String },
401 { &hf_novell_pkis_gLBExtensions, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_GLBExtensions },
402 { NULL, 0, 0, 0, NULL }
405 static int
406 dissect_novell_pkis_SecurityAttributes(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
407 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
408 SecurityAttributes_sequence, hf_index, ett_novell_pkis_SecurityAttributes);
410 return offset;
415 static int
416 dissect_novell_pkis_Currency(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
417 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
418 NULL);
420 return offset;
425 static int
426 dissect_novell_pkis_INTEGER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
427 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
428 NULL);
430 return offset;
434 static const ber_sequence_t MonetaryValue_sequence[] = {
435 { &hf_novell_pkis_currency, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_Currency },
436 { &hf_novell_pkis_amount , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER },
437 { &hf_novell_pkis_amtExp10, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_INTEGER },
438 { NULL, 0, 0, 0, NULL }
441 static int
442 dissect_novell_pkis_MonetaryValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
443 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
444 MonetaryValue_sequence, hf_index, ett_novell_pkis_MonetaryValue);
446 return offset;
450 static const ber_sequence_t RelianceLimits_sequence[] = {
451 { &hf_novell_pkis_perTransactionLimit, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_MonetaryValue },
452 { &hf_novell_pkis_perCertificateLimit, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_novell_pkis_MonetaryValue },
453 { NULL, 0, 0, 0, NULL }
456 static int
457 dissect_novell_pkis_RelianceLimits(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
458 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
459 RelianceLimits_sequence, hf_index, ett_novell_pkis_RelianceLimits);
461 return offset;
464 /*--- PDUs ---*/
466 static int dissect_SecurityAttributes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
467 int offset = 0;
468 asn1_ctx_t asn1_ctx;
469 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
470 offset = dissect_novell_pkis_SecurityAttributes(false, tvb, offset, &asn1_ctx, tree, hf_novell_pkis_SecurityAttributes_PDU);
471 return offset;
473 static int dissect_RelianceLimits_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
474 int offset = 0;
475 asn1_ctx_t asn1_ctx;
476 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
477 offset = dissect_novell_pkis_RelianceLimits(false, tvb, offset, &asn1_ctx, tree, hf_novell_pkis_RelianceLimits_PDU);
478 return offset;
482 void proto_register_novell_pkis (void);
483 void proto_reg_handoff_novell_pkis(void);
485 static int proto_novell_pkis;
487 void proto_reg_handoff_novell_pkis(void)
489 register_ber_oid_dissector("2.16.840.1.113719.1.9.4.1", dissect_SecurityAttributes_PDU, proto_novell_pkis, "pa-sa");
490 register_ber_oid_dissector("2.16.840.1.113719.1.9.4.2", dissect_RelianceLimits_PDU, proto_novell_pkis, "pa-rl");
494 void proto_register_novell_pkis (void)
496 static hf_register_info hf[] = {
497 { &hf_novell_pkis_SecurityAttributes_PDU,
498 { "SecurityAttributes", "novell_pkis.SecurityAttributes_element",
499 FT_NONE, BASE_NONE, NULL, 0,
500 NULL, HFILL }},
501 { &hf_novell_pkis_RelianceLimits_PDU,
502 { "RelianceLimits", "novell_pkis.RelianceLimits_element",
503 FT_NONE, BASE_NONE, NULL, 0,
504 NULL, HFILL }},
505 { &hf_novell_pkis_versionNumber,
506 { "versionNumber", "novell_pkis.versionNumber",
507 FT_BYTES, BASE_NONE, NULL, 0,
508 "OCTET_STRING_SIZE_2", HFILL }},
509 { &hf_novell_pkis_nSI,
510 { "nSI", "novell_pkis.nSI",
511 FT_BOOLEAN, BASE_NONE, NULL, 0,
512 "BOOLEAN", HFILL }},
513 { &hf_novell_pkis_securityTM,
514 { "securityTM", "novell_pkis.securityTM",
515 FT_STRING, BASE_NONE, NULL, 0,
516 NULL, HFILL }},
517 { &hf_novell_pkis_uriReference,
518 { "uriReference", "novell_pkis.uriReference",
519 FT_STRING, BASE_NONE, NULL, 0,
520 "IA5String", HFILL }},
521 { &hf_novell_pkis_gLBExtensions,
522 { "gLBExtensions", "novell_pkis.gLBExtensions_element",
523 FT_NONE, BASE_NONE, NULL, 0,
524 NULL, HFILL }},
525 { &hf_novell_pkis_keyQuality,
526 { "keyQuality", "novell_pkis.keyQuality_element",
527 FT_NONE, BASE_NONE, NULL, 0,
528 NULL, HFILL }},
529 { &hf_novell_pkis_cryptoProcessQuality,
530 { "cryptoProcessQuality", "novell_pkis.cryptoProcessQuality_element",
531 FT_NONE, BASE_NONE, NULL, 0,
532 NULL, HFILL }},
533 { &hf_novell_pkis_certificateClass,
534 { "certificateClass", "novell_pkis.certificateClass_element",
535 FT_NONE, BASE_NONE, NULL, 0,
536 NULL, HFILL }},
537 { &hf_novell_pkis_enterpriseId,
538 { "enterpriseId", "novell_pkis.enterpriseId_element",
539 FT_NONE, BASE_NONE, NULL, 0,
540 NULL, HFILL }},
541 { &hf_novell_pkis_enforceQuality,
542 { "enforceQuality", "novell_pkis.enforceQuality",
543 FT_BOOLEAN, BASE_NONE, NULL, 0,
544 "BOOLEAN", HFILL }},
545 { &hf_novell_pkis_compusecQuality,
546 { "compusecQuality", "novell_pkis.compusecQuality",
547 FT_UINT32, BASE_DEC, NULL, 0,
548 NULL, HFILL }},
549 { &hf_novell_pkis_cryptoQuality,
550 { "cryptoQuality", "novell_pkis.cryptoQuality",
551 FT_UINT32, BASE_DEC, NULL, 0,
552 NULL, HFILL }},
553 { &hf_novell_pkis_keyStorageQuality,
554 { "keyStorageQuality", "novell_pkis.keyStorageQuality",
555 FT_UINT32, BASE_DEC, NULL, 0,
556 "INTEGER_0_255", HFILL }},
557 { &hf_novell_pkis_CompusecQuality_item,
558 { "CompusecQualityPair", "novell_pkis.CompusecQualityPair_element",
559 FT_NONE, BASE_NONE, NULL, 0,
560 NULL, HFILL }},
561 { &hf_novell_pkis_compusecCriteria,
562 { "compusecCriteria", "novell_pkis.compusecCriteria",
563 FT_UINT32, BASE_DEC, NULL, 0,
564 "INTEGER_0_255", HFILL }},
565 { &hf_novell_pkis_compusecRating,
566 { "compusecRating", "novell_pkis.compusecRating",
567 FT_UINT32, BASE_DEC, NULL, 0,
568 "INTEGER_0_255", HFILL }},
569 { &hf_novell_pkis_CryptoQuality_item,
570 { "CryptoQualityPair", "novell_pkis.CryptoQualityPair_element",
571 FT_NONE, BASE_NONE, NULL, 0,
572 NULL, HFILL }},
573 { &hf_novell_pkis_cryptoModuleCriteria,
574 { "cryptoModuleCriteria", "novell_pkis.cryptoModuleCriteria",
575 FT_UINT32, BASE_DEC, NULL, 0,
576 "INTEGER_0_255", HFILL }},
577 { &hf_novell_pkis_cryptoModuleRating,
578 { "cryptoModuleRating", "novell_pkis.cryptoModuleRating",
579 FT_UINT32, BASE_DEC, NULL, 0,
580 "INTEGER_0_255", HFILL }},
581 { &hf_novell_pkis_classValue,
582 { "classValue", "novell_pkis.classValue",
583 FT_UINT32, BASE_DEC, NULL, 0,
584 "INTEGER_0_255", HFILL }},
585 { &hf_novell_pkis_certificateValid,
586 { "certificateValid", "novell_pkis.certificateValid",
587 FT_BOOLEAN, BASE_NONE, NULL, 0,
588 "BOOLEAN", HFILL }},
589 { &hf_novell_pkis_rootLabel,
590 { "rootLabel", "novell_pkis.rootLabel_element",
591 FT_NONE, BASE_NONE, NULL, 0,
592 "SecurityLabelType1", HFILL }},
593 { &hf_novell_pkis_registryLabel,
594 { "registryLabel", "novell_pkis.registryLabel_element",
595 FT_NONE, BASE_NONE, NULL, 0,
596 "SecurityLabelType1", HFILL }},
597 { &hf_novell_pkis_enterpriseLabel,
598 { "enterpriseLabel", "novell_pkis.enterpriseLabel",
599 FT_UINT32, BASE_DEC, NULL, 0,
600 "SEQUENCE_SIZE_1_1_OF_SecurityLabelType1", HFILL }},
601 { &hf_novell_pkis_enterpriseLabel_item,
602 { "SecurityLabelType1", "novell_pkis.SecurityLabelType1_element",
603 FT_NONE, BASE_NONE, NULL, 0,
604 NULL, HFILL }},
605 { &hf_novell_pkis_labelType1,
606 { "labelType1", "novell_pkis.labelType1",
607 FT_UINT32, BASE_DEC, NULL, 0,
608 "INTEGER_0_255", HFILL }},
609 { &hf_novell_pkis_secrecyLevel1,
610 { "secrecyLevel1", "novell_pkis.secrecyLevel1",
611 FT_UINT32, BASE_DEC, NULL, 0,
612 "INTEGER_0_255", HFILL }},
613 { &hf_novell_pkis_integrityLevel1,
614 { "integrityLevel1", "novell_pkis.integrityLevel1",
615 FT_UINT32, BASE_DEC, NULL, 0,
616 "INTEGER_0_255", HFILL }},
617 { &hf_novell_pkis_secrecyCategories1,
618 { "secrecyCategories1", "novell_pkis.secrecyCategories1",
619 FT_BYTES, BASE_NONE, NULL, 0,
620 "BIT_STRING_SIZE_96", HFILL }},
621 { &hf_novell_pkis_integrityCategories1,
622 { "integrityCategories1", "novell_pkis.integrityCategories1",
623 FT_BYTES, BASE_NONE, NULL, 0,
624 "BIT_STRING_SIZE_64", HFILL }},
625 { &hf_novell_pkis_secrecySingletons1,
626 { "secrecySingletons1", "novell_pkis.secrecySingletons1",
627 FT_UINT32, BASE_DEC, NULL, 0,
628 "Singletons", HFILL }},
629 { &hf_novell_pkis_integritySingletons1,
630 { "integritySingletons1", "novell_pkis.integritySingletons1",
631 FT_UINT32, BASE_DEC, NULL, 0,
632 "Singletons", HFILL }},
633 { &hf_novell_pkis_Singletons_item,
634 { "SingletonChoice", "novell_pkis.SingletonChoice",
635 FT_UINT32, BASE_DEC, VALS(novell_pkis_SingletonChoice_vals), 0,
636 NULL, HFILL }},
637 { &hf_novell_pkis_uniqueSingleton,
638 { "uniqueSingleton", "novell_pkis.uniqueSingleton",
639 FT_UINT64, BASE_DEC, NULL, 0,
640 "INTEGER_0_9223372036854775807", HFILL }},
641 { &hf_novell_pkis_singletonRange,
642 { "singletonRange", "novell_pkis.singletonRange_element",
643 FT_NONE, BASE_NONE, NULL, 0,
644 NULL, HFILL }},
645 { &hf_novell_pkis_singletonLowerBound,
646 { "singletonLowerBound", "novell_pkis.singletonLowerBound",
647 FT_UINT64, BASE_DEC, NULL, 0,
648 "INTEGER_0_9223372036854775807", HFILL }},
649 { &hf_novell_pkis_singletonUpperBound,
650 { "singletonUpperBound", "novell_pkis.singletonUpperBound",
651 FT_UINT64, BASE_DEC, NULL, 0,
652 "INTEGER_0_9223372036854775807", HFILL }},
653 { &hf_novell_pkis_singletonValue,
654 { "singletonValue", "novell_pkis.singletonValue",
655 FT_BOOLEAN, BASE_NONE, NULL, 0,
656 "BOOLEAN", HFILL }},
657 { &hf_novell_pkis_perTransactionLimit,
658 { "perTransactionLimit", "novell_pkis.perTransactionLimit_element",
659 FT_NONE, BASE_NONE, NULL, 0,
660 "MonetaryValue", HFILL }},
661 { &hf_novell_pkis_perCertificateLimit,
662 { "perCertificateLimit", "novell_pkis.perCertificateLimit_element",
663 FT_NONE, BASE_NONE, NULL, 0,
664 "MonetaryValue", HFILL }},
665 { &hf_novell_pkis_currency,
666 { "currency", "novell_pkis.currency",
667 FT_UINT32, BASE_DEC, NULL, 0,
668 NULL, HFILL }},
669 { &hf_novell_pkis_amount,
670 { "amount", "novell_pkis.amount",
671 FT_INT32, BASE_DEC, NULL, 0,
672 "INTEGER", HFILL }},
673 { &hf_novell_pkis_amtExp10,
674 { "amtExp10", "novell_pkis.amtExp10",
675 FT_INT32, BASE_DEC, NULL, 0,
676 "INTEGER", HFILL }},
678 static int *ett[] = {
679 &ett_novell_pkis_SecurityAttributes,
680 &ett_novell_pkis_GLBExtensions,
681 &ett_novell_pkis_Quality,
682 &ett_novell_pkis_CompusecQuality,
683 &ett_novell_pkis_CompusecQualityPair,
684 &ett_novell_pkis_CryptoQuality,
685 &ett_novell_pkis_CryptoQualityPair,
686 &ett_novell_pkis_CertificateClass,
687 &ett_novell_pkis_EnterpriseId,
688 &ett_novell_pkis_SEQUENCE_SIZE_1_1_OF_SecurityLabelType1,
689 &ett_novell_pkis_SecurityLabelType1,
690 &ett_novell_pkis_Singletons,
691 &ett_novell_pkis_SingletonChoice,
692 &ett_novell_pkis_SingletonRange,
693 &ett_novell_pkis_RelianceLimits,
694 &ett_novell_pkis_MonetaryValue,
697 /* execute protocol initialization only once */
698 if (proto_novell_pkis > 0) return;
700 proto_novell_pkis = proto_register_protocol("Novell PKIS ASN.1 type", "novell_pkis", "novell_pkis");
701 proto_register_field_array (proto_novell_pkis, hf, array_length (hf));
702 proto_register_subtree_array (ett, array_length (ett));