Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-tcg-cp-oids.c
blob43f2f15504cd1b354146fcb784d3ad3e48f5bac6
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-tcg-cp-oids.c */
4 /* asn2wrs.py -b -q -L -p tcg-cp-oids -c ./tcg-cp-oids.cnf -s ./packet-tcg-cp-oids-template -D . -O ../.. tcg-cp-oids.asn */
6 /* packet-tcg-cp-oids.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/oids.h>
19 #include <epan/asn1.h>
20 #include <wsutil/array.h>
22 #include "packet-tcg-cp-oids.h"
23 #include "packet-ber.h"
24 #include "packet-pkix1explicit.h"
25 #include "packet-pkix1implicit.h"
27 #define PNAME "TCG_CP_OIDS"
28 #define PSNAME "TCG_CP_OIDS"
29 #define PFNAME "tcg_cp_oids"
31 void proto_register_tcg_cp_oids(void);
32 void proto_reg_handoff_tcg_cp_oids(void);
34 /* Initialize the protocol and registered fields */
35 static int proto_tcg_cp_oids;
36 static int hf_tcg_cp_oids_TPMSpecification_PDU; /* TPMSpecification */
37 static int hf_tcg_cp_oids_TCGPlatformSpecification_PDU; /* TCGPlatformSpecification */
38 static int hf_tcg_cp_oids_TCPASpecVersion_PDU; /* TCPASpecVersion */
39 static int hf_tcg_cp_oids_TPMSecurityAssertions_PDU; /* TPMSecurityAssertions */
40 static int hf_tcg_cp_oids_TBBSecurityAssertions_PDU; /* TBBSecurityAssertions */
41 static int hf_tcg_cp_oids_ProtectionProfile_PDU; /* ProtectionProfile */
42 static int hf_tcg_cp_oids_SecurityTarget_PDU; /* SecurityTarget */
43 static int hf_tcg_cp_oids_TCGRelevantCredentials_PDU; /* TCGRelevantCredentials */
44 static int hf_tcg_cp_oids_TCGRelevantManifests_PDU; /* TCGRelevantManifests */
45 static int hf_tcg_cp_oids_VirtualPlatformAttestationServiceURI_PDU; /* VirtualPlatformAttestationServiceURI */
46 static int hf_tcg_cp_oids_MigrationControllerAttestationServiceURI_PDU; /* MigrationControllerAttestationServiceURI */
47 static int hf_tcg_cp_oids_MigrationControllerRegistrationServiceURI_PDU; /* MigrationControllerRegistrationServiceURI */
48 static int hf_tcg_cp_oids_VirtualPlatformBackupServiceURI_PDU; /* VirtualPlatformBackupServiceURI */
49 static int hf_tcg_cp_oids_family; /* UTF8String */
50 static int hf_tcg_cp_oids_tpm_specification_level; /* INTEGER */
51 static int hf_tcg_cp_oids_revision; /* INTEGER */
52 static int hf_tcg_cp_oids_majorVersion; /* INTEGER */
53 static int hf_tcg_cp_oids_minorVersion; /* INTEGER */
54 static int hf_tcg_cp_oids_tcg_specification_vesion; /* TCGSpecificationVersion */
55 static int hf_tcg_cp_oids_platformClass; /* OCTET_STRING */
56 static int hf_tcg_cp_oids_major; /* INTEGER */
57 static int hf_tcg_cp_oids_minor; /* INTEGER */
58 static int hf_tcg_cp_oids_security_assertions_version; /* Version */
59 static int hf_tcg_cp_oids_fieldUpgradable; /* BOOLEAN */
60 static int hf_tcg_cp_oids_ekGenerationType; /* EKGenerationType */
61 static int hf_tcg_cp_oids_ekGenerationLocation; /* EKGenerationLocation */
62 static int hf_tcg_cp_oids_ekCertificateGenerationLocation; /* EKCertificateGenerationLocation */
63 static int hf_tcg_cp_oids_ccInfo; /* CommonCriteriaMeasures */
64 static int hf_tcg_cp_oids_fipsLevel; /* FIPSLevel */
65 static int hf_tcg_cp_oids_iso9000Certified; /* BOOLEAN */
66 static int hf_tcg_cp_oids_iso9000Uri; /* IA5String */
67 static int hf_tcg_cp_oids_rtmType; /* MeasurementRootType */
68 static int hf_tcg_cp_oids_cc_measures_version_string; /* IA5String */
69 static int hf_tcg_cp_oids_assurancelevel; /* EvaluationAssuranceLevel */
70 static int hf_tcg_cp_oids_evaluationStatus; /* EvaluationStatus */
71 static int hf_tcg_cp_oids_plus; /* BOOLEAN */
72 static int hf_tcg_cp_oids_strengthOfFunction; /* StrengthOfFunction */
73 static int hf_tcg_cp_oids_profileOid; /* OBJECT_IDENTIFIER */
74 static int hf_tcg_cp_oids_profileUri; /* URIReference */
75 static int hf_tcg_cp_oids_targetOid; /* OBJECT_IDENTIFIER */
76 static int hf_tcg_cp_oids_targetUri; /* URIReference */
77 static int hf_tcg_cp_oids_uniformResourceIdentifier; /* IA5String */
78 static int hf_tcg_cp_oids_hashAlgorithm; /* AlgorithmIdentifier */
79 static int hf_tcg_cp_oids_uri_reference_hashvalue; /* BIT_STRING */
80 static int hf_tcg_cp_oids_fips_level_version_string; /* IA5String */
81 static int hf_tcg_cp_oids_fips_security_level; /* SecurityLevel */
82 static int hf_tcg_cp_oids_hashAlg; /* AlgorithmIdentifier */
83 static int hf_tcg_cp_oids_hash_alg_and_value_hashvalue; /* OCTET_STRING */
84 static int hf_tcg_cp_oids_documentURI; /* IA5String */
85 static int hf_tcg_cp_oids_documentAccessInfo; /* OBJECT_IDENTIFIER */
86 static int hf_tcg_cp_oids_documentHashInfo; /* HashAlgAndValue */
87 static int hf_tcg_cp_oids_TCGRelevantCredentials_item; /* HashedSubjectInfoURI */
88 static int hf_tcg_cp_oids_TCGRelevantManifests_item; /* HashedSubjectInfoURI */
89 static int hf_tcg_cp_oids_restoreAllowed; /* BOOLEAN */
90 static int hf_tcg_cp_oids_backupServiceURI; /* IA5String */
91 static int hf_tcg_cp_oids_UTF8String_PDU;
93 /* Initialize the subtree pointers */
94 static int ett_tcg_cp_oids_TPMSpecification;
95 static int ett_tcg_cp_oids_TCGSpecificationVersion;
96 static int ett_tcg_cp_oids_TCGPlatformSpecification;
97 static int ett_tcg_cp_oids_TCPASpecVersion;
98 static int ett_tcg_cp_oids_TPMSecurityAssertions;
99 static int ett_tcg_cp_oids_TBBSecurityAssertions;
100 static int ett_tcg_cp_oids_CommonCriteriaMeasures;
101 static int ett_tcg_cp_oids_URIReference;
102 static int ett_tcg_cp_oids_FIPSLevel;
103 static int ett_tcg_cp_oids_HashAlgAndValue;
104 static int ett_tcg_cp_oids_HashedSubjectInfoURI;
105 static int ett_tcg_cp_oids_TCGRelevantCredentials;
106 static int ett_tcg_cp_oids_TCGRelevantManifests;
107 static int ett_tcg_cp_oids_VirtualPlatformBackupServiceURI;
110 static int
111 dissect_tcg_cp_oids_UTF8String(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_UTF8String,
113 actx, tree, tvb, offset, hf_index,
114 NULL);
116 return offset;
121 static int
122 dissect_tcg_cp_oids_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_) {
123 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
124 NULL);
126 return offset;
130 static const ber_sequence_t TPMSpecification_sequence[] = {
131 { &hf_tcg_cp_oids_family , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_UTF8String },
132 { &hf_tcg_cp_oids_tpm_specification_level, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
133 { &hf_tcg_cp_oids_revision, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
134 { NULL, 0, 0, 0, NULL }
137 static int
138 dissect_tcg_cp_oids_TPMSpecification(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
139 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
140 TPMSpecification_sequence, hf_index, ett_tcg_cp_oids_TPMSpecification);
142 return offset;
146 static const ber_sequence_t TCGSpecificationVersion_sequence[] = {
147 { &hf_tcg_cp_oids_majorVersion, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
148 { &hf_tcg_cp_oids_minorVersion, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
149 { &hf_tcg_cp_oids_revision, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
150 { NULL, 0, 0, 0, NULL }
153 static int
154 dissect_tcg_cp_oids_TCGSpecificationVersion(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
155 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
156 TCGSpecificationVersion_sequence, hf_index, ett_tcg_cp_oids_TCGSpecificationVersion);
158 return offset;
163 static int
164 dissect_tcg_cp_oids_OCTET_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
165 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
166 NULL);
168 return offset;
172 static const ber_sequence_t TCGPlatformSpecification_sequence[] = {
173 { &hf_tcg_cp_oids_tcg_specification_vesion, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_TCGSpecificationVersion },
174 { &hf_tcg_cp_oids_platformClass, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_OCTET_STRING },
175 { NULL, 0, 0, 0, NULL }
178 static int
179 dissect_tcg_cp_oids_TCGPlatformSpecification(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
180 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
181 TCGPlatformSpecification_sequence, hf_index, ett_tcg_cp_oids_TCGPlatformSpecification);
183 return offset;
187 static const ber_sequence_t TCPASpecVersion_sequence[] = {
188 { &hf_tcg_cp_oids_major , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
189 { &hf_tcg_cp_oids_minor , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
190 { NULL, 0, 0, 0, NULL }
193 static int
194 dissect_tcg_cp_oids_TCPASpecVersion(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
195 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
196 TCPASpecVersion_sequence, hf_index, ett_tcg_cp_oids_TCPASpecVersion);
198 return offset;
203 static int
204 dissect_tcg_cp_oids_Version(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
205 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
206 NULL);
208 return offset;
213 static int
214 dissect_tcg_cp_oids_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_) {
215 offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
217 return offset;
221 static const value_string tcg_cp_oids_EKGenerationType_vals[] = {
222 { 0, "internal" },
223 { 1, "injected" },
224 { 2, "internalRevocable" },
225 { 3, "injectedRevocable" },
226 { 0, NULL }
230 static int
231 dissect_tcg_cp_oids_EKGenerationType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
232 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
233 NULL);
235 return offset;
239 static const value_string tcg_cp_oids_EKGenerationLocation_vals[] = {
240 { 0, "tpmManufacturer" },
241 { 1, "platformManufacturer" },
242 { 2, "ekCertSigner" },
243 { 0, NULL }
247 static int
248 dissect_tcg_cp_oids_EKGenerationLocation(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
249 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
250 NULL);
252 return offset;
256 static const value_string tcg_cp_oids_EKCertificateGenerationLocation_vals[] = {
257 { 0, "tpmManufacturer" },
258 { 1, "platformManufacturer" },
259 { 2, "ekCertSigner" },
260 { 0, NULL }
264 static int
265 dissect_tcg_cp_oids_EKCertificateGenerationLocation(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
266 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
267 NULL);
269 return offset;
274 static int
275 dissect_tcg_cp_oids_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_) {
276 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
277 actx, tree, tvb, offset, hf_index,
278 NULL);
280 return offset;
284 static const value_string tcg_cp_oids_EvaluationAssuranceLevel_vals[] = {
285 { 1, "levell" },
286 { 2, "level2" },
287 { 3, "level3" },
288 { 4, "level4" },
289 { 5, "level5" },
290 { 6, "level6" },
291 { 7, "level7" },
292 { 0, NULL }
296 static int
297 dissect_tcg_cp_oids_EvaluationAssuranceLevel(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
298 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
299 NULL);
301 return offset;
305 static const value_string tcg_cp_oids_EvaluationStatus_vals[] = {
306 { 0, "designedToMeet" },
307 { 1, "evaluationInProgress" },
308 { 2, "evaluationCompleted" },
309 { 0, NULL }
313 static int
314 dissect_tcg_cp_oids_EvaluationStatus(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
315 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
316 NULL);
318 return offset;
322 static const value_string tcg_cp_oids_StrengthOfFunction_vals[] = {
323 { 0, "basic" },
324 { 1, "medium" },
325 { 2, "high" },
326 { 0, NULL }
330 static int
331 dissect_tcg_cp_oids_StrengthOfFunction(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
332 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
333 NULL);
335 return offset;
340 static int
341 dissect_tcg_cp_oids_OBJECT_IDENTIFIER(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
342 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
344 return offset;
349 static int
350 dissect_tcg_cp_oids_BIT_STRING(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
351 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
352 NULL, 0, hf_index, -1,
353 NULL);
355 return offset;
359 static const ber_sequence_t URIReference_sequence[] = {
360 { &hf_tcg_cp_oids_uniformResourceIdentifier, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
361 { &hf_tcg_cp_oids_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
362 { &hf_tcg_cp_oids_uri_reference_hashvalue, BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BIT_STRING },
363 { NULL, 0, 0, 0, NULL }
366 static int
367 dissect_tcg_cp_oids_URIReference(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
368 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
369 URIReference_sequence, hf_index, ett_tcg_cp_oids_URIReference);
371 return offset;
375 static const ber_sequence_t CommonCriteriaMeasures_sequence[] = {
376 { &hf_tcg_cp_oids_cc_measures_version_string, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
377 { &hf_tcg_cp_oids_assurancelevel, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_EvaluationAssuranceLevel },
378 { &hf_tcg_cp_oids_evaluationStatus, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_EvaluationStatus },
379 { &hf_tcg_cp_oids_plus , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
380 { &hf_tcg_cp_oids_strengthOfFunction, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_StrengthOfFunction },
381 { &hf_tcg_cp_oids_profileOid, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_OBJECT_IDENTIFIER },
382 { &hf_tcg_cp_oids_profileUri, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_URIReference },
383 { &hf_tcg_cp_oids_targetOid, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_OBJECT_IDENTIFIER },
384 { &hf_tcg_cp_oids_targetUri, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_URIReference },
385 { NULL, 0, 0, 0, NULL }
388 static int
389 dissect_tcg_cp_oids_CommonCriteriaMeasures(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
390 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
391 CommonCriteriaMeasures_sequence, hf_index, ett_tcg_cp_oids_CommonCriteriaMeasures);
393 return offset;
397 static const value_string tcg_cp_oids_SecurityLevel_vals[] = {
398 { 1, "level1" },
399 { 2, "level2" },
400 { 3, "level3" },
401 { 4, "level4" },
402 { 0, NULL }
406 static int
407 dissect_tcg_cp_oids_SecurityLevel(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
408 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
409 NULL);
411 return offset;
415 static const ber_sequence_t FIPSLevel_sequence[] = {
416 { &hf_tcg_cp_oids_fips_level_version_string, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
417 { &hf_tcg_cp_oids_fips_security_level, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_SecurityLevel },
418 { &hf_tcg_cp_oids_plus , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
419 { NULL, 0, 0, 0, NULL }
422 static int
423 dissect_tcg_cp_oids_FIPSLevel(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
424 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
425 FIPSLevel_sequence, hf_index, ett_tcg_cp_oids_FIPSLevel);
427 return offset;
431 static const ber_sequence_t TPMSecurityAssertions_sequence[] = {
432 { &hf_tcg_cp_oids_security_assertions_version, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_Version },
433 { &hf_tcg_cp_oids_fieldUpgradable, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
434 { &hf_tcg_cp_oids_ekGenerationType, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_EKGenerationType },
435 { &hf_tcg_cp_oids_ekGenerationLocation, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_EKGenerationLocation },
436 { &hf_tcg_cp_oids_ekCertificateGenerationLocation, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_EKCertificateGenerationLocation },
437 { &hf_tcg_cp_oids_ccInfo , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_CommonCriteriaMeasures },
438 { &hf_tcg_cp_oids_fipsLevel, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_FIPSLevel },
439 { &hf_tcg_cp_oids_iso9000Certified, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_BOOLEAN },
440 { &hf_tcg_cp_oids_iso9000Uri, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
441 { NULL, 0, 0, 0, NULL }
444 static int
445 dissect_tcg_cp_oids_TPMSecurityAssertions(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
446 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
447 TPMSecurityAssertions_sequence, hf_index, ett_tcg_cp_oids_TPMSecurityAssertions);
449 return offset;
453 static const value_string tcg_cp_oids_MeasurementRootType_vals[] = {
454 { 0, "static" },
455 { 1, "dynamic" },
456 { 2, "nonHost" },
457 { 3, "hybrid" },
458 { 4, "physical" },
459 { 5, "virtual" },
460 { 0, NULL }
464 static int
465 dissect_tcg_cp_oids_MeasurementRootType(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
466 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
467 NULL);
469 return offset;
473 static const ber_sequence_t TBBSecurityAssertions_sequence[] = {
474 { &hf_tcg_cp_oids_security_assertions_version, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_Version },
475 { &hf_tcg_cp_oids_ccInfo , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_CommonCriteriaMeasures },
476 { &hf_tcg_cp_oids_fipsLevel, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_FIPSLevel },
477 { &hf_tcg_cp_oids_rtmType , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_MeasurementRootType },
478 { &hf_tcg_cp_oids_iso9000Certified, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
479 { &hf_tcg_cp_oids_iso9000Uri, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
480 { NULL, 0, 0, 0, NULL }
483 static int
484 dissect_tcg_cp_oids_TBBSecurityAssertions(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
485 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
486 TBBSecurityAssertions_sequence, hf_index, ett_tcg_cp_oids_TBBSecurityAssertions);
488 return offset;
493 static int
494 dissect_tcg_cp_oids_ProtectionProfile(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
495 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
497 return offset;
502 static int
503 dissect_tcg_cp_oids_SecurityTarget(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
504 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
506 return offset;
510 static const ber_sequence_t HashAlgAndValue_sequence[] = {
511 { &hf_tcg_cp_oids_hashAlg , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
512 { &hf_tcg_cp_oids_hash_alg_and_value_hashvalue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_OCTET_STRING },
513 { NULL, 0, 0, 0, NULL }
516 static int
517 dissect_tcg_cp_oids_HashAlgAndValue(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
518 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
519 HashAlgAndValue_sequence, hf_index, ett_tcg_cp_oids_HashAlgAndValue);
521 return offset;
525 static const ber_sequence_t HashedSubjectInfoURI_sequence[] = {
526 { &hf_tcg_cp_oids_documentURI, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
527 { &hf_tcg_cp_oids_documentAccessInfo, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_OBJECT_IDENTIFIER },
528 { &hf_tcg_cp_oids_documentHashInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_HashAlgAndValue },
529 { NULL, 0, 0, 0, NULL }
532 static int
533 dissect_tcg_cp_oids_HashedSubjectInfoURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
534 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
535 HashedSubjectInfoURI_sequence, hf_index, ett_tcg_cp_oids_HashedSubjectInfoURI);
537 return offset;
541 static const ber_sequence_t TCGRelevantCredentials_sequence_of[1] = {
542 { &hf_tcg_cp_oids_TCGRelevantCredentials_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_HashedSubjectInfoURI },
545 static int
546 dissect_tcg_cp_oids_TCGRelevantCredentials(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
547 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
548 TCGRelevantCredentials_sequence_of, hf_index, ett_tcg_cp_oids_TCGRelevantCredentials);
550 return offset;
554 static const ber_sequence_t TCGRelevantManifests_sequence_of[1] = {
555 { &hf_tcg_cp_oids_TCGRelevantManifests_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_HashedSubjectInfoURI },
558 static int
559 dissect_tcg_cp_oids_TCGRelevantManifests(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
560 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
561 TCGRelevantManifests_sequence_of, hf_index, ett_tcg_cp_oids_TCGRelevantManifests);
563 return offset;
568 static int
569 dissect_tcg_cp_oids_VirtualPlatformAttestationServiceURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
570 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
571 actx, tree, tvb, offset, hf_index,
572 NULL);
574 return offset;
579 static int
580 dissect_tcg_cp_oids_MigrationControllerAttestationServiceURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
581 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
582 actx, tree, tvb, offset, hf_index,
583 NULL);
585 return offset;
590 static int
591 dissect_tcg_cp_oids_MigrationControllerRegistrationServiceURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
592 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
593 actx, tree, tvb, offset, hf_index,
594 NULL);
596 return offset;
600 static const ber_sequence_t VirtualPlatformBackupServiceURI_sequence[] = {
601 { &hf_tcg_cp_oids_restoreAllowed, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
602 { &hf_tcg_cp_oids_backupServiceURI, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
603 { NULL, 0, 0, 0, NULL }
606 static int
607 dissect_tcg_cp_oids_VirtualPlatformBackupServiceURI(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
608 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
609 VirtualPlatformBackupServiceURI_sequence, hf_index, ett_tcg_cp_oids_VirtualPlatformBackupServiceURI);
611 return offset;
614 /*--- PDUs ---*/
616 static int dissect_TPMSpecification_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
617 int offset = 0;
618 asn1_ctx_t asn1_ctx;
619 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
620 offset = dissect_tcg_cp_oids_TPMSpecification(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TPMSpecification_PDU);
621 return offset;
623 static int dissect_TCGPlatformSpecification_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
624 int offset = 0;
625 asn1_ctx_t asn1_ctx;
626 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
627 offset = dissect_tcg_cp_oids_TCGPlatformSpecification(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCGPlatformSpecification_PDU);
628 return offset;
630 static int dissect_TCPASpecVersion_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
631 int offset = 0;
632 asn1_ctx_t asn1_ctx;
633 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
634 offset = dissect_tcg_cp_oids_TCPASpecVersion(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCPASpecVersion_PDU);
635 return offset;
637 static int dissect_TPMSecurityAssertions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
638 int offset = 0;
639 asn1_ctx_t asn1_ctx;
640 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
641 offset = dissect_tcg_cp_oids_TPMSecurityAssertions(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TPMSecurityAssertions_PDU);
642 return offset;
644 static int dissect_TBBSecurityAssertions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
645 int offset = 0;
646 asn1_ctx_t asn1_ctx;
647 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
648 offset = dissect_tcg_cp_oids_TBBSecurityAssertions(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TBBSecurityAssertions_PDU);
649 return offset;
651 static int dissect_ProtectionProfile_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
652 int offset = 0;
653 asn1_ctx_t asn1_ctx;
654 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
655 offset = dissect_tcg_cp_oids_ProtectionProfile(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_ProtectionProfile_PDU);
656 return offset;
658 static int dissect_SecurityTarget_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
659 int offset = 0;
660 asn1_ctx_t asn1_ctx;
661 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
662 offset = dissect_tcg_cp_oids_SecurityTarget(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_SecurityTarget_PDU);
663 return offset;
665 static int dissect_TCGRelevantCredentials_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
666 int offset = 0;
667 asn1_ctx_t asn1_ctx;
668 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
669 offset = dissect_tcg_cp_oids_TCGRelevantCredentials(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCGRelevantCredentials_PDU);
670 return offset;
672 static int dissect_TCGRelevantManifests_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
673 int offset = 0;
674 asn1_ctx_t asn1_ctx;
675 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
676 offset = dissect_tcg_cp_oids_TCGRelevantManifests(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCGRelevantManifests_PDU);
677 return offset;
679 static int dissect_VirtualPlatformAttestationServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
680 int offset = 0;
681 asn1_ctx_t asn1_ctx;
682 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
683 offset = dissect_tcg_cp_oids_VirtualPlatformAttestationServiceURI(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_VirtualPlatformAttestationServiceURI_PDU);
684 return offset;
686 static int dissect_MigrationControllerAttestationServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
687 int offset = 0;
688 asn1_ctx_t asn1_ctx;
689 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
690 offset = dissect_tcg_cp_oids_MigrationControllerAttestationServiceURI(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_MigrationControllerAttestationServiceURI_PDU);
691 return offset;
693 static int dissect_MigrationControllerRegistrationServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
694 int offset = 0;
695 asn1_ctx_t asn1_ctx;
696 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
697 offset = dissect_tcg_cp_oids_MigrationControllerRegistrationServiceURI(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_MigrationControllerRegistrationServiceURI_PDU);
698 return offset;
700 static int dissect_VirtualPlatformBackupServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
701 int offset = 0;
702 asn1_ctx_t asn1_ctx;
703 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
704 offset = dissect_tcg_cp_oids_VirtualPlatformBackupServiceURI(false, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_VirtualPlatformBackupServiceURI_PDU);
705 return offset;
710 /*--- proto_register_tcg_cp_oids ----------------------------------------------*/
711 void proto_register_tcg_cp_oids(void) {
713 /* List of fields */
714 static hf_register_info hf[] = {
715 { &hf_tcg_cp_oids_UTF8String_PDU,
716 { "UTF8String", "tcg-cp-oids.UTF8String",
717 FT_STRING, BASE_NONE, NULL, 0,
718 NULL, HFILL }},
719 { &hf_tcg_cp_oids_TPMSpecification_PDU,
720 { "TPMSpecification", "tcg-cp-oids.TPMSpecification_element",
721 FT_NONE, BASE_NONE, NULL, 0,
722 NULL, HFILL }},
723 { &hf_tcg_cp_oids_TCGPlatformSpecification_PDU,
724 { "TCGPlatformSpecification", "tcg-cp-oids.TCGPlatformSpecification_element",
725 FT_NONE, BASE_NONE, NULL, 0,
726 NULL, HFILL }},
727 { &hf_tcg_cp_oids_TCPASpecVersion_PDU,
728 { "TCPASpecVersion", "tcg-cp-oids.TCPASpecVersion_element",
729 FT_NONE, BASE_NONE, NULL, 0,
730 NULL, HFILL }},
731 { &hf_tcg_cp_oids_TPMSecurityAssertions_PDU,
732 { "TPMSecurityAssertions", "tcg-cp-oids.TPMSecurityAssertions_element",
733 FT_NONE, BASE_NONE, NULL, 0,
734 NULL, HFILL }},
735 { &hf_tcg_cp_oids_TBBSecurityAssertions_PDU,
736 { "TBBSecurityAssertions", "tcg-cp-oids.TBBSecurityAssertions_element",
737 FT_NONE, BASE_NONE, NULL, 0,
738 NULL, HFILL }},
739 { &hf_tcg_cp_oids_ProtectionProfile_PDU,
740 { "ProtectionProfile", "tcg-cp-oids.ProtectionProfile",
741 FT_OID, BASE_NONE, NULL, 0,
742 NULL, HFILL }},
743 { &hf_tcg_cp_oids_SecurityTarget_PDU,
744 { "SecurityTarget", "tcg-cp-oids.SecurityTarget",
745 FT_OID, BASE_NONE, NULL, 0,
746 NULL, HFILL }},
747 { &hf_tcg_cp_oids_TCGRelevantCredentials_PDU,
748 { "TCGRelevantCredentials", "tcg-cp-oids.TCGRelevantCredentials",
749 FT_UINT32, BASE_DEC, NULL, 0,
750 NULL, HFILL }},
751 { &hf_tcg_cp_oids_TCGRelevantManifests_PDU,
752 { "TCGRelevantManifests", "tcg-cp-oids.TCGRelevantManifests",
753 FT_UINT32, BASE_DEC, NULL, 0,
754 NULL, HFILL }},
755 { &hf_tcg_cp_oids_VirtualPlatformAttestationServiceURI_PDU,
756 { "VirtualPlatformAttestationServiceURI", "tcg-cp-oids.VirtualPlatformAttestationServiceURI",
757 FT_STRING, BASE_NONE, NULL, 0,
758 NULL, HFILL }},
759 { &hf_tcg_cp_oids_MigrationControllerAttestationServiceURI_PDU,
760 { "MigrationControllerAttestationServiceURI", "tcg-cp-oids.MigrationControllerAttestationServiceURI",
761 FT_STRING, BASE_NONE, NULL, 0,
762 NULL, HFILL }},
763 { &hf_tcg_cp_oids_MigrationControllerRegistrationServiceURI_PDU,
764 { "MigrationControllerRegistrationServiceURI", "tcg-cp-oids.MigrationControllerRegistrationServiceURI",
765 FT_STRING, BASE_NONE, NULL, 0,
766 NULL, HFILL }},
767 { &hf_tcg_cp_oids_VirtualPlatformBackupServiceURI_PDU,
768 { "VirtualPlatformBackupServiceURI", "tcg-cp-oids.VirtualPlatformBackupServiceURI_element",
769 FT_NONE, BASE_NONE, NULL, 0,
770 NULL, HFILL }},
771 { &hf_tcg_cp_oids_family,
772 { "family", "tcg-cp-oids.family",
773 FT_STRING, BASE_NONE, NULL, 0,
774 "UTF8String", HFILL }},
775 { &hf_tcg_cp_oids_tpm_specification_level,
776 { "level", "tcg-cp-oids.level",
777 FT_INT32, BASE_DEC, NULL, 0,
778 "INTEGER", HFILL }},
779 { &hf_tcg_cp_oids_revision,
780 { "revision", "tcg-cp-oids.revision",
781 FT_INT32, BASE_DEC, NULL, 0,
782 "INTEGER", HFILL }},
783 { &hf_tcg_cp_oids_majorVersion,
784 { "majorVersion", "tcg-cp-oids.majorVersion",
785 FT_INT32, BASE_DEC, NULL, 0,
786 "INTEGER", HFILL }},
787 { &hf_tcg_cp_oids_minorVersion,
788 { "minorVersion", "tcg-cp-oids.minorVersion",
789 FT_INT32, BASE_DEC, NULL, 0,
790 "INTEGER", HFILL }},
791 { &hf_tcg_cp_oids_tcg_specification_vesion,
792 { "version", "tcg-cp-oids.version_element",
793 FT_NONE, BASE_NONE, NULL, 0,
794 "TCGSpecificationVersion", HFILL }},
795 { &hf_tcg_cp_oids_platformClass,
796 { "platformClass", "tcg-cp-oids.platformClass",
797 FT_BYTES, BASE_NONE, NULL, 0,
798 "OCTET_STRING", HFILL }},
799 { &hf_tcg_cp_oids_major,
800 { "major", "tcg-cp-oids.major",
801 FT_INT32, BASE_DEC, NULL, 0,
802 "INTEGER", HFILL }},
803 { &hf_tcg_cp_oids_minor,
804 { "minor", "tcg-cp-oids.minor",
805 FT_INT32, BASE_DEC, NULL, 0,
806 "INTEGER", HFILL }},
807 { &hf_tcg_cp_oids_security_assertions_version,
808 { "version", "tcg-cp-oids.version",
809 FT_INT32, BASE_DEC, VALS(pkix1explicit_Version_vals), 0,
810 NULL, HFILL }},
811 { &hf_tcg_cp_oids_fieldUpgradable,
812 { "fieldUpgradable", "tcg-cp-oids.fieldUpgradable",
813 FT_BOOLEAN, BASE_NONE, NULL, 0,
814 "BOOLEAN", HFILL }},
815 { &hf_tcg_cp_oids_ekGenerationType,
816 { "ekGenerationType", "tcg-cp-oids.ekGenerationType",
817 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EKGenerationType_vals), 0,
818 NULL, HFILL }},
819 { &hf_tcg_cp_oids_ekGenerationLocation,
820 { "ekGenerationLocation", "tcg-cp-oids.ekGenerationLocation",
821 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EKGenerationLocation_vals), 0,
822 NULL, HFILL }},
823 { &hf_tcg_cp_oids_ekCertificateGenerationLocation,
824 { "ekCertificateGenerationLocation", "tcg-cp-oids.ekCertificateGenerationLocation",
825 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EKCertificateGenerationLocation_vals), 0,
826 NULL, HFILL }},
827 { &hf_tcg_cp_oids_ccInfo,
828 { "ccInfo", "tcg-cp-oids.ccInfo_element",
829 FT_NONE, BASE_NONE, NULL, 0,
830 "CommonCriteriaMeasures", HFILL }},
831 { &hf_tcg_cp_oids_fipsLevel,
832 { "fipsLevel", "tcg-cp-oids.fipsLevel_element",
833 FT_NONE, BASE_NONE, NULL, 0,
834 NULL, HFILL }},
835 { &hf_tcg_cp_oids_iso9000Certified,
836 { "iso9000Certified", "tcg-cp-oids.iso9000Certified",
837 FT_BOOLEAN, BASE_NONE, NULL, 0,
838 "BOOLEAN", HFILL }},
839 { &hf_tcg_cp_oids_iso9000Uri,
840 { "iso9000Uri", "tcg-cp-oids.iso9000Uri",
841 FT_STRING, BASE_NONE, NULL, 0,
842 "IA5String", HFILL }},
843 { &hf_tcg_cp_oids_rtmType,
844 { "rtmType", "tcg-cp-oids.rtmType",
845 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_MeasurementRootType_vals), 0,
846 "MeasurementRootType", HFILL }},
847 { &hf_tcg_cp_oids_cc_measures_version_string,
848 { "version", "tcg-cp-oids.version",
849 FT_STRING, BASE_NONE, NULL, 0,
850 "IA5String", HFILL }},
851 { &hf_tcg_cp_oids_assurancelevel,
852 { "assurancelevel", "tcg-cp-oids.assurancelevel",
853 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EvaluationAssuranceLevel_vals), 0,
854 "EvaluationAssuranceLevel", HFILL }},
855 { &hf_tcg_cp_oids_evaluationStatus,
856 { "evaluationStatus", "tcg-cp-oids.evaluationStatus",
857 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EvaluationStatus_vals), 0,
858 NULL, HFILL }},
859 { &hf_tcg_cp_oids_plus,
860 { "plus", "tcg-cp-oids.plus",
861 FT_BOOLEAN, BASE_NONE, NULL, 0,
862 "BOOLEAN", HFILL }},
863 { &hf_tcg_cp_oids_strengthOfFunction,
864 { "strengthOfFunction", "tcg-cp-oids.strengthOfFunction",
865 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_StrengthOfFunction_vals), 0,
866 NULL, HFILL }},
867 { &hf_tcg_cp_oids_profileOid,
868 { "profileOid", "tcg-cp-oids.profileOid",
869 FT_OID, BASE_NONE, NULL, 0,
870 "OBJECT_IDENTIFIER", HFILL }},
871 { &hf_tcg_cp_oids_profileUri,
872 { "profileUri", "tcg-cp-oids.profileUri_element",
873 FT_NONE, BASE_NONE, NULL, 0,
874 "URIReference", HFILL }},
875 { &hf_tcg_cp_oids_targetOid,
876 { "targetOid", "tcg-cp-oids.targetOid",
877 FT_OID, BASE_NONE, NULL, 0,
878 "OBJECT_IDENTIFIER", HFILL }},
879 { &hf_tcg_cp_oids_targetUri,
880 { "targetUri", "tcg-cp-oids.targetUri_element",
881 FT_NONE, BASE_NONE, NULL, 0,
882 "URIReference", HFILL }},
883 { &hf_tcg_cp_oids_uniformResourceIdentifier,
884 { "uniformResourceIdentifier", "tcg-cp-oids.uniformResourceIdentifier",
885 FT_STRING, BASE_NONE, NULL, 0,
886 "IA5String", HFILL }},
887 { &hf_tcg_cp_oids_hashAlgorithm,
888 { "hashAlgorithm", "tcg-cp-oids.hashAlgorithm_element",
889 FT_NONE, BASE_NONE, NULL, 0,
890 "AlgorithmIdentifier", HFILL }},
891 { &hf_tcg_cp_oids_uri_reference_hashvalue,
892 { "hashValue", "tcg-cp-oids.hashValue",
893 FT_BYTES, BASE_NONE, NULL, 0,
894 "BIT_STRING", HFILL }},
895 { &hf_tcg_cp_oids_fips_level_version_string,
896 { "version", "tcg-cp-oids.version",
897 FT_STRING, BASE_NONE, NULL, 0,
898 "IA5String", HFILL }},
899 { &hf_tcg_cp_oids_fips_security_level,
900 { "level", "tcg-cp-oids.level",
901 FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_SecurityLevel_vals), 0,
902 "SecurityLevel", HFILL }},
903 { &hf_tcg_cp_oids_hashAlg,
904 { "hashAlg", "tcg-cp-oids.hashAlg_element",
905 FT_NONE, BASE_NONE, NULL, 0,
906 "AlgorithmIdentifier", HFILL }},
907 { &hf_tcg_cp_oids_hash_alg_and_value_hashvalue,
908 { "hashValue", "tcg-cp-oids.hashValue",
909 FT_BYTES, BASE_NONE, NULL, 0,
910 "OCTET_STRING", HFILL }},
911 { &hf_tcg_cp_oids_documentURI,
912 { "documentURI", "tcg-cp-oids.documentURI",
913 FT_STRING, BASE_NONE, NULL, 0,
914 "IA5String", HFILL }},
915 { &hf_tcg_cp_oids_documentAccessInfo,
916 { "documentAccessInfo", "tcg-cp-oids.documentAccessInfo",
917 FT_OID, BASE_NONE, NULL, 0,
918 "OBJECT_IDENTIFIER", HFILL }},
919 { &hf_tcg_cp_oids_documentHashInfo,
920 { "documentHashInfo", "tcg-cp-oids.documentHashInfo_element",
921 FT_NONE, BASE_NONE, NULL, 0,
922 "HashAlgAndValue", HFILL }},
923 { &hf_tcg_cp_oids_TCGRelevantCredentials_item,
924 { "HashedSubjectInfoURI", "tcg-cp-oids.HashedSubjectInfoURI_element",
925 FT_NONE, BASE_NONE, NULL, 0,
926 NULL, HFILL }},
927 { &hf_tcg_cp_oids_TCGRelevantManifests_item,
928 { "HashedSubjectInfoURI", "tcg-cp-oids.HashedSubjectInfoURI_element",
929 FT_NONE, BASE_NONE, NULL, 0,
930 NULL, HFILL }},
931 { &hf_tcg_cp_oids_restoreAllowed,
932 { "restoreAllowed", "tcg-cp-oids.restoreAllowed",
933 FT_BOOLEAN, BASE_NONE, NULL, 0,
934 "BOOLEAN", HFILL }},
935 { &hf_tcg_cp_oids_backupServiceURI,
936 { "backupServiceURI", "tcg-cp-oids.backupServiceURI",
937 FT_STRING, BASE_NONE, NULL, 0,
938 "IA5String", HFILL }},
941 /* List of subtrees */
942 static int *ett[] = {
943 &ett_tcg_cp_oids_TPMSpecification,
944 &ett_tcg_cp_oids_TCGSpecificationVersion,
945 &ett_tcg_cp_oids_TCGPlatformSpecification,
946 &ett_tcg_cp_oids_TCPASpecVersion,
947 &ett_tcg_cp_oids_TPMSecurityAssertions,
948 &ett_tcg_cp_oids_TBBSecurityAssertions,
949 &ett_tcg_cp_oids_CommonCriteriaMeasures,
950 &ett_tcg_cp_oids_URIReference,
951 &ett_tcg_cp_oids_FIPSLevel,
952 &ett_tcg_cp_oids_HashAlgAndValue,
953 &ett_tcg_cp_oids_HashedSubjectInfoURI,
954 &ett_tcg_cp_oids_TCGRelevantCredentials,
955 &ett_tcg_cp_oids_TCGRelevantManifests,
956 &ett_tcg_cp_oids_VirtualPlatformBackupServiceURI,
959 /* Register protocol */
960 proto_tcg_cp_oids = proto_register_protocol(PNAME, PSNAME, PFNAME);
962 /* Register fields and subtrees */
963 proto_register_field_array(proto_tcg_cp_oids, hf, array_length(hf));
964 proto_register_subtree_array(ett, array_length(ett));
967 /* to be able to register OIDs for UTF8String */
968 static int
969 dissect_tcg_cp_oids_UTF8String_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
970 int offset = 0;
971 asn1_ctx_t actx;
972 asn1_ctx_init(&actx, ASN1_ENC_BER, true, pinfo);
973 offset = dissect_ber_restricted_string(false, BER_UNI_TAG_UTF8String, &actx, tree, tvb, offset, hf_tcg_cp_oids_UTF8String_PDU, NULL);
974 return offset;
977 /*--- proto_reg_handoff_tcg_cp_oids -------------------------------------------*/
978 void proto_reg_handoff_tcg_cp_oids(void) {
979 register_ber_oid_dissector("2.23.133.1", dissect_TCPASpecVersion_PDU, proto_tcg_cp_oids, "tcg-tcpaSpecVersion");
980 register_ber_oid_dissector("2.23.133.2.11", dissect_ProtectionProfile_PDU, proto_tcg_cp_oids, "tcg-at-tpmProtectionProfile");
981 register_ber_oid_dissector("2.23.133.2.12", dissect_SecurityTarget_PDU, proto_tcg_cp_oids, "tcg-at-tpmSecurityTarget");
982 register_ber_oid_dissector("2.23.133.2.13", dissect_ProtectionProfile_PDU, proto_tcg_cp_oids, "tcg-at-tbbProtectionProfile");
983 register_ber_oid_dissector("2.23.133.2.14", dissect_SecurityTarget_PDU, proto_tcg_cp_oids, "tcg-at-tbbSecurityTarget");
984 register_ber_oid_dissector("2.23.133.2.16", dissect_TPMSpecification_PDU, proto_tcg_cp_oids, "tcg-at-tpmSpecification");
985 register_ber_oid_dissector("2.23.133.2.17", dissect_TCGPlatformSpecification_PDU, proto_tcg_cp_oids, "tcg-at-tcgPlatformSpecification");
986 register_ber_oid_dissector("2.23.133.2.18", dissect_TPMSecurityAssertions_PDU, proto_tcg_cp_oids, "tcg-at-tpmSecurityAssertions");
987 register_ber_oid_dissector("2.23.133.2.19", dissect_TBBSecurityAssertions_PDU, proto_tcg_cp_oids, "tcg-at-tbbSecurityAssertions");
988 register_ber_oid_dissector("2.23.133.6.2", dissect_TCGRelevantCredentials_PDU, proto_tcg_cp_oids, "tcg-ce-relevantCredentials");
989 register_ber_oid_dissector("2.23.133.6.3", dissect_TCGRelevantManifests_PDU, proto_tcg_cp_oids, "tcg-ce-relevantManifests");
990 register_ber_oid_dissector("2.23.133.6.4", dissect_VirtualPlatformAttestationServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-virtualPlatformAttestationService");
991 register_ber_oid_dissector("2.23.133.6.5", dissect_MigrationControllerAttestationServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-migrationControllerAttestationService");
992 register_ber_oid_dissector("2.23.133.6.6", dissect_MigrationControllerRegistrationServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-migrationControllerRegistrationService");
993 register_ber_oid_dissector("2.23.133.6.7", dissect_VirtualPlatformBackupServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-virtualPlatformBackupService");
995 oid_add_from_string("tcg","2.23.133");
996 oid_add_from_string("tcg-attribute","2.23.133.2");
997 oid_add_from_string("tcg-protocol","2.23.133.3");
998 oid_add_from_string("tcg-algorithm","2.23.133.4");
999 oid_add_from_string("tcg-ce","2.23.133.6");
1000 oid_add_from_string("tcg-kp","2.23.133.8");
1001 /* TCG Spec Version OIDs */
1002 oid_add_from_string("tcg-sv-tpm12","2.23.133.1.1");
1003 oid_add_from_string("tcg-sv-tpm20","2.23.133.1.2");
1004 /* TCG Attribute OIDs */
1005 oid_add_from_string("tcg-at-securityQualities","2.23.133.2.10");
1006 /* TCG Algorithm OIDs */
1007 oid_add_from_string("tcg-algorithm-null","2.23.133.4.1");
1008 /* TCG Key Purposes OIDs */
1009 oid_add_from_string("tcg-kp-EKCertificate","2.23.133.8.1");
1010 oid_add_from_string("tcg-kp-PlatformCertificate","2.23.133.8.2");
1011 oid_add_from_string("tcg-kp-AIKCertificate","2.23.133.8.3");
1012 /* TCG Protocol OIDs */
1013 oid_add_from_string("tcg-prt-tpmIdProtocol","2.23.133.3.1");
1015 register_ber_oid_dissector("2.23.133.2.1", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmManufacturer");
1016 register_ber_oid_dissector("2.23.133.2.2", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmModel");
1017 register_ber_oid_dissector("2.23.133.2.3", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmVersion");
1018 register_ber_oid_dissector("2.23.133.2.4", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-platformManufacturer");
1019 register_ber_oid_dissector("2.23.133.2.5", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-platformModel");
1020 register_ber_oid_dissector("2.23.133.2.6", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-platformVersion");
1021 register_ber_oid_dissector("2.23.133.2.15", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmIdLabel");