summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcg-cp-oids.c
blob: 6c6eda076e2e6242996da4ca8f32f0f8ed7f6663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
/* Do not modify this file. Changes will be overwritten.                      */
/* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
/* packet-tcg-cp-oids.c                                                       */
/* asn2wrs.py -b -L -p tcg-cp-oids -c ./tcg-cp-oids.cnf -s ./packet-tcg-cp-oids-template -D . -O ../.. tcg-cp-oids.asn */

/* packet-tcg-cp-oids.c
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#include "config.h"

#include <epan/packet.h>
#include <epan/oids.h>
#include <epan/asn1.h>

#include "packet-tcg-cp-oids.h"
#include "packet-ber.h"
#include "packet-pkix1explicit.h"
#include "packet-pkix1implicit.h"

#define PNAME  "TCG_CP_OIDS"
#define PSNAME "TCG_CP_OIDS"
#define PFNAME "tcg_cp_oids"

void proto_register_tcg_cp_oids(void);
void proto_reg_handoff_tcg_cp_oids(void);

/* Initialize the protocol and registered fields */
static int proto_tcg_cp_oids = -1;
static int hf_tcg_cp_oids_TPMSpecification_PDU = -1;  /* TPMSpecification */
static int hf_tcg_cp_oids_TCGPlatformSpecification_PDU = -1;  /* TCGPlatformSpecification */
static int hf_tcg_cp_oids_TCPASpecVersion_PDU = -1;  /* TCPASpecVersion */
static int hf_tcg_cp_oids_TPMSecurityAssertions_PDU = -1;  /* TPMSecurityAssertions */
static int hf_tcg_cp_oids_TBBSecurityAssertions_PDU = -1;  /* TBBSecurityAssertions */
static int hf_tcg_cp_oids_ProtectionProfile_PDU = -1;  /* ProtectionProfile */
static int hf_tcg_cp_oids_SecurityTarget_PDU = -1;  /* SecurityTarget */
static int hf_tcg_cp_oids_TCGRelevantCredentials_PDU = -1;  /* TCGRelevantCredentials */
static int hf_tcg_cp_oids_TCGRelevantManifests_PDU = -1;  /* TCGRelevantManifests */
static int hf_tcg_cp_oids_VirtualPlatformAttestationServiceURI_PDU = -1;  /* VirtualPlatformAttestationServiceURI */
static int hf_tcg_cp_oids_MigrationControllerAttestationServiceURI_PDU = -1;  /* MigrationControllerAttestationServiceURI */
static int hf_tcg_cp_oids_MigrationControllerRegistrationServiceURI_PDU = -1;  /* MigrationControllerRegistrationServiceURI */
static int hf_tcg_cp_oids_VirtualPlatformBackupServiceURI_PDU = -1;  /* VirtualPlatformBackupServiceURI */
static int hf_tcg_cp_oids_family = -1;            /* UTF8String */
static int hf_tcg_cp_oids_tpm_specification_level = -1;  /* INTEGER */
static int hf_tcg_cp_oids_revision = -1;          /* INTEGER */
static int hf_tcg_cp_oids_majorVersion = -1;      /* INTEGER */
static int hf_tcg_cp_oids_minorVersion = -1;      /* INTEGER */
static int hf_tcg_cp_oids_tcg_specification_vesion = -1;  /* TCGSpecificationVersion */
static int hf_tcg_cp_oids_platformClass = -1;     /* OCTET_STRING */
static int hf_tcg_cp_oids_major = -1;             /* INTEGER */
static int hf_tcg_cp_oids_minor = -1;             /* INTEGER */
static int hf_tcg_cp_oids_security_assertions_version = -1;  /* Version */
static int hf_tcg_cp_oids_fieldUpgradable = -1;   /* BOOLEAN */
static int hf_tcg_cp_oids_ekGenerationType = -1;  /* EKGenerationType */
static int hf_tcg_cp_oids_ekGenerationLocation = -1;  /* EKGenerationLocation */
static int hf_tcg_cp_oids_ekCertificateGenerationLocation = -1;  /* EKCertificateGenerationLocation */
static int hf_tcg_cp_oids_ccInfo = -1;            /* CommonCriteriaMeasures */
static int hf_tcg_cp_oids_fipsLevel = -1;         /* FIPSLevel */
static int hf_tcg_cp_oids_iso9000Certified = -1;  /* BOOLEAN */
static int hf_tcg_cp_oids_iso9000Uri = -1;        /* IA5String */
static int hf_tcg_cp_oids_rtmType = -1;           /* MeasurementRootType */
static int hf_tcg_cp_oids_cc_measures_version_string = -1;  /* IA5String */
static int hf_tcg_cp_oids_assurancelevel = -1;    /* EvaluationAssuranceLevel */
static int hf_tcg_cp_oids_evaluationStatus = -1;  /* EvaluationStatus */
static int hf_tcg_cp_oids_plus = -1;              /* BOOLEAN */
static int hf_tcg_cp_oids_strengthOfFunction = -1;  /* StrengthOfFunction */
static int hf_tcg_cp_oids_profileOid = -1;        /* OBJECT_IDENTIFIER */
static int hf_tcg_cp_oids_profileUri = -1;        /* URIReference */
static int hf_tcg_cp_oids_targetOid = -1;         /* OBJECT_IDENTIFIER */
static int hf_tcg_cp_oids_targetUri = -1;         /* URIReference */
static int hf_tcg_cp_oids_uniformResourceIdentifier = -1;  /* IA5String */
static int hf_tcg_cp_oids_hashAlgorithm = -1;     /* AlgorithmIdentifier */
static int hf_tcg_cp_oids_uri_reference_hashvalue = -1;  /* BIT_STRING */
static int hf_tcg_cp_oids_fips_level_version_string = -1;  /* IA5String */
static int hf_tcg_cp_oids_fips_security_level = -1;  /* SecurityLevel */
static int hf_tcg_cp_oids_hashAlg = -1;           /* AlgorithmIdentifier */
static int hf_tcg_cp_oids_hash_alg_and_value_hashvalue = -1;  /* OCTET_STRING */
static int hf_tcg_cp_oids_documentURI = -1;       /* IA5String */
static int hf_tcg_cp_oids_documentAccessInfo = -1;  /* OBJECT_IDENTIFIER */
static int hf_tcg_cp_oids_documentHashInfo = -1;  /* HashAlgAndValue */
static int hf_tcg_cp_oids_TCGRelevantCredentials_item = -1;  /* HashedSubjectInfoURI */
static int hf_tcg_cp_oids_TCGRelevantManifests_item = -1;  /* HashedSubjectInfoURI */
static int hf_tcg_cp_oids_restoreAllowed = -1;    /* BOOLEAN */
static int hf_tcg_cp_oids_backupServiceURI = -1;  /* IA5String */
static int hf_tcg_cp_oids_UTF8String_PDU = -1;

/* Initialize the subtree pointers */
static gint ett_tcg_cp_oids_TPMSpecification = -1;
static gint ett_tcg_cp_oids_TCGSpecificationVersion = -1;
static gint ett_tcg_cp_oids_TCGPlatformSpecification = -1;
static gint ett_tcg_cp_oids_TCPASpecVersion = -1;
static gint ett_tcg_cp_oids_TPMSecurityAssertions = -1;
static gint ett_tcg_cp_oids_TBBSecurityAssertions = -1;
static gint ett_tcg_cp_oids_CommonCriteriaMeasures = -1;
static gint ett_tcg_cp_oids_URIReference = -1;
static gint ett_tcg_cp_oids_FIPSLevel = -1;
static gint ett_tcg_cp_oids_HashAlgAndValue = -1;
static gint ett_tcg_cp_oids_HashedSubjectInfoURI = -1;
static gint ett_tcg_cp_oids_TCGRelevantCredentials = -1;
static gint ett_tcg_cp_oids_TCGRelevantManifests = -1;
static gint ett_tcg_cp_oids_VirtualPlatformBackupServiceURI = -1;


static int
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_) {
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
                                            actx, tree, tvb, offset, hf_index,
                                            NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                                NULL);

  return offset;
}


static const ber_sequence_t TPMSpecification_sequence[] = {
  { &hf_tcg_cp_oids_family  , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_UTF8String },
  { &hf_tcg_cp_oids_tpm_specification_level, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { &hf_tcg_cp_oids_revision, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   TPMSpecification_sequence, hf_index, ett_tcg_cp_oids_TPMSpecification);

  return offset;
}


static const ber_sequence_t TCGSpecificationVersion_sequence[] = {
  { &hf_tcg_cp_oids_majorVersion, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { &hf_tcg_cp_oids_minorVersion, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { &hf_tcg_cp_oids_revision, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   TCGSpecificationVersion_sequence, hf_index, ett_tcg_cp_oids_TCGSpecificationVersion);

  return offset;
}



static int
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_) {
  offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
                                       NULL);

  return offset;
}


static const ber_sequence_t TCGPlatformSpecification_sequence[] = {
  { &hf_tcg_cp_oids_tcg_specification_vesion, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_TCGSpecificationVersion },
  { &hf_tcg_cp_oids_platformClass, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_OCTET_STRING },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   TCGPlatformSpecification_sequence, hf_index, ett_tcg_cp_oids_TCGPlatformSpecification);

  return offset;
}


static const ber_sequence_t TCPASpecVersion_sequence[] = {
  { &hf_tcg_cp_oids_major   , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { &hf_tcg_cp_oids_minor   , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_INTEGER },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   TCPASpecVersion_sequence, hf_index, ett_tcg_cp_oids_TCPASpecVersion);

  return offset;
}



static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                                NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);

  return offset;
}


static const value_string tcg_cp_oids_EKGenerationType_vals[] = {
  {   0, "internal" },
  {   1, "injected" },
  {   2, "internalRevocable" },
  {   3, "injectedRevocable" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}


static const value_string tcg_cp_oids_EKGenerationLocation_vals[] = {
  {   0, "tpmManufacturer" },
  {   1, "platformManufacturer" },
  {   2, "ekCertSigner" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}


static const value_string tcg_cp_oids_EKCertificateGenerationLocation_vals[] = {
  {   0, "tpmManufacturer" },
  {   1, "platformManufacturer" },
  {   2, "ekCertSigner" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
                                            actx, tree, tvb, offset, hf_index,
                                            NULL);

  return offset;
}


static const value_string tcg_cp_oids_EvaluationAssuranceLevel_vals[] = {
  {   1, "levell" },
  {   2, "level2" },
  {   3, "level3" },
  {   4, "level4" },
  {   5, "level5" },
  {   6, "level6" },
  {   7, "level7" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}


static const value_string tcg_cp_oids_EvaluationStatus_vals[] = {
  {   0, "designedToMeet" },
  {   1, "evaluationInProgress" },
  {   2, "evaluationCompleted" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}


static const value_string tcg_cp_oids_StrengthOfFunction_vals[] = {
  {   0, "basic" },
  {   1, "medium" },
  {   2, "high" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
                                    NULL, 0, hf_index, -1,
                                    NULL);

  return offset;
}


static const ber_sequence_t URIReference_sequence[] = {
  { &hf_tcg_cp_oids_uniformResourceIdentifier, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { &hf_tcg_cp_oids_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
  { &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 },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   URIReference_sequence, hf_index, ett_tcg_cp_oids_URIReference);

  return offset;
}


static const ber_sequence_t CommonCriteriaMeasures_sequence[] = {
  { &hf_tcg_cp_oids_cc_measures_version_string, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { &hf_tcg_cp_oids_assurancelevel, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_EvaluationAssuranceLevel },
  { &hf_tcg_cp_oids_evaluationStatus, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_EvaluationStatus },
  { &hf_tcg_cp_oids_plus    , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
  { &hf_tcg_cp_oids_strengthOfFunction, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_StrengthOfFunction },
  { &hf_tcg_cp_oids_profileOid, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_OBJECT_IDENTIFIER },
  { &hf_tcg_cp_oids_profileUri, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_URIReference },
  { &hf_tcg_cp_oids_targetOid, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_OBJECT_IDENTIFIER },
  { &hf_tcg_cp_oids_targetUri, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_URIReference },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   CommonCriteriaMeasures_sequence, hf_index, ett_tcg_cp_oids_CommonCriteriaMeasures);

  return offset;
}


static const value_string tcg_cp_oids_SecurityLevel_vals[] = {
  {   1, "level1" },
  {   2, "level2" },
  {   3, "level3" },
  {   4, "level4" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}


static const ber_sequence_t FIPSLevel_sequence[] = {
  { &hf_tcg_cp_oids_fips_level_version_string, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { &hf_tcg_cp_oids_fips_security_level, BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_SecurityLevel },
  { &hf_tcg_cp_oids_plus    , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   FIPSLevel_sequence, hf_index, ett_tcg_cp_oids_FIPSLevel);

  return offset;
}


static const ber_sequence_t TPMSecurityAssertions_sequence[] = {
  { &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 },
  { &hf_tcg_cp_oids_fieldUpgradable, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
  { &hf_tcg_cp_oids_ekGenerationType, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_EKGenerationType },
  { &hf_tcg_cp_oids_ekGenerationLocation, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_EKGenerationLocation },
  { &hf_tcg_cp_oids_ekCertificateGenerationLocation, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_EKCertificateGenerationLocation },
  { &hf_tcg_cp_oids_ccInfo  , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_CommonCriteriaMeasures },
  { &hf_tcg_cp_oids_fipsLevel, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_FIPSLevel },
  { &hf_tcg_cp_oids_iso9000Certified, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_BOOLEAN },
  { &hf_tcg_cp_oids_iso9000Uri, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   TPMSecurityAssertions_sequence, hf_index, ett_tcg_cp_oids_TPMSecurityAssertions);

  return offset;
}


static const value_string tcg_cp_oids_MeasurementRootType_vals[] = {
  {   0, "static" },
  {   1, "dynamic" },
  {   2, "nonHost" },
  {   3, "hybrid" },
  {   4, "physical" },
  {   5, "virtual" },
  { 0, NULL }
};


static int
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_) {
  offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                  NULL);

  return offset;
}


static const ber_sequence_t TBBSecurityAssertions_sequence[] = {
  { &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 },
  { &hf_tcg_cp_oids_ccInfo  , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_CommonCriteriaMeasures },
  { &hf_tcg_cp_oids_fipsLevel, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_FIPSLevel },
  { &hf_tcg_cp_oids_rtmType , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcg_cp_oids_MeasurementRootType },
  { &hf_tcg_cp_oids_iso9000Certified, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
  { &hf_tcg_cp_oids_iso9000Uri, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   TBBSecurityAssertions_sequence, hf_index, ett_tcg_cp_oids_TBBSecurityAssertions);

  return offset;
}



static int
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_) {
  offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);

  return offset;
}


static const ber_sequence_t HashAlgAndValue_sequence[] = {
  { &hf_tcg_cp_oids_hashAlg , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier },
  { &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 },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   HashAlgAndValue_sequence, hf_index, ett_tcg_cp_oids_HashAlgAndValue);

  return offset;
}


static const ber_sequence_t HashedSubjectInfoURI_sequence[] = {
  { &hf_tcg_cp_oids_documentURI, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { &hf_tcg_cp_oids_documentAccessInfo, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_OBJECT_IDENTIFIER },
  { &hf_tcg_cp_oids_documentHashInfo, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_HashAlgAndValue },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   HashedSubjectInfoURI_sequence, hf_index, ett_tcg_cp_oids_HashedSubjectInfoURI);

  return offset;
}


static const ber_sequence_t TCGRelevantCredentials_sequence_of[1] = {
  { &hf_tcg_cp_oids_TCGRelevantCredentials_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_HashedSubjectInfoURI },
};

static int
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_) {
  offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
                                      TCGRelevantCredentials_sequence_of, hf_index, ett_tcg_cp_oids_TCGRelevantCredentials);

  return offset;
}


static const ber_sequence_t TCGRelevantManifests_sequence_of[1] = {
  { &hf_tcg_cp_oids_TCGRelevantManifests_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_HashedSubjectInfoURI },
};

static int
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_) {
  offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
                                      TCGRelevantManifests_sequence_of, hf_index, ett_tcg_cp_oids_TCGRelevantManifests);

  return offset;
}



static int
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_) {
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
                                            actx, tree, tvb, offset, hf_index,
                                            NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
                                            actx, tree, tvb, offset, hf_index,
                                            NULL);

  return offset;
}



static int
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_) {
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
                                            actx, tree, tvb, offset, hf_index,
                                            NULL);

  return offset;
}


static const ber_sequence_t VirtualPlatformBackupServiceURI_sequence[] = {
  { &hf_tcg_cp_oids_restoreAllowed, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_BOOLEAN },
  { &hf_tcg_cp_oids_backupServiceURI, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_tcg_cp_oids_IA5String },
  { NULL, 0, 0, 0, NULL }
};

static int
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_) {
  offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                   VirtualPlatformBackupServiceURI_sequence, hf_index, ett_tcg_cp_oids_VirtualPlatformBackupServiceURI);

  return offset;
}

/*--- PDUs ---*/

static int dissect_TPMSpecification_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TPMSpecification(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TPMSpecification_PDU);
  return offset;
}
static int dissect_TCGPlatformSpecification_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TCGPlatformSpecification(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCGPlatformSpecification_PDU);
  return offset;
}
static int dissect_TCPASpecVersion_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TCPASpecVersion(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCPASpecVersion_PDU);
  return offset;
}
static int dissect_TPMSecurityAssertions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TPMSecurityAssertions(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TPMSecurityAssertions_PDU);
  return offset;
}
static int dissect_TBBSecurityAssertions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TBBSecurityAssertions(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TBBSecurityAssertions_PDU);
  return offset;
}
static int dissect_ProtectionProfile_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_ProtectionProfile(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_ProtectionProfile_PDU);
  return offset;
}
static int dissect_SecurityTarget_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_SecurityTarget(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_SecurityTarget_PDU);
  return offset;
}
static int dissect_TCGRelevantCredentials_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TCGRelevantCredentials(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCGRelevantCredentials_PDU);
  return offset;
}
static int dissect_TCGRelevantManifests_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_TCGRelevantManifests(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_TCGRelevantManifests_PDU);
  return offset;
}
static int dissect_VirtualPlatformAttestationServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_VirtualPlatformAttestationServiceURI(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_VirtualPlatformAttestationServiceURI_PDU);
  return offset;
}
static int dissect_MigrationControllerAttestationServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_MigrationControllerAttestationServiceURI(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_MigrationControllerAttestationServiceURI_PDU);
  return offset;
}
static int dissect_MigrationControllerRegistrationServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_MigrationControllerRegistrationServiceURI(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_MigrationControllerRegistrationServiceURI_PDU);
  return offset;
}
static int dissect_VirtualPlatformBackupServiceURI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
  int offset = 0;
  asn1_ctx_t asn1_ctx;
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
  offset = dissect_tcg_cp_oids_VirtualPlatformBackupServiceURI(FALSE, tvb, offset, &asn1_ctx, tree, hf_tcg_cp_oids_VirtualPlatformBackupServiceURI_PDU);
  return offset;
}



/*--- proto_register_tcg_cp_oids ----------------------------------------------*/
void proto_register_tcg_cp_oids(void) {

  /* List of fields */
  static hf_register_info hf[] = {
    { &hf_tcg_cp_oids_UTF8String_PDU,
      { "UTF8String", "tcg-cp-oids.UTF8String",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TPMSpecification_PDU,
      { "TPMSpecification", "tcg-cp-oids.TPMSpecification_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TCGPlatformSpecification_PDU,
      { "TCGPlatformSpecification", "tcg-cp-oids.TCGPlatformSpecification_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TCPASpecVersion_PDU,
      { "TCPASpecVersion", "tcg-cp-oids.TCPASpecVersion_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TPMSecurityAssertions_PDU,
      { "TPMSecurityAssertions", "tcg-cp-oids.TPMSecurityAssertions_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TBBSecurityAssertions_PDU,
      { "TBBSecurityAssertions", "tcg-cp-oids.TBBSecurityAssertions_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_ProtectionProfile_PDU,
      { "ProtectionProfile", "tcg-cp-oids.ProtectionProfile",
        FT_OID, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_SecurityTarget_PDU,
      { "SecurityTarget", "tcg-cp-oids.SecurityTarget",
        FT_OID, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TCGRelevantCredentials_PDU,
      { "TCGRelevantCredentials", "tcg-cp-oids.TCGRelevantCredentials",
        FT_UINT32, BASE_DEC, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TCGRelevantManifests_PDU,
      { "TCGRelevantManifests", "tcg-cp-oids.TCGRelevantManifests",
        FT_UINT32, BASE_DEC, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_VirtualPlatformAttestationServiceURI_PDU,
      { "VirtualPlatformAttestationServiceURI", "tcg-cp-oids.VirtualPlatformAttestationServiceURI",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_MigrationControllerAttestationServiceURI_PDU,
      { "MigrationControllerAttestationServiceURI", "tcg-cp-oids.MigrationControllerAttestationServiceURI",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_MigrationControllerRegistrationServiceURI_PDU,
      { "MigrationControllerRegistrationServiceURI", "tcg-cp-oids.MigrationControllerRegistrationServiceURI",
        FT_STRING, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_VirtualPlatformBackupServiceURI_PDU,
      { "VirtualPlatformBackupServiceURI", "tcg-cp-oids.VirtualPlatformBackupServiceURI_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_family,
      { "family", "tcg-cp-oids.family",
        FT_STRING, BASE_NONE, NULL, 0,
        "UTF8String", HFILL }},
    { &hf_tcg_cp_oids_tpm_specification_level,
      { "level", "tcg-cp-oids.level",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_tcg_cp_oids_revision,
      { "revision", "tcg-cp-oids.revision",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_tcg_cp_oids_majorVersion,
      { "majorVersion", "tcg-cp-oids.majorVersion",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_tcg_cp_oids_minorVersion,
      { "minorVersion", "tcg-cp-oids.minorVersion",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_tcg_cp_oids_tcg_specification_vesion,
      { "version", "tcg-cp-oids.version_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "TCGSpecificationVersion", HFILL }},
    { &hf_tcg_cp_oids_platformClass,
      { "platformClass", "tcg-cp-oids.platformClass",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_tcg_cp_oids_major,
      { "major", "tcg-cp-oids.major",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_tcg_cp_oids_minor,
      { "minor", "tcg-cp-oids.minor",
        FT_INT32, BASE_DEC, NULL, 0,
        "INTEGER", HFILL }},
    { &hf_tcg_cp_oids_security_assertions_version,
      { "version", "tcg-cp-oids.version",
        FT_INT32, BASE_DEC, VALS(pkix1explicit_Version_vals), 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_fieldUpgradable,
      { "fieldUpgradable", "tcg-cp-oids.fieldUpgradable",
        FT_BOOLEAN, BASE_NONE, NULL, 0,
        "BOOLEAN", HFILL }},
    { &hf_tcg_cp_oids_ekGenerationType,
      { "ekGenerationType", "tcg-cp-oids.ekGenerationType",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EKGenerationType_vals), 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_ekGenerationLocation,
      { "ekGenerationLocation", "tcg-cp-oids.ekGenerationLocation",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EKGenerationLocation_vals), 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_ekCertificateGenerationLocation,
      { "ekCertificateGenerationLocation", "tcg-cp-oids.ekCertificateGenerationLocation",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EKCertificateGenerationLocation_vals), 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_ccInfo,
      { "ccInfo", "tcg-cp-oids.ccInfo_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "CommonCriteriaMeasures", HFILL }},
    { &hf_tcg_cp_oids_fipsLevel,
      { "fipsLevel", "tcg-cp-oids.fipsLevel_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_iso9000Certified,
      { "iso9000Certified", "tcg-cp-oids.iso9000Certified",
        FT_BOOLEAN, BASE_NONE, NULL, 0,
        "BOOLEAN", HFILL }},
    { &hf_tcg_cp_oids_iso9000Uri,
      { "iso9000Uri", "tcg-cp-oids.iso9000Uri",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_tcg_cp_oids_rtmType,
      { "rtmType", "tcg-cp-oids.rtmType",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_MeasurementRootType_vals), 0,
        "MeasurementRootType", HFILL }},
    { &hf_tcg_cp_oids_cc_measures_version_string,
      { "version", "tcg-cp-oids.version",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_tcg_cp_oids_assurancelevel,
      { "assurancelevel", "tcg-cp-oids.assurancelevel",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EvaluationAssuranceLevel_vals), 0,
        "EvaluationAssuranceLevel", HFILL }},
    { &hf_tcg_cp_oids_evaluationStatus,
      { "evaluationStatus", "tcg-cp-oids.evaluationStatus",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_EvaluationStatus_vals), 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_plus,
      { "plus", "tcg-cp-oids.plus",
        FT_BOOLEAN, BASE_NONE, NULL, 0,
        "BOOLEAN", HFILL }},
    { &hf_tcg_cp_oids_strengthOfFunction,
      { "strengthOfFunction", "tcg-cp-oids.strengthOfFunction",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_StrengthOfFunction_vals), 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_profileOid,
      { "profileOid", "tcg-cp-oids.profileOid",
        FT_OID, BASE_NONE, NULL, 0,
        "OBJECT_IDENTIFIER", HFILL }},
    { &hf_tcg_cp_oids_profileUri,
      { "profileUri", "tcg-cp-oids.profileUri_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "URIReference", HFILL }},
    { &hf_tcg_cp_oids_targetOid,
      { "targetOid", "tcg-cp-oids.targetOid",
        FT_OID, BASE_NONE, NULL, 0,
        "OBJECT_IDENTIFIER", HFILL }},
    { &hf_tcg_cp_oids_targetUri,
      { "targetUri", "tcg-cp-oids.targetUri_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "URIReference", HFILL }},
    { &hf_tcg_cp_oids_uniformResourceIdentifier,
      { "uniformResourceIdentifier", "tcg-cp-oids.uniformResourceIdentifier",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_tcg_cp_oids_hashAlgorithm,
      { "hashAlgorithm", "tcg-cp-oids.hashAlgorithm_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "AlgorithmIdentifier", HFILL }},
    { &hf_tcg_cp_oids_uri_reference_hashvalue,
      { "hashValue", "tcg-cp-oids.hashValue",
        FT_BYTES, BASE_NONE, NULL, 0,
        "BIT_STRING", HFILL }},
    { &hf_tcg_cp_oids_fips_level_version_string,
      { "version", "tcg-cp-oids.version",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_tcg_cp_oids_fips_security_level,
      { "level", "tcg-cp-oids.level",
        FT_UINT32, BASE_DEC, VALS(tcg_cp_oids_SecurityLevel_vals), 0,
        "SecurityLevel", HFILL }},
    { &hf_tcg_cp_oids_hashAlg,
      { "hashAlg", "tcg-cp-oids.hashAlg_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "AlgorithmIdentifier", HFILL }},
    { &hf_tcg_cp_oids_hash_alg_and_value_hashvalue,
      { "hashValue", "tcg-cp-oids.hashValue",
        FT_BYTES, BASE_NONE, NULL, 0,
        "OCTET_STRING", HFILL }},
    { &hf_tcg_cp_oids_documentURI,
      { "documentURI", "tcg-cp-oids.documentURI",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
    { &hf_tcg_cp_oids_documentAccessInfo,
      { "documentAccessInfo", "tcg-cp-oids.documentAccessInfo",
        FT_OID, BASE_NONE, NULL, 0,
        "OBJECT_IDENTIFIER", HFILL }},
    { &hf_tcg_cp_oids_documentHashInfo,
      { "documentHashInfo", "tcg-cp-oids.documentHashInfo_element",
        FT_NONE, BASE_NONE, NULL, 0,
        "HashAlgAndValue", HFILL }},
    { &hf_tcg_cp_oids_TCGRelevantCredentials_item,
      { "HashedSubjectInfoURI", "tcg-cp-oids.HashedSubjectInfoURI_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_TCGRelevantManifests_item,
      { "HashedSubjectInfoURI", "tcg-cp-oids.HashedSubjectInfoURI_element",
        FT_NONE, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_tcg_cp_oids_restoreAllowed,
      { "restoreAllowed", "tcg-cp-oids.restoreAllowed",
        FT_BOOLEAN, BASE_NONE, NULL, 0,
        "BOOLEAN", HFILL }},
    { &hf_tcg_cp_oids_backupServiceURI,
      { "backupServiceURI", "tcg-cp-oids.backupServiceURI",
        FT_STRING, BASE_NONE, NULL, 0,
        "IA5String", HFILL }},
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_tcg_cp_oids_TPMSpecification,
    &ett_tcg_cp_oids_TCGSpecificationVersion,
    &ett_tcg_cp_oids_TCGPlatformSpecification,
    &ett_tcg_cp_oids_TCPASpecVersion,
    &ett_tcg_cp_oids_TPMSecurityAssertions,
    &ett_tcg_cp_oids_TBBSecurityAssertions,
    &ett_tcg_cp_oids_CommonCriteriaMeasures,
    &ett_tcg_cp_oids_URIReference,
    &ett_tcg_cp_oids_FIPSLevel,
    &ett_tcg_cp_oids_HashAlgAndValue,
    &ett_tcg_cp_oids_HashedSubjectInfoURI,
    &ett_tcg_cp_oids_TCGRelevantCredentials,
    &ett_tcg_cp_oids_TCGRelevantManifests,
    &ett_tcg_cp_oids_VirtualPlatformBackupServiceURI,
  };

  /* Register protocol */
  proto_tcg_cp_oids = proto_register_protocol(PNAME, PSNAME, PFNAME);

  /* Register fields and subtrees */
  proto_register_field_array(proto_tcg_cp_oids, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
}

/* to be able to register OIDs for UTF8String */
static int
dissect_tcg_cp_oids_UTF8String_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
    int offset = 0;
    asn1_ctx_t actx;
    asn1_ctx_init(&actx, ASN1_ENC_BER, TRUE, pinfo);
    offset = dissect_ber_restricted_string(FALSE, BER_UNI_TAG_UTF8String, &actx, tree, tvb, offset, hf_tcg_cp_oids_UTF8String_PDU, NULL);
    return offset;
}

/*--- proto_reg_handoff_tcg_cp_oids -------------------------------------------*/
void proto_reg_handoff_tcg_cp_oids(void) {
  register_ber_oid_dissector("2.23.133.1", dissect_TCPASpecVersion_PDU, proto_tcg_cp_oids, "tcg-tcpaSpecVersion");
  register_ber_oid_dissector("2.23.133.2.11", dissect_ProtectionProfile_PDU, proto_tcg_cp_oids, "tcg-at-tpmProtectionProfile");
  register_ber_oid_dissector("2.23.133.2.12", dissect_SecurityTarget_PDU, proto_tcg_cp_oids, "tcg-at-tpmSecurityTarget");
  register_ber_oid_dissector("2.23.133.2.13", dissect_ProtectionProfile_PDU, proto_tcg_cp_oids, "tcg-at-tbbProtectionProfile");
  register_ber_oid_dissector("2.23.133.2.14", dissect_SecurityTarget_PDU, proto_tcg_cp_oids, "tcg-at-tbbSecurityTarget");
  register_ber_oid_dissector("2.23.133.2.16", dissect_TPMSpecification_PDU, proto_tcg_cp_oids, "tcg-at-tpmSpecification");
  register_ber_oid_dissector("2.23.133.2.17", dissect_TCGPlatformSpecification_PDU, proto_tcg_cp_oids, "tcg-at-tcgPlatformSpecification");
  register_ber_oid_dissector("2.23.133.2.18", dissect_TPMSecurityAssertions_PDU, proto_tcg_cp_oids, "tcg-at-tpmSecurityAssertions");
  register_ber_oid_dissector("2.23.133.2.19", dissect_TBBSecurityAssertions_PDU, proto_tcg_cp_oids, "tcg-at-tbbSecurityAssertions");
  register_ber_oid_dissector("2.23.133.6.2", dissect_TCGRelevantCredentials_PDU, proto_tcg_cp_oids, "tcg-ce-relevantCredentials");
  register_ber_oid_dissector("2.23.133.6.3", dissect_TCGRelevantManifests_PDU, proto_tcg_cp_oids, "tcg-ce-relevantManifests");
  register_ber_oid_dissector("2.23.133.6.4", dissect_VirtualPlatformAttestationServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-virtualPlatformAttestationService");
  register_ber_oid_dissector("2.23.133.6.5", dissect_MigrationControllerAttestationServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-migrationControllerAttestationService");
  register_ber_oid_dissector("2.23.133.6.6", dissect_MigrationControllerRegistrationServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-migrationControllerRegistrationService");
  register_ber_oid_dissector("2.23.133.6.7", dissect_VirtualPlatformBackupServiceURI_PDU, proto_tcg_cp_oids, "tcg-ce-virtualPlatformBackupService");

  oid_add_from_string("tcg","2.23.133");
  oid_add_from_string("tcg-attribute","2.23.133.2");
  oid_add_from_string("tcg-protocol","2.23.133.3");
  oid_add_from_string("tcg-algorithm","2.23.133.4");
  oid_add_from_string("tcg-ce","2.23.133.6");
  oid_add_from_string("tcg-kp","2.23.133.8");
  /* TCG Spec Version OIDs */
  oid_add_from_string("tcg-sv-tpm12","2.23.133.1.1");
  oid_add_from_string("tcg-sv-tpm20","2.23.133.1.2");
  /* TCG Attribute OIDs */
  oid_add_from_string("tcg-at-securityQualities","2.23.133.2.10");
  /* TCG Algorithm OIDs */
  oid_add_from_string("tcg-algorithm-null","2.23.133.4.1");
  /* TCG Key Purposes OIDs */
  oid_add_from_string("tcg-kp-EKCertificate","2.23.133.8.1");
  oid_add_from_string("tcg-kp-PlatformCertificate","2.23.133.8.2");
  oid_add_from_string("tcg-kp-AIKCertificate","2.23.133.8.3");
  /* TCG Protocol OIDs */
  oid_add_from_string("tcg-prt-tpmIdProtocol","2.23.133.3.1");

  register_ber_oid_dissector("2.23.133.2.1", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmManufacturer");
  register_ber_oid_dissector("2.23.133.2.2", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmModel");
  register_ber_oid_dissector("2.23.133.2.3", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmVersion");
  register_ber_oid_dissector("2.23.133.2.4", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-platformManufacturer");
  register_ber_oid_dissector("2.23.133.2.5", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-platformModel");
  register_ber_oid_dissector("2.23.133.2.6", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-platformVersion");
  register_ber_oid_dissector("2.23.133.2.15", dissect_tcg_cp_oids_UTF8String_PDU, proto_tcg_cp_oids, "tcg-at-tpmIdLabel");
}