diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-cmp.c | 919 | ||||
-rw-r--r-- | epan/dissectors/packet-cmp.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-crmf.c | 577 | ||||
-rw-r--r-- | epan/dissectors/packet-crmf.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-pkix1explicit.c | 196 | ||||
-rw-r--r-- | epan/dissectors/packet-pkix1explicit.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-pkix1implicit.c | 126 | ||||
-rw-r--r-- | epan/dissectors/packet-pkix1implicit.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-pkixproxy.c | 41 | ||||
-rw-r--r-- | epan/dissectors/packet-pkixproxy.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-pkixqualified.c | 124 | ||||
-rw-r--r-- | epan/dissectors/packet-pkixqualified.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-pkixtsp.c | 185 | ||||
-rw-r--r-- | epan/dissectors/packet-pkixtsp.h | 4 |
14 files changed, 698 insertions, 1494 deletions
diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c index 9d25c80987..bec49b89c5 100644 --- a/epan/dissectors/packet-cmp.c +++ b/epan/dissectors/packet-cmp.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-cmp.c */ -/* ../../tools/asn2wrs.py -b -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */ +/* ../../tools/asn2wrs.py -b -X -T -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */ /* Input file: packet-cmp-template.c */ @@ -302,91 +302,6 @@ static const char *object_identifier_id; /* PKIMessage -> PKIBody -> NestedMessageContent -> PKIMessages -> PKIMessage */ int dissect_cmp_PKIMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -static int dissect_PKIMessages_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIMessage(FALSE, tvb, offset, actx, tree, hf_cmp_PKIMessages_item); -} - - -/*--- Fields for imported types ---*/ - -static int dissect_x509v3PKCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, actx, tree, hf_cmp_x509v3PKCert); -} -static int dissect_sender(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_cmp_sender); -} -static int dissect_recipient(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_cmp_recipient); -} -static int dissect_protectionAlg(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_protectionAlg); -} -static int dissect_senderKID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_KeyIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_senderKID); -} -static int dissect_recipKID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_KeyIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_recipKID); -} -static int dissect_ir(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_ir); -} -static int dissect_cr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_cr); -} -static int dissect_kur(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_kur); -} -static int dissect_krr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_krr); -} -static int dissect_ccr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertReqMessages(FALSE, tvb, offset, actx, tree, hf_cmp_ccr); -} -static int dissect_owf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_owf); -} -static int dissect_mac(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_mac); -} -static int dissect_hashAlg(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_hashAlg); -} -static int dissect_certId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_certId); -} -static int dissect_privateKey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_cmp_privateKey); -} -static int dissect_publicationInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_PKIPublicationInfo(FALSE, tvb, offset, actx, tree, hf_cmp_publicationInfo); -} -static int dissect_encryptedCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_cmp_encryptedCert); -} -static int dissect_certDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertTemplate(FALSE, tvb, offset, actx, tree, hf_cmp_certDetails); -} -static int dissect_crlEntryDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, actx, tree, hf_cmp_crlEntryDetails); -} -static int dissect_revCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_revCerts_item); -} -static int dissect_crls_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_crls_item); -} -static int dissect_crlDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Extensions(FALSE, tvb, offset, actx, tree, hf_cmp_crlDetails); -} -static int dissect_CRLAnnContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_CRLAnnContent_item); -} -static int dissect_SignKeyPairTypesValue_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_SignKeyPairTypesValue_item); -} -static int dissect_EncKeyPairTypesValue_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_cmp_EncKeyPairTypesValue_item); -} const value_string cmp_CMPCertificate_vals[] = { @@ -394,43 +309,19 @@ const value_string cmp_CMPCertificate_vals[] = { { 0, NULL } }; -static const ber_old_choice_t CMPCertificate_choice[] = { - { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509v3PKCert }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t CMPCertificate_choice[] = { + { 0, &hf_cmp_x509v3PKCert , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Certificate }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_cmp_CMPCertificate(gboolean 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_old_choice(actx, tree, tvb, offset, - CMPCertificate_choice, hf_index, ett_cmp_CMPCertificate, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + CMPCertificate_choice, hf_index, ett_cmp_CMPCertificate, + NULL); return offset; } -static int dissect_extraCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_extraCerts_item); -} -static int dissect_caPubs_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_caPubs_item); -} -static int dissect_certificate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_certificate); -} -static int dissect_newSigCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_newSigCert); -} -static int dissect_caCerts_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_caCerts_item); -} -static int dissect_oldWithNew(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_oldWithNew); -} -static int dissect_newWithOld(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_newWithOld); -} -static int dissect_newWithNew(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_newWithNew); -} static const value_string cmp_T_pvno_vals[] = { @@ -447,9 +338,6 @@ dissect_cmp_T_pvno(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, return offset; } -static int dissect_pvno(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_T_pvno(FALSE, tvb, offset, actx, tree, hf_cmp_pvno); -} @@ -459,15 +347,6 @@ dissect_cmp_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of return offset; } -static int dissect_messageTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_messageTime); -} -static int dissect_willBeRevokedAt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_willBeRevokedAt); -} -static int dissect_badSinceDate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_cmp_badSinceDate); -} @@ -478,30 +357,6 @@ dissect_cmp_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse return offset; } -static int dissect_transactionID(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_transactionID); -} -static int dissect_senderNonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_senderNonce); -} -static int dissect_recipNonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_recipNonce); -} -static int dissect_salt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_salt); -} -static int dissect_witness(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_witness); -} -static int dissect_challenge(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_challenge); -} -static int dissect_rspInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_rspInfo); -} -static int dissect_certHash(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_certHash); -} @@ -513,37 +368,19 @@ dissect_cmp_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_PKIFreeText_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_UTF8String(FALSE, tvb, offset, actx, tree, hf_cmp_PKIFreeText_item); -} -static int dissect_SuppLangTagsValue_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_UTF8String(FALSE, tvb, offset, actx, tree, hf_cmp_SuppLangTagsValue_item); -} -static const ber_old_sequence_t PKIFreeText_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_PKIFreeText_item }, +static const ber_sequence_t PKIFreeText_sequence_of[1] = { + { &hf_cmp_PKIFreeText_item, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_cmp_UTF8String }, }; int dissect_cmp_PKIFreeText(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + PKIFreeText_sequence_of, hf_index, ett_cmp_PKIFreeText); return offset; } -static int dissect_freeText(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_freeText); -} -static int dissect_statusString(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_statusString); -} -static int dissect_errorDetails(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_errorDetails); -} -static int dissect_reason(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIFreeText(FALSE, tvb, offset, actx, tree, hf_cmp_reason); -} @@ -553,9 +390,6 @@ dissect_cmp_T_infoType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_infoType(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_T_infoType(FALSE, tvb, offset, actx, tree, hf_cmp_infoType); -} @@ -568,99 +402,72 @@ dissect_cmp_T_infoValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_infoValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_T_infoValue(FALSE, tvb, offset, actx, tree, hf_cmp_infoValue); -} -static const ber_old_sequence_t InfoTypeAndValue_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_infoType }, - { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_infoValue }, - { 0, 0, 0, NULL } +static const ber_sequence_t InfoTypeAndValue_sequence[] = { + { &hf_cmp_infoType , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cmp_T_infoType }, + { &hf_cmp_infoValue , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_T_infoValue }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_InfoTypeAndValue(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + InfoTypeAndValue_sequence, hf_index, ett_cmp_InfoTypeAndValue); return offset; } -static int dissect_generalInfo_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_generalInfo_item); -} -static int dissect_GenMsgContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_GenMsgContent_item); -} -static int dissect_GenRepContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_GenRepContent_item); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_generalInfo_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of[1] = { + { &hf_cmp_generalInfo_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue }, }; static int dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue); return offset; } -static int dissect_generalInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue(FALSE, tvb, offset, actx, tree, hf_cmp_generalInfo); -} -static const ber_old_sequence_t PKIHeader_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pvno }, - { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_sender }, - { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_recipient }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_messageTime }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_protectionAlg }, - { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_senderKID }, - { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_recipKID }, - { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_transactionID }, - { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_senderNonce }, - { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_recipNonce }, - { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_freeText }, - { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_generalInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t PKIHeader_sequence[] = { + { &hf_cmp_pvno , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_T_pvno }, + { &hf_cmp_sender , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName }, + { &hf_cmp_recipient , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName }, + { &hf_cmp_messageTime , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_GeneralizedTime }, + { &hf_cmp_protectionAlg , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_cmp_senderKID , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_pkix1implicit_KeyIdentifier }, + { &hf_cmp_recipKID , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL, dissect_pkix1implicit_KeyIdentifier }, + { &hf_cmp_transactionID , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING }, + { &hf_cmp_senderNonce , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING }, + { &hf_cmp_recipNonce , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_cmp_OCTET_STRING }, + { &hf_cmp_freeText , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_cmp_PKIFreeText }, + { &hf_cmp_generalInfo , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_InfoTypeAndValue }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_PKIHeader(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PKIHeader_sequence, hf_index, ett_cmp_PKIHeader); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PKIHeader_sequence, hf_index, ett_cmp_PKIHeader); return offset; } -static int dissect_header(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIHeader(FALSE, tvb, offset, actx, tree, hf_cmp_header); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of[1] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extraCerts_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of[1] = { + { &hf_cmp_extraCerts_item , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate }, }; static int dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_CMPCertificate_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate); return offset; } -static int dissect_extraCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_extraCerts); -} -static int dissect_caPubs(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_caPubs); -} -static int dissect_caCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate(FALSE, tvb, offset, actx, tree, hf_cmp_caCerts); -} @@ -671,21 +478,6 @@ dissect_cmp_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ return offset; } -static int dissect_iterationCount(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_iterationCount); -} -static int dissect_POPODecKeyRespContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_POPODecKeyRespContent_item); -} -static int dissect_certReqId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_certReqId); -} -static int dissect_errorCode(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_errorCode); -} -static int dissect_checkAfter(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_INTEGER(FALSE, tvb, offset, actx, tree, hf_cmp_checkAfter); -} const value_string cmp_PKIStatus_vals[] = { @@ -707,9 +499,6 @@ dissect_cmp_PKIStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ return offset; } -static int dissect_pkistatus(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIStatus(FALSE, tvb, offset, actx, tree, hf_cmp_pkistatus); -} static const asn_namedbit PKIFailureInfo_bits[] = { @@ -751,37 +540,22 @@ dissect_cmp_PKIFailureInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off return offset; } -static int dissect_failInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIFailureInfo(FALSE, tvb, offset, actx, tree, hf_cmp_failInfo); -} -static const ber_old_sequence_t PKIStatusInfo_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkistatus }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_statusString }, - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_failInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t PKIStatusInfo_sequence[] = { + { &hf_cmp_pkistatus , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatus }, + { &hf_cmp_statusString , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText }, + { &hf_cmp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFailureInfo }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_PKIStatusInfo(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PKIStatusInfo_sequence, hf_index, ett_cmp_PKIStatusInfo); return offset; } -static int dissect_pkistatusinf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_pkistatusinf); -} -static int dissect_rvrpcnt_status_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_rvrpcnt_status_item); -} -static int dissect_statusInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_statusInfo); -} -static int dissect_pKIStatusInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_pKIStatusInfo); -} const value_string cmp_CertOrEncCert_vals[] = { @@ -790,315 +564,252 @@ const value_string cmp_CertOrEncCert_vals[] = { { 0, NULL } }; -static const ber_old_choice_t CertOrEncCert_choice[] = { - { 0, BER_CLASS_CON, 0, 0, dissect_certificate }, - { 1, BER_CLASS_CON, 1, 0, dissect_encryptedCert }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t CertOrEncCert_choice[] = { + { 0, &hf_cmp_certificate , BER_CLASS_CON, 0, 0, dissect_cmp_CMPCertificate }, + { 1, &hf_cmp_encryptedCert , BER_CLASS_CON, 1, 0, dissect_crmf_EncryptedValue }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_cmp_CertOrEncCert(gboolean 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_old_choice(actx, tree, tvb, offset, - CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + CertOrEncCert_choice, hf_index, ett_cmp_CertOrEncCert, + NULL); return offset; } -static int dissect_certOrEncCert(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertOrEncCert(FALSE, tvb, offset, actx, tree, hf_cmp_certOrEncCert); -} -static const ber_old_sequence_t CertifiedKeyPair_sequence[] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_certOrEncCert }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_privateKey }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_publicationInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertifiedKeyPair_sequence[] = { + { &hf_cmp_certOrEncCert , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CertOrEncCert }, + { &hf_cmp_privateKey , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_crmf_EncryptedValue }, + { &hf_cmp_publicationInfo , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crmf_PKIPublicationInfo }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_CertifiedKeyPair(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertifiedKeyPair_sequence, hf_index, ett_cmp_CertifiedKeyPair); return offset; } -static int dissect_certifiedKeyPair(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_certifiedKeyPair); -} -static int dissect_keyPairHist_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_keyPairHist_item); -} -static const ber_old_sequence_t CertResponse_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkistatusinf }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_certifiedKeyPair }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_rspInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertResponse_sequence[] = { + { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { &hf_cmp_pkistatusinf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo }, + { &hf_cmp_certifiedKeyPair, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_CertifiedKeyPair }, + { &hf_cmp_rspInfo , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_CertResponse(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertResponse_sequence, hf_index, ett_cmp_CertResponse); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertResponse_sequence, hf_index, ett_cmp_CertResponse); return offset; } -static int dissect_response_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertResponse(FALSE, tvb, offset, actx, tree, hf_cmp_response_item); -} -static const ber_old_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response_item }, +static const ber_sequence_t SEQUENCE_OF_CertResponse_sequence_of[1] = { + { &hf_cmp_response_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertResponse }, }; static int dissect_cmp_SEQUENCE_OF_CertResponse(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_OF_CertResponse_sequence_of, hf_index, ett_cmp_SEQUENCE_OF_CertResponse); return offset; } -static int dissect_response(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_OF_CertResponse(FALSE, tvb, offset, actx, tree, hf_cmp_response); -} -static const ber_old_sequence_t CertRepMessage_sequence[] = { - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caPubs }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_response }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertRepMessage_sequence[] = { + { &hf_cmp_caPubs , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate }, + { &hf_cmp_response , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_SEQUENCE_OF_CertResponse }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_CertRepMessage(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertRepMessage_sequence, hf_index, ett_cmp_CertRepMessage); return offset; } -static int dissect_ip(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_ip); -} -static int dissect_cp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_cp); -} -static int dissect_kup(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_kup); -} -static int dissect_ccp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertRepMessage(FALSE, tvb, offset, actx, tree, hf_cmp_ccp); -} -static const ber_old_sequence_t Challenge_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_owf }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_witness }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_challenge }, - { 0, 0, 0, NULL } +static const ber_sequence_t Challenge_sequence[] = { + { &hf_cmp_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_cmp_witness , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING }, + { &hf_cmp_challenge , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_Challenge(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - Challenge_sequence, hf_index, ett_cmp_Challenge); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Challenge_sequence, hf_index, ett_cmp_Challenge); return offset; } -static int dissect_POPODecKeyChallContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_Challenge(FALSE, tvb, offset, actx, tree, hf_cmp_POPODecKeyChallContent_item); -} -static const ber_old_sequence_t POPODecKeyChallContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyChallContent_item }, +static const ber_sequence_t POPODecKeyChallContent_sequence_of[1] = { + { &hf_cmp_POPODecKeyChallContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_Challenge }, }; static int dissect_cmp_POPODecKeyChallContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + POPODecKeyChallContent_sequence_of, hf_index, ett_cmp_POPODecKeyChallContent); return offset; } -static int dissect_popdecc(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_POPODecKeyChallContent(FALSE, tvb, offset, actx, tree, hf_cmp_popdecc); -} -static const ber_old_sequence_t POPODecKeyRespContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_POPODecKeyRespContent_item }, +static const ber_sequence_t POPODecKeyRespContent_sequence_of[1] = { + { &hf_cmp_POPODecKeyRespContent_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, }; int dissect_cmp_POPODecKeyRespContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + POPODecKeyRespContent_sequence_of, hf_index, ett_cmp_POPODecKeyRespContent); return offset; } -static int dissect_popdecr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_POPODecKeyRespContent(FALSE, tvb, offset, actx, tree, hf_cmp_popdecr); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_keyPairHist_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of[1] = { + { &hf_cmp_keyPairHist_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertifiedKeyPair }, }; static int dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair); return offset; } -static int dissect_keyPairHist(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair(FALSE, tvb, offset, actx, tree, hf_cmp_keyPairHist); -} -static const ber_old_sequence_t KeyRecRepContent_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkistatusinf }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_newSigCert }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_caCerts }, - { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_keyPairHist }, - { 0, 0, 0, NULL } +static const ber_sequence_t KeyRecRepContent_sequence[] = { + { &hf_cmp_pkistatusinf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo }, + { &hf_cmp_newSigCert , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate }, + { &hf_cmp_caCerts , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate }, + { &hf_cmp_keyPairHist , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertifiedKeyPair }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_KeyRecRepContent(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + KeyRecRepContent_sequence, hf_index, ett_cmp_KeyRecRepContent); return offset; } -static int dissect_krp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_KeyRecRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_krp); -} -static const ber_old_sequence_t RevDetails_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certDetails }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlEntryDetails }, - { 0, 0, 0, NULL } +static const ber_sequence_t RevDetails_sequence[] = { + { &hf_cmp_certDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertTemplate }, + { &hf_cmp_crlEntryDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extensions }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_RevDetails(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - RevDetails_sequence, hf_index, ett_cmp_RevDetails); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + RevDetails_sequence, hf_index, ett_cmp_RevDetails); return offset; } -static int dissect_RevReqContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_RevDetails(FALSE, tvb, offset, actx, tree, hf_cmp_RevReqContent_item); -} -static const ber_old_sequence_t RevReqContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RevReqContent_item }, +static const ber_sequence_t RevReqContent_sequence_of[1] = { + { &hf_cmp_RevReqContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_RevDetails }, }; int dissect_cmp_RevReqContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + RevReqContent_sequence_of, hf_index, ett_cmp_RevReqContent); return offset; } -static int dissect_rr(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_RevReqContent(FALSE, tvb, offset, actx, tree, hf_cmp_rr); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rvrpcnt_status_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of[1] = { + { &hf_cmp_rvrpcnt_status_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo }, }; static int dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo); return offset; } -static int dissect_rvrpcnt_status(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_cmp_rvrpcnt_status); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_revCerts_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of[1] = { + { &hf_cmp_revCerts_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertId }, }; static int dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_CertId_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId); return offset; } -static int dissect_revCerts(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId(FALSE, tvb, offset, actx, tree, hf_cmp_revCerts); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crls_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of[1] = { + { &hf_cmp_crls_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateList }, }; static int dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_CertificateList_sequence_of, hf_index, ett_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList); return offset; } -static int dissect_crls(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList(FALSE, tvb, offset, actx, tree, hf_cmp_crls); -} -static const ber_old_sequence_t RevRepContent_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_rvrpcnt_status }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_revCerts }, - { BER_CLASS_CON, 1, 0, dissect_crls }, - { 0, 0, 0, NULL } +static const ber_sequence_t RevRepContent_sequence[] = { + { &hf_cmp_rvrpcnt_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_PKIStatusInfo }, + { &hf_cmp_revCerts , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertId }, + { &hf_cmp_crls , BER_CLASS_CON, 1, 0, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CertificateList }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_RevRepContent(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - RevRepContent_sequence, hf_index, ett_cmp_RevRepContent); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + RevRepContent_sequence, hf_index, ett_cmp_RevRepContent); return offset; } -static int dissect_rp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_RevRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_rp); -} -static const ber_old_sequence_t CAKeyUpdAnnContent_sequence[] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_oldWithNew }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_newWithOld }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_newWithNew }, - { 0, 0, 0, NULL } +static const ber_sequence_t CAKeyUpdAnnContent_sequence[] = { + { &hf_cmp_oldWithNew , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate }, + { &hf_cmp_newWithOld , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate }, + { &hf_cmp_newWithNew , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_CMPCertificate }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_CAKeyUpdAnnContent(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CAKeyUpdAnnContent_sequence, hf_index, ett_cmp_CAKeyUpdAnnContent); return offset; } -static int dissect_ckuann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CAKeyUpdAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_ckuann); -} @@ -1108,46 +819,37 @@ dissect_cmp_CertAnnContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off return offset; } -static int dissect_cann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_cann); -} -static const ber_old_sequence_t RevAnnContent_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkistatus }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certId }, - { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_willBeRevokedAt }, - { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_badSinceDate }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crlDetails }, - { 0, 0, 0, NULL } +static const ber_sequence_t RevAnnContent_sequence[] = { + { &hf_cmp_pkistatus , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatus }, + { &hf_cmp_certId , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertId }, + { &hf_cmp_willBeRevokedAt , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_cmp_GeneralizedTime }, + { &hf_cmp_badSinceDate , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_cmp_GeneralizedTime }, + { &hf_cmp_crlDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extensions }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_RevAnnContent(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + RevAnnContent_sequence, hf_index, ett_cmp_RevAnnContent); return offset; } -static int dissect_rann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_RevAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_rann); -} -static const ber_old_sequence_t CRLAnnContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CRLAnnContent_item }, +static const ber_sequence_t CRLAnnContent_sequence_of[1] = { + { &hf_cmp_CRLAnnContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_CertificateList }, }; int dissect_cmp_CRLAnnContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + CRLAnnContent_sequence_of, hf_index, ett_cmp_CRLAnnContent); return offset; } -static int dissect_crlann(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CRLAnnContent(FALSE, tvb, offset, actx, tree, hf_cmp_crlann); -} @@ -1157,19 +859,16 @@ dissect_cmp_PKIConfirmContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_pkiconf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIConfirmContent(FALSE, tvb, offset, actx, tree, hf_cmp_pkiconf); -} -static const ber_old_sequence_t PKIMessages_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_PKIMessages_item }, +static const ber_sequence_t PKIMessages_sequence_of[1] = { + { &hf_cmp_PKIMessages_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIMessage }, }; int dissect_cmp_PKIMessages(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - PKIMessages_sequence_of, hf_index, ett_cmp_PKIMessages); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + PKIMessages_sequence_of, hf_index, ett_cmp_PKIMessages); return offset; } @@ -1182,163 +881,133 @@ dissect_cmp_NestedMessageContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i return offset; } -static int dissect_nested(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_NestedMessageContent(FALSE, tvb, offset, actx, tree, hf_cmp_nested); -} -static const ber_old_sequence_t GenMsgContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenMsgContent_item }, +static const ber_sequence_t GenMsgContent_sequence_of[1] = { + { &hf_cmp_GenMsgContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue }, }; int dissect_cmp_GenMsgContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + GenMsgContent_sequence_of, hf_index, ett_cmp_GenMsgContent); return offset; } -static int dissect_genm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_GenMsgContent(FALSE, tvb, offset, actx, tree, hf_cmp_genm); -} -static const ber_old_sequence_t GenRepContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_GenRepContent_item }, +static const ber_sequence_t GenRepContent_sequence_of[1] = { + { &hf_cmp_GenRepContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_InfoTypeAndValue }, }; static int dissect_cmp_GenRepContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + GenRepContent_sequence_of, hf_index, ett_cmp_GenRepContent); return offset; } -static int dissect_genp(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_GenRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_genp); -} -static const ber_old_sequence_t ErrorMsgContent_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pKIStatusInfo }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorCode }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_errorDetails }, - { 0, 0, 0, NULL } +static const ber_sequence_t ErrorMsgContent_sequence[] = { + { &hf_cmp_pKIStatusInfo , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo }, + { &hf_cmp_errorCode , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { &hf_cmp_errorDetails , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_ErrorMsgContent(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ErrorMsgContent_sequence, hf_index, ett_cmp_ErrorMsgContent); return offset; } -static int dissect_error(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_ErrorMsgContent(FALSE, tvb, offset, actx, tree, hf_cmp_error); -} -static const ber_old_sequence_t CertStatus_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_certHash }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_statusInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertStatus_sequence[] = { + { &hf_cmp_certHash , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING }, + { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { &hf_cmp_statusInfo , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIStatusInfo }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_CertStatus(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertStatus_sequence, hf_index, ett_cmp_CertStatus); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertStatus_sequence, hf_index, ett_cmp_CertStatus); return offset; } -static int dissect_CertConfirmContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertStatus(FALSE, tvb, offset, actx, tree, hf_cmp_CertConfirmContent_item); -} -static const ber_old_sequence_t CertConfirmContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CertConfirmContent_item }, +static const ber_sequence_t CertConfirmContent_sequence_of[1] = { + { &hf_cmp_CertConfirmContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_CertStatus }, }; int dissect_cmp_CertConfirmContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - CertConfirmContent_sequence_of, hf_index, ett_cmp_CertConfirmContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + CertConfirmContent_sequence_of, hf_index, ett_cmp_CertConfirmContent); return offset; } -static int dissect_certConf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_CertConfirmContent(FALSE, tvb, offset, actx, tree, hf_cmp_certConf); -} -static const ber_old_sequence_t PollReqContent_item_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId }, - { 0, 0, 0, NULL } +static const ber_sequence_t PollReqContent_item_sequence[] = { + { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { NULL, 0, 0, 0, NULL } }; static int dissect_cmp_PollReqContent_item(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PollReqContent_item_sequence, hf_index, ett_cmp_PollReqContent_item); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PollReqContent_item_sequence, hf_index, ett_cmp_PollReqContent_item); return offset; } -static int dissect_PollReqContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PollReqContent_item(FALSE, tvb, offset, actx, tree, hf_cmp_PollReqContent_item); -} -static const ber_old_sequence_t PollReqContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_PollReqContent_item }, +static const ber_sequence_t PollReqContent_sequence_of[1] = { + { &hf_cmp_PollReqContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PollReqContent_item }, }; int dissect_cmp_PollReqContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - PollReqContent_sequence_of, hf_index, ett_cmp_PollReqContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + PollReqContent_sequence_of, hf_index, ett_cmp_PollReqContent); return offset; } -static int dissect_pollReq(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PollReqContent(FALSE, tvb, offset, actx, tree, hf_cmp_pollReq); -} -static const ber_old_sequence_t PollRepContent_item_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_checkAfter }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_reason }, - { 0, 0, 0, NULL } +static const ber_sequence_t PollRepContent_item_sequence[] = { + { &hf_cmp_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { &hf_cmp_checkAfter , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { &hf_cmp_reason , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_cmp_PKIFreeText }, + { NULL, 0, 0, 0, NULL } }; static int dissect_cmp_PollRepContent_item(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PollRepContent_item_sequence, hf_index, ett_cmp_PollRepContent_item); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PollRepContent_item_sequence, hf_index, ett_cmp_PollRepContent_item); return offset; } -static int dissect_PollRepContent_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PollRepContent_item(FALSE, tvb, offset, actx, tree, hf_cmp_PollRepContent_item); -} -static const ber_old_sequence_t PollRepContent_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_PollRepContent_item }, +static const ber_sequence_t PollRepContent_sequence_of[1] = { + { &hf_cmp_PollRepContent_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PollRepContent_item }, }; int dissect_cmp_PollRepContent(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - PollRepContent_sequence_of, hf_index, ett_cmp_PollRepContent); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + PollRepContent_sequence_of, hf_index, ett_cmp_PollRepContent); return offset; } -static int dissect_pollRep(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PollRepContent(FALSE, tvb, offset, actx, tree, hf_cmp_pollRep); -} const value_string cmp_PKIBody_vals[] = { @@ -1371,47 +1040,44 @@ const value_string cmp_PKIBody_vals[] = { { 0, NULL } }; -static const ber_old_choice_t PKIBody_choice[] = { - { 0, BER_CLASS_CON, 0, 0, dissect_ir }, - { 1, BER_CLASS_CON, 1, 0, dissect_ip }, - { 2, BER_CLASS_CON, 2, 0, dissect_cr }, - { 3, BER_CLASS_CON, 3, 0, dissect_cp }, - { 5, BER_CLASS_CON, 5, 0, dissect_popdecc }, - { 6, BER_CLASS_CON, 6, 0, dissect_popdecr }, - { 7, BER_CLASS_CON, 7, 0, dissect_kur }, - { 8, BER_CLASS_CON, 8, 0, dissect_kup }, - { 9, BER_CLASS_CON, 9, 0, dissect_krr }, - { 10, BER_CLASS_CON, 10, 0, dissect_krp }, - { 11, BER_CLASS_CON, 11, 0, dissect_rr }, - { 12, BER_CLASS_CON, 12, 0, dissect_rp }, - { 13, BER_CLASS_CON, 13, 0, dissect_ccr }, - { 14, BER_CLASS_CON, 14, 0, dissect_ccp }, - { 15, BER_CLASS_CON, 15, 0, dissect_ckuann }, - { 16, BER_CLASS_CON, 16, 0, dissect_cann }, - { 17, BER_CLASS_CON, 17, 0, dissect_rann }, - { 18, BER_CLASS_CON, 18, 0, dissect_crlann }, - { 19, BER_CLASS_CON, 19, 0, dissect_pkiconf }, - { 20, BER_CLASS_CON, 20, 0, dissect_nested }, - { 21, BER_CLASS_CON, 21, 0, dissect_genm }, - { 22, BER_CLASS_CON, 22, 0, dissect_genp }, - { 23, BER_CLASS_CON, 23, 0, dissect_error }, - { 24, BER_CLASS_CON, 24, 0, dissect_certConf }, - { 25, BER_CLASS_CON, 25, 0, dissect_pollReq }, - { 26, BER_CLASS_CON, 26, 0, dissect_pollRep }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t PKIBody_choice[] = { + { 0, &hf_cmp_ir , BER_CLASS_CON, 0, 0, dissect_crmf_CertReqMessages }, + { 1, &hf_cmp_ip , BER_CLASS_CON, 1, 0, dissect_cmp_CertRepMessage }, + { 2, &hf_cmp_cr , BER_CLASS_CON, 2, 0, dissect_crmf_CertReqMessages }, + { 3, &hf_cmp_cp , BER_CLASS_CON, 3, 0, dissect_cmp_CertRepMessage }, + { 5, &hf_cmp_popdecc , BER_CLASS_CON, 5, 0, dissect_cmp_POPODecKeyChallContent }, + { 6, &hf_cmp_popdecr , BER_CLASS_CON, 6, 0, dissect_cmp_POPODecKeyRespContent }, + { 7, &hf_cmp_kur , BER_CLASS_CON, 7, 0, dissect_crmf_CertReqMessages }, + { 8, &hf_cmp_kup , BER_CLASS_CON, 8, 0, dissect_cmp_CertRepMessage }, + { 9, &hf_cmp_krr , BER_CLASS_CON, 9, 0, dissect_crmf_CertReqMessages }, + { 10, &hf_cmp_krp , BER_CLASS_CON, 10, 0, dissect_cmp_KeyRecRepContent }, + { 11, &hf_cmp_rr , BER_CLASS_CON, 11, 0, dissect_cmp_RevReqContent }, + { 12, &hf_cmp_rp , BER_CLASS_CON, 12, 0, dissect_cmp_RevRepContent }, + { 13, &hf_cmp_ccr , BER_CLASS_CON, 13, 0, dissect_crmf_CertReqMessages }, + { 14, &hf_cmp_ccp , BER_CLASS_CON, 14, 0, dissect_cmp_CertRepMessage }, + { 15, &hf_cmp_ckuann , BER_CLASS_CON, 15, 0, dissect_cmp_CAKeyUpdAnnContent }, + { 16, &hf_cmp_cann , BER_CLASS_CON, 16, 0, dissect_cmp_CertAnnContent }, + { 17, &hf_cmp_rann , BER_CLASS_CON, 17, 0, dissect_cmp_RevAnnContent }, + { 18, &hf_cmp_crlann , BER_CLASS_CON, 18, 0, dissect_cmp_CRLAnnContent }, + { 19, &hf_cmp_pkiconf , BER_CLASS_CON, 19, 0, dissect_cmp_PKIConfirmContent }, + { 20, &hf_cmp_nested , BER_CLASS_CON, 20, 0, dissect_cmp_NestedMessageContent }, + { 21, &hf_cmp_genm , BER_CLASS_CON, 21, 0, dissect_cmp_GenMsgContent }, + { 22, &hf_cmp_genp , BER_CLASS_CON, 22, 0, dissect_cmp_GenRepContent }, + { 23, &hf_cmp_error , BER_CLASS_CON, 23, 0, dissect_cmp_ErrorMsgContent }, + { 24, &hf_cmp_certConf , BER_CLASS_CON, 24, 0, dissect_cmp_CertConfirmContent }, + { 25, &hf_cmp_pollReq , BER_CLASS_CON, 25, 0, dissect_cmp_PollReqContent }, + { 26, &hf_cmp_pollRep , BER_CLASS_CON, 26, 0, dissect_cmp_PollRepContent }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_cmp_PKIBody(gboolean 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_old_choice(actx, tree, tvb, offset, - PKIBody_choice, hf_index, ett_cmp_PKIBody, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + PKIBody_choice, hf_index, ett_cmp_PKIBody, + NULL); return offset; } -static int dissect_body(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIBody(FALSE, tvb, offset, actx, tree, hf_cmp_body); -} @@ -1423,70 +1089,67 @@ dissect_cmp_PKIProtection(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs return offset; } -static int dissect_protection(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_PKIProtection(FALSE, tvb, offset, actx, tree, hf_cmp_protection); -} -static const ber_old_sequence_t PKIMessage_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_protection }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_extraCerts }, - { 0, 0, 0, NULL } +static const ber_sequence_t PKIMessage_sequence[] = { + { &hf_cmp_header , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIHeader }, + { &hf_cmp_body , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_PKIBody }, + { &hf_cmp_protection , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_cmp_PKIProtection }, + { &hf_cmp_extraCerts , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_cmp_SEQUENCE_SIZE_1_MAX_OF_CMPCertificate }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_PKIMessage(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PKIMessage_sequence, hf_index, ett_cmp_PKIMessage); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PKIMessage_sequence, hf_index, ett_cmp_PKIMessage); return offset; } -static const ber_old_sequence_t ProtectedPart_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_header }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_body }, - { 0, 0, 0, NULL } +static const ber_sequence_t ProtectedPart_sequence[] = { + { &hf_cmp_header , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cmp_PKIHeader }, + { &hf_cmp_body , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_cmp_PKIBody }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_ProtectedPart(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ProtectedPart_sequence, hf_index, ett_cmp_ProtectedPart); return offset; } -static const ber_old_sequence_t PBMParameter_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac }, - { 0, 0, 0, NULL } +static const ber_sequence_t PBMParameter_sequence[] = { + { &hf_cmp_salt , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_OCTET_STRING }, + { &hf_cmp_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_cmp_iterationCount , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_cmp_INTEGER }, + { &hf_cmp_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_PBMParameter(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PBMParameter_sequence, hf_index, ett_cmp_PBMParameter); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PBMParameter_sequence, hf_index, ett_cmp_PBMParameter); return offset; } -static const ber_old_sequence_t DHBMParameter_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac }, - { 0, 0, 0, NULL } +static const ber_sequence_t DHBMParameter_sequence[] = { + { &hf_cmp_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_cmp_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_DHBMParameter(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + DHBMParameter_sequence, hf_index, ett_cmp_DHBMParameter); return offset; } @@ -1510,22 +1173,19 @@ dissect_cmp_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_hashVal(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_cmp_hashVal); -} -static const ber_old_sequence_t OOBCertHash_sequence[] = { - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_hashAlg }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_certId }, - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_hashVal }, - { 0, 0, 0, NULL } +static const ber_sequence_t OOBCertHash_sequence[] = { + { &hf_cmp_hashAlg , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_cmp_certId , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_crmf_CertId }, + { &hf_cmp_hashVal , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_cmp_BIT_STRING }, + { NULL, 0, 0, 0, NULL } }; int dissect_cmp_OOBCertHash(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + OOBCertHash_sequence, hf_index, ett_cmp_OOBCertHash); return offset; } @@ -1540,27 +1200,27 @@ dissect_cmp_CAProtEncCertValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int } -static const ber_old_sequence_t SignKeyPairTypesValue_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_SignKeyPairTypesValue_item }, +static const ber_sequence_t SignKeyPairTypesValue_sequence_of[1] = { + { &hf_cmp_SignKeyPairTypesValue_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, }; static int dissect_cmp_SignKeyPairTypesValue(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SignKeyPairTypesValue_sequence_of, hf_index, ett_cmp_SignKeyPairTypesValue); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SignKeyPairTypesValue_sequence_of, hf_index, ett_cmp_SignKeyPairTypesValue); return offset; } -static const ber_old_sequence_t EncKeyPairTypesValue_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_EncKeyPairTypesValue_item }, +static const ber_sequence_t EncKeyPairTypesValue_sequence_of[1] = { + { &hf_cmp_EncKeyPairTypesValue_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, }; static int dissect_cmp_EncKeyPairTypesValue(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - EncKeyPairTypesValue_sequence_of, hf_index, ett_cmp_EncKeyPairTypesValue); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + EncKeyPairTypesValue_sequence_of, hf_index, ett_cmp_EncKeyPairTypesValue); return offset; } @@ -1600,19 +1260,16 @@ dissect_cmp_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_UnsupportedOIDsValue_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cmp_OBJECT_IDENTIFIER(FALSE, tvb, offset, actx, tree, hf_cmp_UnsupportedOIDsValue_item); -} -static const ber_old_sequence_t UnsupportedOIDsValue_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_UnsupportedOIDsValue_item }, +static const ber_sequence_t UnsupportedOIDsValue_sequence_of[1] = { + { &hf_cmp_UnsupportedOIDsValue_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_cmp_OBJECT_IDENTIFIER }, }; static int dissect_cmp_UnsupportedOIDsValue(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - UnsupportedOIDsValue_sequence_of, hf_index, ett_cmp_UnsupportedOIDsValue); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + UnsupportedOIDsValue_sequence_of, hf_index, ett_cmp_UnsupportedOIDsValue); return offset; } @@ -1672,14 +1329,14 @@ dissect_cmp_OrigPKIMessageValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in } -static const ber_old_sequence_t SuppLangTagsValue_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_SuppLangTagsValue_item }, +static const ber_sequence_t SuppLangTagsValue_sequence_of[1] = { + { &hf_cmp_SuppLangTagsValue_item, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_cmp_UTF8String }, }; static int dissect_cmp_SuppLangTagsValue(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SuppLangTagsValue_sequence_of, hf_index, ett_cmp_SuppLangTagsValue); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SuppLangTagsValue_sequence_of, hf_index, ett_cmp_SuppLangTagsValue); return offset; } diff --git a/epan/dissectors/packet-cmp.h b/epan/dissectors/packet-cmp.h index 5b90bf3742..d24b3ad5e4 100644 --- a/epan/dissectors/packet-cmp.h +++ b/epan/dissectors/packet-cmp.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-cmp.h */ -/* ../../tools/asn2wrs.py -b -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */ +/* ../../tools/asn2wrs.py -b -X -T -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */ /* Input file: packet-cmp-template.h */ diff --git a/epan/dissectors/packet-crmf.c b/epan/dissectors/packet-crmf.c index 914754e651..f2afda5874 100644 --- a/epan/dissectors/packet-crmf.c +++ b/epan/dissectors/packet-crmf.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-crmf.c */ -/* ../../tools/asn2wrs.py -b -e -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn */ +/* packet-crmf.c */ +/* ../../tools/asn2wrs.py -b -e -X -T -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn */ /* Input file: packet-crmf-template.c */ @@ -178,87 +178,6 @@ static const char *object_identifier_id; /*--- Included file: packet-crmf-fn.c ---*/ #line 1 "packet-crmf-fn.c" -/*--- Fields for imported types ---*/ - -static int dissect_version_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Version(TRUE, tvb, offset, actx, tree, hf_crmf_version); -} -static int dissect_signingAlg_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, actx, tree, hf_crmf_signingAlg); -} -static int dissect_template_issuer_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Name(TRUE, tvb, offset, actx, tree, hf_crmf_template_issuer); -} -static int dissect_subject_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Name(TRUE, tvb, offset, actx, tree, hf_crmf_subject); -} -static int dissect_publicKey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_SubjectPublicKeyInfo(FALSE, tvb, offset, actx, tree, hf_crmf_publicKey); -} -static int dissect_publicKey_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_SubjectPublicKeyInfo(TRUE, tvb, offset, actx, tree, hf_crmf_publicKey); -} -static int dissect_issuerUID_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_UniqueIdentifier(TRUE, tvb, offset, actx, tree, hf_crmf_issuerUID); -} -static int dissect_subjectUID_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_UniqueIdentifier(TRUE, tvb, offset, actx, tree, hf_crmf_subjectUID); -} -static int dissect_extensions_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Extensions(TRUE, tvb, offset, actx, tree, hf_crmf_extensions); -} -static int dissect_notBefore_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Time(TRUE, tvb, offset, actx, tree, hf_crmf_notBefore); -} -static int dissect_notAfter_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Time(TRUE, tvb, offset, actx, tree, hf_crmf_notAfter); -} -static int dissect_algorithmIdentifier(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_crmf_algorithmIdentifier); -} -static int dissect_sender_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(TRUE, tvb, offset, actx, tree, hf_crmf_sender); -} -static int dissect_algId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_crmf_algId); -} -static int dissect_owf(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_crmf_owf); -} -static int dissect_mac(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_crmf_mac); -} -static int dissect_encryptedKey_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cms_EnvelopedData(TRUE, tvb, offset, actx, tree, hf_crmf_encryptedKey); -} -static int dissect_pubLocation(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_crmf_pubLocation); -} -static int dissect_envelopedData_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_cms_EnvelopedData(TRUE, tvb, offset, actx, tree, hf_crmf_envelopedData); -} -static int dissect_intendedAlg_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, actx, tree, hf_crmf_intendedAlg); -} -static int dissect_symmAlg_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, actx, tree, hf_crmf_symmAlg); -} -static int dissect_keyAlg_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(TRUE, tvb, offset, actx, tree, hf_crmf_keyAlg); -} -static int dissect_issuer(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_crmf_issuer); -} -static int dissect_generalName(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(FALSE, tvb, offset, actx, tree, hf_crmf_generalName); -} -static int dissect_privateKeyAlgorithm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_crmf_privateKeyAlgorithm); -} -static int dissect_Attributes_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Attribute(FALSE, tvb, offset, actx, tree, hf_crmf_Attributes_item); -} - static int @@ -268,65 +187,44 @@ dissect_crmf_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U return offset; } -static int dissect_certReqId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_INTEGER(FALSE, tvb, offset, actx, tree, hf_crmf_certReqId); -} -static int dissect_serialNumber(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_INTEGER(FALSE, tvb, offset, actx, tree, hf_crmf_serialNumber); -} -static int dissect_serialNumber_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_INTEGER(TRUE, tvb, offset, actx, tree, hf_crmf_serialNumber); -} -static int dissect_iterationCount(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_INTEGER(FALSE, tvb, offset, actx, tree, hf_crmf_iterationCount); -} -static int dissect_privkey_version(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_INTEGER(FALSE, tvb, offset, actx, tree, hf_crmf_privkey_version); -} -static const ber_old_sequence_t OptionalValidity_sequence[] = { - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_notBefore_impl }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_notAfter_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t OptionalValidity_sequence[] = { + { &hf_crmf_notBefore , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Time }, + { &hf_crmf_notAfter , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Time }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_OptionalValidity(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - OptionalValidity_sequence, hf_index, ett_crmf_OptionalValidity); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + OptionalValidity_sequence, hf_index, ett_crmf_OptionalValidity); return offset; } -static int dissect_validity_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_OptionalValidity(TRUE, tvb, offset, actx, tree, hf_crmf_validity); -} -static const ber_old_sequence_t CertTemplate_sequence[] = { - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_version_impl }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_serialNumber_impl }, - { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_signingAlg_impl }, - { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_template_issuer_impl }, - { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_validity_impl }, - { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subject_impl }, - { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_publicKey_impl }, - { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_issuerUID_impl }, - { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_subjectUID_impl }, - { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertTemplate_sequence[] = { + { &hf_crmf_version , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Version }, + { &hf_crmf_serialNumber , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_INTEGER }, + { &hf_crmf_signingAlg , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_template_issuer, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Name }, + { &hf_crmf_validity , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_OptionalValidity }, + { &hf_crmf_subject , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Name }, + { &hf_crmf_publicKey , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_SubjectPublicKeyInfo }, + { &hf_crmf_issuerUID , BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_UniqueIdentifier }, + { &hf_crmf_subjectUID , BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_UniqueIdentifier }, + { &hf_crmf_extensions , BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_CertTemplate(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertTemplate_sequence, hf_index, ett_crmf_CertTemplate); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertTemplate_sequence, hf_index, ett_crmf_CertTemplate); return offset; } -static int dissect_certTemplate(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertTemplate(FALSE, tvb, offset, actx, tree, hf_crmf_certTemplate); -} @@ -336,9 +234,6 @@ dissect_crmf_T_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ return offset; } -static int dissect_type(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_T_type(FALSE, tvb, offset, actx, tree, hf_crmf_type); -} @@ -351,65 +246,50 @@ dissect_crmf_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U return offset; } -static int dissect_value(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_T_value(FALSE, tvb, offset, actx, tree, hf_crmf_value); -} -static const ber_old_sequence_t AttributeTypeAndValue_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type }, - { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_value }, - { 0, 0, 0, NULL } +static const ber_sequence_t AttributeTypeAndValue_sequence[] = { + { &hf_crmf_type , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_crmf_T_type }, + { &hf_crmf_value , BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_crmf_T_value }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_AttributeTypeAndValue(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - AttributeTypeAndValue_sequence, hf_index, ett_crmf_AttributeTypeAndValue); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + AttributeTypeAndValue_sequence, hf_index, ett_crmf_AttributeTypeAndValue); return offset; } -static int dissect_regInfo_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_AttributeTypeAndValue(FALSE, tvb, offset, actx, tree, hf_crmf_regInfo_item); -} -static int dissect_Controls_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_AttributeTypeAndValue(FALSE, tvb, offset, actx, tree, hf_crmf_Controls_item); -} -static const ber_old_sequence_t Controls_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Controls_item }, +static const ber_sequence_t Controls_sequence_of[1] = { + { &hf_crmf_Controls_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_AttributeTypeAndValue }, }; int dissect_crmf_Controls(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - Controls_sequence_of, hf_index, ett_crmf_Controls); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + Controls_sequence_of, hf_index, ett_crmf_Controls); return offset; } -static int dissect_controls(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_Controls(FALSE, tvb, offset, actx, tree, hf_crmf_controls); -} -static const ber_old_sequence_t CertRequest_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_certReqId }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certTemplate }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_controls }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertRequest_sequence[] = { + { &hf_crmf_certReqId , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER }, + { &hf_crmf_certTemplate , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertTemplate }, + { &hf_crmf_controls , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crmf_Controls }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_CertRequest(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertRequest_sequence, hf_index, ett_crmf_CertRequest); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertRequest_sequence, hf_index, ett_crmf_CertRequest); return offset; } -static int dissect_certReq(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertRequest(FALSE, tvb, offset, actx, tree, hf_crmf_certReq); -} @@ -419,9 +299,6 @@ dissect_crmf_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, return offset; } -static int dissect_raVerified_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_NULL(TRUE, tvb, offset, actx, tree, hf_crmf_raVerified); -} @@ -433,45 +310,21 @@ dissect_crmf_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_sk_signature(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_crmf_sk_signature); -} -static int dissect_pkmac_value(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_crmf_pkmac_value); -} -static int dissect_thisMessage_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BIT_STRING(TRUE, tvb, offset, actx, tree, hf_crmf_thisMessage); -} -static int dissect_dhMAC_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BIT_STRING(TRUE, tvb, offset, actx, tree, hf_crmf_dhMAC); -} -static int dissect_encSymmKey_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BIT_STRING(TRUE, tvb, offset, actx, tree, hf_crmf_encSymmKey); -} -static int dissect_encValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_crmf_encValue); -} -static const ber_old_sequence_t PKMACValue_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algId }, - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_pkmac_value }, - { 0, 0, 0, NULL } +static const ber_sequence_t PKMACValue_sequence[] = { + { &hf_crmf_algId , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_pkmac_value , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_BIT_STRING }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_PKMACValue(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PKMACValue_sequence, hf_index, ett_crmf_PKMACValue); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PKMACValue_sequence, hf_index, ett_crmf_PKMACValue); return offset; } -static int dissect_publicKeyMAC(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_PKMACValue(FALSE, tvb, offset, actx, tree, hf_crmf_publicKeyMAC); -} -static int dissect_agreeMAC_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_PKMACValue(TRUE, tvb, offset, actx, tree, hf_crmf_agreeMAC); -} static const value_string crmf_T_authInfo_vals[] = { @@ -480,60 +333,51 @@ static const value_string crmf_T_authInfo_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_authInfo_choice[] = { - { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_sender_impl }, - { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_publicKeyMAC }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_authInfo_choice[] = { + { 0, &hf_crmf_sender , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName }, + { 1, &hf_crmf_publicKeyMAC , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_PKMACValue }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_crmf_T_authInfo(gboolean 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_old_choice(actx, tree, tvb, offset, - T_authInfo_choice, hf_index, ett_crmf_T_authInfo, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_authInfo_choice, hf_index, ett_crmf_T_authInfo, + NULL); return offset; } -static int dissect_authInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_T_authInfo(FALSE, tvb, offset, actx, tree, hf_crmf_authInfo); -} -static const ber_old_sequence_t POPOSigningKeyInput_sequence[] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_authInfo }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_publicKey }, - { 0, 0, 0, NULL } +static const ber_sequence_t POPOSigningKeyInput_sequence[] = { + { &hf_crmf_authInfo , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_crmf_T_authInfo }, + { &hf_crmf_publicKey , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_SubjectPublicKeyInfo }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_POPOSigningKeyInput(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - POPOSigningKeyInput_sequence, hf_index, ett_crmf_POPOSigningKeyInput); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + POPOSigningKeyInput_sequence, hf_index, ett_crmf_POPOSigningKeyInput); return offset; } -static int dissect_poposkInput_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_POPOSigningKeyInput(TRUE, tvb, offset, actx, tree, hf_crmf_poposkInput); -} -static const ber_old_sequence_t POPOSigningKey_sequence[] = { - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_poposkInput_impl }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_algorithmIdentifier }, - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_sk_signature }, - { 0, 0, 0, NULL } +static const ber_sequence_t POPOSigningKey_sequence[] = { + { &hf_crmf_poposkInput , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_POPOSigningKeyInput }, + { &hf_crmf_algorithmIdentifier, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_sk_signature , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_BIT_STRING }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_POPOSigningKey(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - POPOSigningKey_sequence, hf_index, ett_crmf_POPOSigningKey); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + POPOSigningKey_sequence, hf_index, ett_crmf_POPOSigningKey); return offset; } -static int dissect_signature_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_POPOSigningKey(TRUE, tvb, offset, actx, tree, hf_crmf_signature); -} const value_string crmf_SubsequentMessage_vals[] = { @@ -550,9 +394,6 @@ dissect_crmf_SubsequentMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_subsequentMessage_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_SubsequentMessage(TRUE, tvb, offset, actx, tree, hf_crmf_subsequentMessage); -} const value_string crmf_POPOPrivKey_vals[] = { @@ -564,29 +405,23 @@ const value_string crmf_POPOPrivKey_vals[] = { { 0, NULL } }; -static const ber_old_choice_t POPOPrivKey_choice[] = { - { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_thisMessage_impl }, - { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_subsequentMessage_impl }, - { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_dhMAC_impl }, - { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_agreeMAC_impl }, - { 4, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_encryptedKey_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t POPOPrivKey_choice[] = { + { 0, &hf_crmf_thisMessage , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_crmf_BIT_STRING }, + { 1, &hf_crmf_subsequentMessage, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_crmf_SubsequentMessage }, + { 2, &hf_crmf_dhMAC , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_crmf_BIT_STRING }, + { 3, &hf_crmf_agreeMAC , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_crmf_PKMACValue }, + { 4, &hf_crmf_encryptedKey , BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_cms_EnvelopedData }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_crmf_POPOPrivKey(gboolean 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_old_choice(actx, tree, tvb, offset, - POPOPrivKey_choice, hf_index, ett_crmf_POPOPrivKey, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + POPOPrivKey_choice, hf_index, ett_crmf_POPOPrivKey, + NULL); return offset; } -static int dissect_keyEncipherment_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_POPOPrivKey(TRUE, tvb, offset, actx, tree, hf_crmf_keyEncipherment); -} -static int dissect_keyAgreement_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_POPOPrivKey(TRUE, tvb, offset, actx, tree, hf_crmf_keyAgreement); -} const value_string crmf_ProofOfPossession_vals[] = { @@ -597,70 +432,61 @@ const value_string crmf_ProofOfPossession_vals[] = { { 0, NULL } }; -static const ber_old_choice_t ProofOfPossession_choice[] = { - { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_raVerified_impl }, - { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_signature_impl }, - { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_keyEncipherment_impl }, - { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_keyAgreement_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t ProofOfPossession_choice[] = { + { 0, &hf_crmf_raVerified , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_crmf_NULL }, + { 1, &hf_crmf_signature , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_crmf_POPOSigningKey }, + { 2, &hf_crmf_keyEncipherment, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_crmf_POPOPrivKey }, + { 3, &hf_crmf_keyAgreement , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_crmf_POPOPrivKey }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_crmf_ProofOfPossession(gboolean 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_old_choice(actx, tree, tvb, offset, - ProofOfPossession_choice, hf_index, ett_crmf_ProofOfPossession, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + ProofOfPossession_choice, hf_index, ett_crmf_ProofOfPossession, + NULL); return offset; } -static int dissect_popo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_ProofOfPossession(FALSE, tvb, offset, actx, tree, hf_crmf_popo); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_regInfo_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of[1] = { + { &hf_crmf_regInfo_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_AttributeTypeAndValue }, }; static int dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue); return offset; } -static int dissect_regInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue(FALSE, tvb, offset, actx, tree, hf_crmf_regInfo); -} -static const ber_old_sequence_t CertReqMsg_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_certReq }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_popo }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_regInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertReqMsg_sequence[] = { + { &hf_crmf_certReq , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertRequest }, + { &hf_crmf_popo , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_crmf_ProofOfPossession }, + { &hf_crmf_regInfo , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_AttributeTypeAndValue }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_CertReqMsg(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertReqMsg_sequence, hf_index, ett_crmf_CertReqMsg); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertReqMsg_sequence, hf_index, ett_crmf_CertReqMsg); return offset; } -static int dissect_CertReqMessages_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_CertReqMsg(FALSE, tvb, offset, actx, tree, hf_crmf_CertReqMessages_item); -} -static const ber_old_sequence_t CertReqMessages_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_CertReqMessages_item }, +static const ber_sequence_t CertReqMessages_sequence_of[1] = { + { &hf_crmf_CertReqMessages_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_CertReqMsg }, }; int dissect_crmf_CertReqMessages(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - CertReqMessages_sequence_of, hf_index, ett_crmf_CertReqMessages); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + CertReqMessages_sequence_of, hf_index, ett_crmf_CertReqMessages); return offset; } @@ -674,29 +500,20 @@ dissect_crmf_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs return offset; } -static int dissect_salt(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_crmf_salt); -} -static int dissect_valueHint_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_OCTET_STRING(TRUE, tvb, offset, actx, tree, hf_crmf_valueHint); -} -static int dissect_privateKey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_crmf_privateKey); -} -static const ber_old_sequence_t PBMParameter_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_salt }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_owf }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_iterationCount }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_mac }, - { 0, 0, 0, NULL } +static const ber_sequence_t PBMParameter_sequence[] = { + { &hf_crmf_salt , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_OCTET_STRING }, + { &hf_crmf_owf , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_iterationCount , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER }, + { &hf_crmf_mac , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_PBMParameter(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PBMParameter_sequence, hf_index, ett_crmf_PBMParameter); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PBMParameter_sequence, hf_index, ett_crmf_PBMParameter); return offset; } @@ -738,9 +555,6 @@ dissect_crmf_T_action(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ return offset; } -static int dissect_action(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_T_action(FALSE, tvb, offset, actx, tree, hf_crmf_action); -} static const value_string crmf_T_pubMethod_vals[] = { @@ -759,80 +573,68 @@ dissect_crmf_T_pubMethod(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse return offset; } -static int dissect_pubMethod(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_T_pubMethod(FALSE, tvb, offset, actx, tree, hf_crmf_pubMethod); -} -static const ber_old_sequence_t SinglePubInfo_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pubMethod }, - { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pubLocation }, - { 0, 0, 0, NULL } +static const ber_sequence_t SinglePubInfo_sequence[] = { + { &hf_crmf_pubMethod , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_T_pubMethod }, + { &hf_crmf_pubLocation , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_SinglePubInfo(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - SinglePubInfo_sequence, hf_index, ett_crmf_SinglePubInfo); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + SinglePubInfo_sequence, hf_index, ett_crmf_SinglePubInfo); return offset; } -static int dissect_pubInfos_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_SinglePubInfo(FALSE, tvb, offset, actx, tree, hf_crmf_pubInfos_item); -} -static const ber_old_sequence_t SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pubInfos_item }, +static const ber_sequence_t SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of[1] = { + { &hf_crmf_pubInfos_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_SinglePubInfo }, }; static int dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo_sequence_of, hf_index, ett_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo); return offset; } -static int dissect_pubInfos(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo(FALSE, tvb, offset, actx, tree, hf_crmf_pubInfos); -} -static const ber_old_sequence_t PKIPublicationInfo_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_action }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pubInfos }, - { 0, 0, 0, NULL } +static const ber_sequence_t PKIPublicationInfo_sequence[] = { + { &hf_crmf_action , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_T_action }, + { &hf_crmf_pubInfos , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_crmf_SEQUENCE_SIZE_1_MAX_OF_SinglePubInfo }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_PKIPublicationInfo(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PKIPublicationInfo_sequence, hf_index, ett_crmf_PKIPublicationInfo); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PKIPublicationInfo_sequence, hf_index, ett_crmf_PKIPublicationInfo); return offset; } -static const ber_old_sequence_t EncryptedValue_sequence[] = { - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_intendedAlg_impl }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_symmAlg_impl }, - { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_encSymmKey_impl }, - { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_keyAlg_impl }, - { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_valueHint_impl }, - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_encValue }, - { 0, 0, 0, NULL } +static const ber_sequence_t EncryptedValue_sequence[] = { + { &hf_crmf_intendedAlg , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_symmAlg , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_encSymmKey , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_BIT_STRING }, + { &hf_crmf_keyAlg , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_valueHint , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_OCTET_STRING }, + { &hf_crmf_encValue , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_BIT_STRING }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_EncryptedValue(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - EncryptedValue_sequence, hf_index, ett_crmf_EncryptedValue); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + EncryptedValue_sequence, hf_index, ett_crmf_EncryptedValue); return offset; } -static int dissect_encryptedValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_EncryptedValue(FALSE, tvb, offset, actx, tree, hf_crmf_encryptedValue); -} const value_string crmf_EncryptedKey_vals[] = { @@ -841,23 +643,20 @@ const value_string crmf_EncryptedKey_vals[] = { { 0, NULL } }; -static const ber_old_choice_t EncryptedKey_choice[] = { - { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_encryptedValue }, - { 1, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_envelopedData_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t EncryptedKey_choice[] = { + { 0, &hf_crmf_encryptedValue , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_EncryptedValue }, + { 1, &hf_crmf_envelopedData , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_cms_EnvelopedData }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_crmf_EncryptedKey(gboolean 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_old_choice(actx, tree, tvb, offset, - EncryptedKey_choice, hf_index, ett_crmf_EncryptedKey, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + EncryptedKey_choice, hf_index, ett_crmf_EncryptedKey, + NULL); return offset; } -static int dissect_encryptedPrivKey_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_EncryptedKey(TRUE, tvb, offset, actx, tree, hf_crmf_encryptedPrivKey); -} @@ -868,9 +667,6 @@ dissect_crmf_KeyGenParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_keyGenParameters_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_KeyGenParameters(TRUE, tvb, offset, actx, tree, hf_crmf_keyGenParameters); -} @@ -880,9 +676,6 @@ dissect_crmf_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U return offset; } -static int dissect_archiveRemGenPrivKey_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_BOOLEAN(TRUE, tvb, offset, actx, tree, hf_crmf_archiveRemGenPrivKey); -} const value_string crmf_PKIArchiveOptions_vals[] = { @@ -892,33 +685,33 @@ const value_string crmf_PKIArchiveOptions_vals[] = { { 0, NULL } }; -static const ber_old_choice_t PKIArchiveOptions_choice[] = { - { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_encryptedPrivKey_impl }, - { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_keyGenParameters_impl }, - { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_archiveRemGenPrivKey_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t PKIArchiveOptions_choice[] = { + { 0, &hf_crmf_encryptedPrivKey, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_crmf_EncryptedKey }, + { 1, &hf_crmf_keyGenParameters, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_crmf_KeyGenParameters }, + { 2, &hf_crmf_archiveRemGenPrivKey, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_crmf_BOOLEAN }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_crmf_PKIArchiveOptions(gboolean 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_old_choice(actx, tree, tvb, offset, - PKIArchiveOptions_choice, hf_index, ett_crmf_PKIArchiveOptions, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + PKIArchiveOptions_choice, hf_index, ett_crmf_PKIArchiveOptions, + NULL); return offset; } -static const ber_old_sequence_t CertId_sequence[] = { - { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_issuer }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber }, - { 0, 0, 0, NULL } +static const ber_sequence_t CertId_sequence[] = { + { &hf_crmf_issuer , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName }, + { &hf_crmf_serialNumber , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_CertId(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - CertId_sequence, hf_index, ett_crmf_CertId); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + CertId_sequence, hf_index, ett_crmf_CertId); return offset; } @@ -962,40 +755,34 @@ dissect_crmf_CertReq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U } -static const ber_old_sequence_t Attributes_set_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Attributes_item }, +static const ber_sequence_t Attributes_set_of[1] = { + { &hf_crmf_Attributes_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Attribute }, }; int dissect_crmf_Attributes(gboolean 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_old_set_of(implicit_tag, actx, tree, tvb, offset, - Attributes_set_of, hf_index, ett_crmf_Attributes); + offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, + Attributes_set_of, hf_index, ett_crmf_Attributes); return offset; } -static int dissect_attributes_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_Attributes(TRUE, tvb, offset, actx, tree, hf_crmf_attributes); -} -static const ber_old_sequence_t PrivateKeyInfo_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_privkey_version }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_privateKeyAlgorithm }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_privateKey }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_attributes_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t PrivateKeyInfo_sequence[] = { + { &hf_crmf_privkey_version, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_crmf_INTEGER }, + { &hf_crmf_privateKeyAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_crmf_privateKey , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_crmf_OCTET_STRING }, + { &hf_crmf_attributes , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_crmf_Attributes }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_PrivateKeyInfo(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PrivateKeyInfo_sequence, hf_index, ett_crmf_PrivateKeyInfo); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PrivateKeyInfo_sequence, hf_index, ett_crmf_PrivateKeyInfo); return offset; } -static int dissect_enckeywid_privkey(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_PrivateKeyInfo(FALSE, tvb, offset, actx, tree, hf_crmf_enckeywid_privkey); -} @@ -1007,9 +794,6 @@ dissect_crmf_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_string(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_UTF8String(FALSE, tvb, offset, actx, tree, hf_crmf_string); -} static const value_string crmf_T_identifier_vals[] = { @@ -1018,35 +802,32 @@ static const value_string crmf_T_identifier_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_identifier_choice[] = { - { 0, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_string }, - { 1, BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_generalName }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_identifier_choice[] = { + { 0, &hf_crmf_string , BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_crmf_UTF8String }, + { 1, &hf_crmf_generalName , BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_GeneralName }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_crmf_T_identifier(gboolean 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_old_choice(actx, tree, tvb, offset, - T_identifier_choice, hf_index, ett_crmf_T_identifier, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_identifier_choice, hf_index, ett_crmf_T_identifier, + NULL); return offset; } -static int dissect_identifier(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_crmf_T_identifier(FALSE, tvb, offset, actx, tree, hf_crmf_identifier); -} -static const ber_old_sequence_t EncKeyWithID_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_enckeywid_privkey }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_identifier }, - { 0, 0, 0, NULL } +static const ber_sequence_t EncKeyWithID_sequence[] = { + { &hf_crmf_enckeywid_privkey, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_crmf_PrivateKeyInfo }, + { &hf_crmf_identifier , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_crmf_T_identifier }, + { NULL, 0, 0, 0, NULL } }; int dissect_crmf_EncKeyWithID(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - EncKeyWithID_sequence, hf_index, ett_crmf_EncKeyWithID); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + EncKeyWithID_sequence, hf_index, ett_crmf_EncKeyWithID); return offset; } diff --git a/epan/dissectors/packet-crmf.h b/epan/dissectors/packet-crmf.h index 5d6428d43c..7773bf4f6e 100644 --- a/epan/dissectors/packet-crmf.h +++ b/epan/dissectors/packet-crmf.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-crmf.h */ -/* ../../tools/asn2wrs.py -b -e -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn */ +/* packet-crmf.h */ +/* ../../tools/asn2wrs.py -b -e -X -T -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn */ /* Input file: packet-crmf-template.h */ diff --git a/epan/dissectors/packet-pkix1explicit.c b/epan/dissectors/packet-pkix1explicit.c index 4813b13b80..030ae63b8e 100644 --- a/epan/dissectors/packet-pkix1explicit.c +++ b/epan/dissectors/packet-pkix1explicit.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkix1explicit.c */ -/* ../../tools/asn2wrs.py -e -b -p pkix1explicit -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn */ +/* packet-pkix1explicit.c */ +/* ../../tools/asn2wrs.py -b -X -T -p pkix1explicit -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn */ /* Input file: packet-pkix1explicit-template.c */ @@ -151,9 +151,6 @@ dissect_pkix1explicit_SubjectPublicKeyInfo(gboolean implicit_tag, tvbuff_t *tvb, /*--- Included file: packet-pkix1explicit-fn.c ---*/ #line 1 "packet-pkix1explicit-fn.c" -/*--- Fields for imported types ---*/ - - int @@ -202,9 +199,6 @@ dissect_pkix1explicit_UTCTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_utcTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_UTCTime(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_utcTime); -} @@ -214,9 +208,6 @@ dissect_pkix1explicit_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _ return offset; } -static int dissect_generalTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_generalTime); -} const value_string pkix1explicit_Time_vals[] = { @@ -225,17 +216,17 @@ const value_string pkix1explicit_Time_vals[] = { { 0, NULL } }; -static const ber_old_choice_t Time_choice[] = { - { 0, BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_utcTime }, - { 1, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_generalTime }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t Time_choice[] = { + { 0, &hf_pkix1explicit_utcTime, BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_UTCTime }, + { 1, &hf_pkix1explicit_generalTime, BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_GeneralizedTime }, + { 0, NULL, 0, 0, 0, NULL } }; int dissect_pkix1explicit_Time(gboolean 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_old_choice(actx, tree, tvb, offset, - Time_choice, hf_index, ett_pkix1explicit_Time, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + Time_choice, hf_index, ett_pkix1explicit_Time, + NULL); return offset; } @@ -248,9 +239,6 @@ dissect_pkix1explicit_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_extnId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_T_extnId(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_extnId); -} @@ -260,9 +248,6 @@ dissect_pkix1explicit_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_critical(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_BOOLEAN(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_critical); -} @@ -283,38 +268,32 @@ dissect_pkix1explicit_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, return offset; } -static int dissect_extnValue(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_T_extnValue(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_extnValue); -} -static const ber_old_sequence_t Extension_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_extnId }, - { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_critical }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_extnValue }, - { 0, 0, 0, NULL } +static const ber_sequence_t Extension_sequence[] = { + { &hf_pkix1explicit_extnId, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_T_extnId }, + { &hf_pkix1explicit_critical, BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_BOOLEAN }, + { &hf_pkix1explicit_extnValue, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_T_extnValue }, + { NULL, 0, 0, 0, NULL } }; int dissect_pkix1explicit_Extension(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - Extension_sequence, hf_index, ett_pkix1explicit_Extension); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Extension_sequence, hf_index, ett_pkix1explicit_Extension); return offset; } -static int dissect_Extensions_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Extension(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_Extensions_item); -} -static const ber_old_sequence_t Extensions_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Extensions_item }, +static const ber_sequence_t Extensions_sequence_of[1] = { + { &hf_pkix1explicit_Extensions_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_Extension }, }; int dissect_pkix1explicit_Extensions(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - Extensions_sequence_of, hf_index, ett_pkix1explicit_Extensions); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + Extensions_sequence_of, hf_index, ett_pkix1explicit_Extensions); return offset; } @@ -328,21 +307,6 @@ dissect_pkix1explicit_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_p(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_p); -} -static int dissect_g(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_g); -} -static int dissect_q(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_q); -} -static int dissect_j(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_j); -} -static int dissect_pgenCounter(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_pgenCounter); -} @@ -354,42 +318,36 @@ dissect_pkix1explicit_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i return offset; } -static int dissect_seed(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_BIT_STRING(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_seed); -} -static const ber_old_sequence_t ValidationParms_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_seed }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pgenCounter }, - { 0, 0, 0, NULL } +static const ber_sequence_t ValidationParms_sequence[] = { + { &hf_pkix1explicit_seed , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_BIT_STRING }, + { &hf_pkix1explicit_pgenCounter, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_INTEGER }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkix1explicit_ValidationParms(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - ValidationParms_sequence, hf_index, ett_pkix1explicit_ValidationParms); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ValidationParms_sequence, hf_index, ett_pkix1explicit_ValidationParms); return offset; } -static int dissect_validationParms(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_ValidationParms(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_validationParms); -} -static const ber_old_sequence_t DomainParameters_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_p }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_g }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_q }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_j }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_validationParms }, - { 0, 0, 0, NULL } +static const ber_sequence_t DomainParameters_sequence[] = { + { &hf_pkix1explicit_p , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_INTEGER }, + { &hf_pkix1explicit_g , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_INTEGER }, + { &hf_pkix1explicit_q , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_INTEGER }, + { &hf_pkix1explicit_j , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_INTEGER }, + { &hf_pkix1explicit_validationParms, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_ValidationParms }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkix1explicit_DomainParameters(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - DomainParameters_sequence, hf_index, ett_pkix1explicit_DomainParameters); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + DomainParameters_sequence, hf_index, ett_pkix1explicit_DomainParameters); return offset; } @@ -402,9 +360,6 @@ dissect_pkix1explicit_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb return offset; } -static int dissect_type(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_OBJECT_IDENTIFIER(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_type); -} @@ -417,37 +372,31 @@ dissect_pkix1explicit_T_values_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ return offset; } -static int dissect_values_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_T_values_item(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_values_item); -} -static const ber_old_sequence_t T_values_set_of[1] = { - { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_values_item }, +static const ber_sequence_t T_values_set_of[1] = { + { &hf_pkix1explicit_values_item, BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_T_values_item }, }; static int dissect_pkix1explicit_T_values(gboolean 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_old_set_of(implicit_tag, actx, tree, tvb, offset, - T_values_set_of, hf_pkix1explicit_object_identifier_id, ett_pkix1explicit_T_values); + offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, + T_values_set_of, hf_pkix1explicit_object_identifier_id, ett_pkix1explicit_T_values); return offset; } -static int dissect_values(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_T_values(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_values); -} -static const ber_old_sequence_t Attribute_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type }, - { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_values }, - { 0, 0, 0, NULL } +static const ber_sequence_t Attribute_sequence[] = { + { &hf_pkix1explicit_type , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_OBJECT_IDENTIFIER }, + { &hf_pkix1explicit_values, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_T_values }, + { NULL, 0, 0, 0, NULL } }; int dissect_pkix1explicit_Attribute(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - Attribute_sequence, hf_index, ett_pkix1explicit_Attribute); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Attribute_sequence, hf_index, ett_pkix1explicit_Attribute); return offset; } @@ -463,53 +412,44 @@ dissect_pkix1explicit_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_value(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_T_value(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_value); -} -static const ber_old_sequence_t AttributeTypeAndValue_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_type }, - { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_value }, - { 0, 0, 0, NULL } +static const ber_sequence_t AttributeTypeAndValue_sequence[] = { + { &hf_pkix1explicit_type , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_OBJECT_IDENTIFIER }, + { &hf_pkix1explicit_value , BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_T_value }, + { NULL, 0, 0, 0, NULL } }; int dissect_pkix1explicit_AttributeTypeAndValue(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - AttributeTypeAndValue_sequence, hf_index, ett_pkix1explicit_AttributeTypeAndValue); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + AttributeTypeAndValue_sequence, hf_index, ett_pkix1explicit_AttributeTypeAndValue); return offset; } -static int dissect_RelativeDistinguishedName_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AttributeTypeAndValue(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_RelativeDistinguishedName_item); -} -static const ber_old_sequence_t RelativeDistinguishedName_set_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_RelativeDistinguishedName_item }, +static const ber_sequence_t RelativeDistinguishedName_set_of[1] = { + { &hf_pkix1explicit_RelativeDistinguishedName_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AttributeTypeAndValue }, }; int dissect_pkix1explicit_RelativeDistinguishedName(gboolean 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_old_set_of(implicit_tag, actx, tree, tvb, offset, - RelativeDistinguishedName_set_of, hf_index, ett_pkix1explicit_RelativeDistinguishedName); + offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset, + RelativeDistinguishedName_set_of, hf_index, ett_pkix1explicit_RelativeDistinguishedName); return offset; } -static int dissect_RDNSequence_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_RelativeDistinguishedName(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_RDNSequence_item); -} -static const ber_old_sequence_t RDNSequence_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_RDNSequence_item }, +static const ber_sequence_t RDNSequence_sequence_of[1] = { + { &hf_pkix1explicit_RDNSequence_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_RelativeDistinguishedName }, }; int dissect_pkix1explicit_RDNSequence(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - RDNSequence_sequence_of, hf_index, ett_pkix1explicit_RDNSequence); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + RDNSequence_sequence_of, hf_index, ett_pkix1explicit_RDNSequence); return offset; } @@ -556,24 +496,18 @@ dissect_pkix1explicit_TeletexString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ return offset; } -static int dissect_type_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_TeletexString(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_type_01); -} -static int dissect_value_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_TeletexString(FALSE, tvb, offset, actx, tree, hf_pkix1explicit_value_01); -} -static const ber_old_sequence_t TeletexDomainDefinedAttribute_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_type_01 }, - { BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_value_01 }, - { 0, 0, 0, NULL } +static const ber_sequence_t TeletexDomainDefinedAttribute_sequence[] = { + { &hf_pkix1explicit_type_01, BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_TeletexString }, + { &hf_pkix1explicit_value_01, BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_TeletexString }, + { NULL, 0, 0, 0, NULL } }; int dissect_pkix1explicit_TeletexDomainDefinedAttribute(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - TeletexDomainDefinedAttribute_sequence, hf_index, ett_pkix1explicit_TeletexDomainDefinedAttribute); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TeletexDomainDefinedAttribute_sequence, hf_index, ett_pkix1explicit_TeletexDomainDefinedAttribute); return offset; } diff --git a/epan/dissectors/packet-pkix1explicit.h b/epan/dissectors/packet-pkix1explicit.h index af3f92b0f7..87fc744fde 100644 --- a/epan/dissectors/packet-pkix1explicit.h +++ b/epan/dissectors/packet-pkix1explicit.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkix1explicit.h */ -/* ../../tools/asn2wrs.py -e -b -p pkix1explicit -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn */ +/* packet-pkix1explicit.h */ +/* ../../tools/asn2wrs.py -b -X -T -p pkix1explicit -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn */ /* Input file: packet-pkix1explicit-template.h */ diff --git a/epan/dissectors/packet-pkix1implicit.c b/epan/dissectors/packet-pkix1implicit.c index ef5d5183b4..fa58381d30 100644 --- a/epan/dissectors/packet-pkix1implicit.c +++ b/epan/dissectors/packet-pkix1implicit.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkix1implicit.c */ -/* ../../tools/asn2wrs.py -e -b -p pkix1implicit -c pkix1implicit.cnf -s packet-pkix1implicit-template PKIX1IMPLICIT93.asn */ +/* packet-pkix1implicit.c */ +/* ../../tools/asn2wrs.py -b -X -T -p pkix1implicit -c pkix1implicit.cnf -s packet-pkix1implicit-template PKIX1IMPLICIT93.asn */ /* Input file: packet-pkix1implicit-template.c */ @@ -107,18 +107,6 @@ dissect_pkix1implicit_GeneralName(gboolean implicit_tag _U_, tvbuff_t *tvb, int /*--- Included file: packet-pkix1implicit-fn.c ---*/ #line 1 "packet-pkix1implicit-fn.c" -/*--- Fields for imported types ---*/ - -static int dissect_nameAssigner_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_DirectoryString(TRUE, tvb, offset, actx, tree, hf_pkix1implicit_nameAssigner); -} -static int dissect_partyName_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_DirectoryString(TRUE, tvb, offset, actx, tree, hf_pkix1implicit_partyName); -} -static int dissect_accessLocation(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_x509ce_GeneralName(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_accessLocation); -} - int @@ -139,16 +127,16 @@ dissect_pkix1implicit_Dummy(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of } -static const ber_old_sequence_t EDIPartyName_sequence[] = { - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_nameAssigner_impl }, - { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_partyName_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t EDIPartyName_sequence[] = { + { &hf_pkix1implicit_nameAssigner, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_DirectoryString }, + { &hf_pkix1implicit_partyName, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_pkix1explicit_DirectoryString }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkix1implicit_EDIPartyName(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - EDIPartyName_sequence, hf_index, ett_pkix1implicit_EDIPartyName); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + EDIPartyName_sequence, hf_index, ett_pkix1implicit_EDIPartyName); return offset; } @@ -161,37 +149,31 @@ dissect_pkix1implicit_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb return offset; } -static int dissect_accessMethod(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_OBJECT_IDENTIFIER(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_accessMethod); -} -static const ber_old_sequence_t AccessDescription_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_accessMethod }, - { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_accessLocation }, - { 0, 0, 0, NULL } +static const ber_sequence_t AccessDescription_sequence[] = { + { &hf_pkix1implicit_accessMethod, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_OBJECT_IDENTIFIER }, + { &hf_pkix1implicit_accessLocation, BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkix1implicit_AccessDescription(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - AccessDescription_sequence, hf_index, ett_pkix1implicit_AccessDescription); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + AccessDescription_sequence, hf_index, ett_pkix1implicit_AccessDescription); return offset; } -static int dissect_AuthorityInfoAccessSyntax_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_AccessDescription(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_AuthorityInfoAccessSyntax_item); -} -static const ber_old_sequence_t AuthorityInfoAccessSyntax_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_AuthorityInfoAccessSyntax_item }, +static const ber_sequence_t AuthorityInfoAccessSyntax_sequence_of[1] = { + { &hf_pkix1implicit_AuthorityInfoAccessSyntax_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_AccessDescription }, }; int dissect_pkix1implicit_AuthorityInfoAccessSyntax(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - AuthorityInfoAccessSyntax_sequence_of, hf_index, ett_pkix1implicit_AuthorityInfoAccessSyntax); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + AuthorityInfoAccessSyntax_sequence_of, hf_index, ett_pkix1implicit_AuthorityInfoAccessSyntax); return offset; } @@ -206,9 +188,6 @@ dissect_pkix1implicit_VisibleString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ return offset; } -static int dissect_visibleString(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_VisibleString(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_visibleString); -} @@ -220,9 +199,6 @@ dissect_pkix1implicit_BMPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in return offset; } -static int dissect_bmpString(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_BMPString(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_bmpString); -} @@ -234,9 +210,6 @@ dissect_pkix1implicit_UTF8String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i return offset; } -static int dissect_utf8String(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_UTF8String(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_utf8String); -} static const value_string pkix1implicit_DisplayText_vals[] = { @@ -246,27 +219,21 @@ static const value_string pkix1implicit_DisplayText_vals[] = { { 0, NULL } }; -static const ber_old_choice_t DisplayText_choice[] = { - { 0, BER_CLASS_UNI, BER_UNI_TAG_VisibleString, BER_FLAGS_NOOWNTAG, dissect_visibleString }, - { 1, BER_CLASS_UNI, BER_UNI_TAG_BMPString, BER_FLAGS_NOOWNTAG, dissect_bmpString }, - { 2, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_utf8String }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t DisplayText_choice[] = { + { 0, &hf_pkix1implicit_visibleString, BER_CLASS_UNI, BER_UNI_TAG_VisibleString, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_VisibleString }, + { 1, &hf_pkix1implicit_bmpString, BER_CLASS_UNI, BER_UNI_TAG_BMPString, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_BMPString }, + { 2, &hf_pkix1implicit_utf8String, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_UTF8String }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_pkix1implicit_DisplayText(gboolean 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_old_choice(actx, tree, tvb, offset, - DisplayText_choice, hf_index, ett_pkix1implicit_DisplayText, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + DisplayText_choice, hf_index, ett_pkix1implicit_DisplayText, + NULL); return offset; } -static int dissect_explicitText(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_DisplayText(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_explicitText); -} -static int dissect_organization(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_DisplayText(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_organization); -} @@ -277,55 +244,46 @@ dissect_pkix1implicit_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_noticeNumbers_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_noticeNumbers_item); -} -static const ber_old_sequence_t T_noticeNumbers_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_noticeNumbers_item }, +static const ber_sequence_t T_noticeNumbers_sequence_of[1] = { + { &hf_pkix1implicit_noticeNumbers_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_INTEGER }, }; static int dissect_pkix1implicit_T_noticeNumbers(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - T_noticeNumbers_sequence_of, hf_index, ett_pkix1implicit_T_noticeNumbers); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + T_noticeNumbers_sequence_of, hf_index, ett_pkix1implicit_T_noticeNumbers); return offset; } -static int dissect_noticeNumbers(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_T_noticeNumbers(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_noticeNumbers); -} -static const ber_old_sequence_t NoticeReference_sequence[] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_organization }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_noticeNumbers }, - { 0, 0, 0, NULL } +static const ber_sequence_t NoticeReference_sequence[] = { + { &hf_pkix1implicit_organization, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkix1implicit_DisplayText }, + { &hf_pkix1implicit_noticeNumbers, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_T_noticeNumbers }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkix1implicit_NoticeReference(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - NoticeReference_sequence, hf_index, ett_pkix1implicit_NoticeReference); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + NoticeReference_sequence, hf_index, ett_pkix1implicit_NoticeReference); return offset; } -static int dissect_noticeRef(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_NoticeReference(FALSE, tvb, offset, actx, tree, hf_pkix1implicit_noticeRef); -} -static const ber_old_sequence_t UserNotice_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_noticeRef }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_explicitText }, - { 0, 0, 0, NULL } +static const ber_sequence_t UserNotice_sequence[] = { + { &hf_pkix1implicit_noticeRef, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkix1implicit_NoticeReference }, + { &hf_pkix1implicit_explicitText, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkix1implicit_DisplayText }, + { NULL, 0, 0, 0, NULL } }; int dissect_pkix1implicit_UserNotice(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - UserNotice_sequence, hf_index, ett_pkix1implicit_UserNotice); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + UserNotice_sequence, hf_index, ett_pkix1implicit_UserNotice); return offset; } diff --git a/epan/dissectors/packet-pkix1implicit.h b/epan/dissectors/packet-pkix1implicit.h index 8e599d36ed..1d1168d459 100644 --- a/epan/dissectors/packet-pkix1implicit.h +++ b/epan/dissectors/packet-pkix1implicit.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkix1implicit.h */ -/* ../../tools/asn2wrs.py -e -b -p pkix1implicit -c pkix1implicit.cnf -s packet-pkix1implicit-template PKIX1IMPLICIT93.asn */ +/* packet-pkix1implicit.h */ +/* ../../tools/asn2wrs.py -b -X -T -p pkix1implicit -c pkix1implicit.cnf -s packet-pkix1implicit-template PKIX1IMPLICIT93.asn */ /* Input file: packet-pkix1implicit-template.h */ diff --git a/epan/dissectors/packet-pkixproxy.c b/epan/dissectors/packet-pkixproxy.c index 3a0765c802..1f82ea6a71 100644 --- a/epan/dissectors/packet-pkixproxy.c +++ b/epan/dissectors/packet-pkixproxy.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-pkixproxy.c */ -/* ../../tools/asn2wrs.py -b -p pkixproxy -c pkixproxy.cnf -s packet-pkixproxy-template PKIXProxy.asn */ +/* ../../tools/asn2wrs.py -b -X -T -p pkixproxy -c pkixproxy.cnf -s packet-pkixproxy-template PKIXProxy.asn */ /* Input file: packet-pkixproxy-template.c */ @@ -77,9 +77,6 @@ static gint ett_pkixproxy_ProxyPolicy = -1; /*--- Included file: packet-pkixproxy-fn.c ---*/ #line 1 "packet-pkixproxy-fn.c" -/*--- Fields for imported types ---*/ - - static int @@ -89,9 +86,6 @@ dissect_pkixproxy_ProxyCertPathLengthConstraint(gboolean implicit_tag _U_, tvbuf return offset; } -static int dissect_pCPathLenConstraint(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixproxy_ProxyCertPathLengthConstraint(FALSE, tvb, offset, actx, tree, hf_pkixproxy_pCPathLenConstraint); -} @@ -101,9 +95,6 @@ dissect_pkixproxy_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ return offset; } -static int dissect_policyLanguage(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixproxy_OBJECT_IDENTIFIER(FALSE, tvb, offset, actx, tree, hf_pkixproxy_policyLanguage); -} @@ -114,39 +105,33 @@ dissect_pkixproxy_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_policy(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixproxy_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_pkixproxy_policy); -} -static const ber_old_sequence_t ProxyPolicy_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_policyLanguage }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_policy }, - { 0, 0, 0, NULL } +static const ber_sequence_t ProxyPolicy_sequence[] = { + { &hf_pkixproxy_policyLanguage, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixproxy_OBJECT_IDENTIFIER }, + { &hf_pkixproxy_policy , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixproxy_OCTET_STRING }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixproxy_ProxyPolicy(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - ProxyPolicy_sequence, hf_index, ett_pkixproxy_ProxyPolicy); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ProxyPolicy_sequence, hf_index, ett_pkixproxy_ProxyPolicy); return offset; } -static int dissect_proxyPolicy(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixproxy_ProxyPolicy(FALSE, tvb, offset, actx, tree, hf_pkixproxy_proxyPolicy); -} -static const ber_old_sequence_t ProxyCertInfoExtension_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pCPathLenConstraint }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_proxyPolicy }, - { 0, 0, 0, NULL } +static const ber_sequence_t ProxyCertInfoExtension_sequence[] = { + { &hf_pkixproxy_pCPathLenConstraint, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixproxy_ProxyCertPathLengthConstraint }, + { &hf_pkixproxy_proxyPolicy, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixproxy_ProxyPolicy }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixproxy_ProxyCertInfoExtension(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - ProxyCertInfoExtension_sequence, hf_index, ett_pkixproxy_ProxyCertInfoExtension); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ProxyCertInfoExtension_sequence, hf_index, ett_pkixproxy_ProxyCertInfoExtension); return offset; } diff --git a/epan/dissectors/packet-pkixproxy.h b/epan/dissectors/packet-pkixproxy.h index 55cc5c6eaa..9be204c516 100644 --- a/epan/dissectors/packet-pkixproxy.h +++ b/epan/dissectors/packet-pkixproxy.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-pkixproxy.h */ -/* ../../tools/asn2wrs.py -b -p pkixproxy -c pkixproxy.cnf -s packet-pkixproxy-template PKIXProxy.asn */ +/* ../../tools/asn2wrs.py -b -X -T -p pkixproxy -c pkixproxy.cnf -s packet-pkixproxy-template PKIXProxy.asn */ /* Input file: packet-pkixproxy-template.h */ diff --git a/epan/dissectors/packet-pkixqualified.c b/epan/dissectors/packet-pkixqualified.c index d880b83518..0be2632ab8 100644 --- a/epan/dissectors/packet-pkixqualified.c +++ b/epan/dissectors/packet-pkixqualified.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkixqualified.c */ -/* ../../tools/asn2wrs.py -b -e -p pkixqualified -c pkixqualified.cnf -s packet-pkixqualified-template PKIXqualified.asn */ +/* packet-pkixqualified.c */ +/* ../../tools/asn2wrs.py -b -X -T -p pkixqualified -c pkixqualified.cnf -s packet-pkixqualified-template PKIXqualified.asn */ /* Input file: packet-pkixqualified-template.c */ @@ -101,15 +101,6 @@ static const char *object_identifier_id; /*--- Included file: packet-pkixqualified-fn.c ---*/ #line 1 "packet-pkixqualified-fn.c" -/*--- Fields for imported types ---*/ - -static int dissect_hashAlgorithm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_x509af_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_pkixqualified_hashAlgorithm); -} -static int dissect_NameRegistrationAuthorities_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_x509ce_GeneralName(FALSE, tvb, offset, actx, tree, hf_pkixqualified_NameRegistrationAuthorities_item); -} - static int @@ -154,9 +145,6 @@ dissect_pkixqualified_PredefinedBiometricType(gboolean implicit_tag _U_, tvbuff_ return offset; } -static int dissect_predefinedBiometricType(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_PredefinedBiometricType(FALSE, tvb, offset, actx, tree, hf_pkixqualified_predefinedBiometricType); -} @@ -166,12 +154,6 @@ dissect_pkixqualified_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb return offset; } -static int dissect_biometricDataOid(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_OBJECT_IDENTIFIER(FALSE, tvb, offset, actx, tree, hf_pkixqualified_biometricDataOid); -} -static int dissect_semanticsIdentifier(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_OBJECT_IDENTIFIER(FALSE, tvb, offset, actx, tree, hf_pkixqualified_semanticsIdentifier); -} static const value_string pkixqualified_TypeOfBiometricData_vals[] = { @@ -180,23 +162,20 @@ static const value_string pkixqualified_TypeOfBiometricData_vals[] = { { 0, NULL } }; -static const ber_old_choice_t TypeOfBiometricData_choice[] = { - { 0, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_predefinedBiometricType }, - { 1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_biometricDataOid }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t TypeOfBiometricData_choice[] = { + { 0, &hf_pkixqualified_predefinedBiometricType, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixqualified_PredefinedBiometricType }, + { 1, &hf_pkixqualified_biometricDataOid, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixqualified_OBJECT_IDENTIFIER }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_pkixqualified_TypeOfBiometricData(gboolean 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_old_choice(actx, tree, tvb, offset, - TypeOfBiometricData_choice, hf_index, ett_pkixqualified_TypeOfBiometricData, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + TypeOfBiometricData_choice, hf_index, ett_pkixqualified_TypeOfBiometricData, + NULL); return offset; } -static int dissect_typeOfBiometricData(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_TypeOfBiometricData(FALSE, tvb, offset, actx, tree, hf_pkixqualified_typeOfBiometricData); -} @@ -207,9 +186,6 @@ dissect_pkixqualified_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, return offset; } -static int dissect_biometricDataHash(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_pkixqualified_biometricDataHash); -} @@ -221,39 +197,33 @@ dissect_pkixqualified_IA5String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in return offset; } -static int dissect_sourceDataUri(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_IA5String(FALSE, tvb, offset, actx, tree, hf_pkixqualified_sourceDataUri); -} -static const ber_old_sequence_t BiometricData_sequence[] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_typeOfBiometricData }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_hashAlgorithm }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_biometricDataHash }, - { BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_sourceDataUri }, - { 0, 0, 0, NULL } +static const ber_sequence_t BiometricData_sequence[] = { + { &hf_pkixqualified_typeOfBiometricData, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pkixqualified_TypeOfBiometricData }, + { &hf_pkixqualified_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier }, + { &hf_pkixqualified_biometricDataHash, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixqualified_OCTET_STRING }, + { &hf_pkixqualified_sourceDataUri, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixqualified_IA5String }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixqualified_BiometricData(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - BiometricData_sequence, hf_index, ett_pkixqualified_BiometricData); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + BiometricData_sequence, hf_index, ett_pkixqualified_BiometricData); return offset; } -static int dissect_BiometricSyntax_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_BiometricData(FALSE, tvb, offset, actx, tree, hf_pkixqualified_BiometricSyntax_item); -} -static const ber_old_sequence_t BiometricSyntax_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_BiometricSyntax_item }, +static const ber_sequence_t BiometricSyntax_sequence_of[1] = { + { &hf_pkixqualified_BiometricSyntax_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixqualified_BiometricData }, }; static int dissect_pkixqualified_BiometricSyntax(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - BiometricSyntax_sequence_of, hf_index, ett_pkixqualified_BiometricSyntax); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + BiometricSyntax_sequence_of, hf_index, ett_pkixqualified_BiometricSyntax); return offset; } @@ -266,9 +236,6 @@ dissect_pkixqualified_T_statementId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ return offset; } -static int dissect_statementId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_T_statementId(FALSE, tvb, offset, actx, tree, hf_pkixqualified_statementId); -} @@ -281,68 +248,59 @@ dissect_pkixqualified_T_statementInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _ return offset; } -static int dissect_statementInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_T_statementInfo(FALSE, tvb, offset, actx, tree, hf_pkixqualified_statementInfo); -} -static const ber_old_sequence_t QCStatement_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_statementId }, - { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_statementInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t QCStatement_sequence[] = { + { &hf_pkixqualified_statementId, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixqualified_T_statementId }, + { &hf_pkixqualified_statementInfo, BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixqualified_T_statementInfo }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixqualified_QCStatement(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - QCStatement_sequence, hf_index, ett_pkixqualified_QCStatement); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + QCStatement_sequence, hf_index, ett_pkixqualified_QCStatement); return offset; } -static int dissect_QCStatements_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_QCStatement(FALSE, tvb, offset, actx, tree, hf_pkixqualified_QCStatements_item); -} -static const ber_old_sequence_t QCStatements_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_QCStatements_item }, +static const ber_sequence_t QCStatements_sequence_of[1] = { + { &hf_pkixqualified_QCStatements_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixqualified_QCStatement }, }; static int dissect_pkixqualified_QCStatements(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - QCStatements_sequence_of, hf_index, ett_pkixqualified_QCStatements); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + QCStatements_sequence_of, hf_index, ett_pkixqualified_QCStatements); return offset; } -static const ber_old_sequence_t NameRegistrationAuthorities_sequence_of[1] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_NameRegistrationAuthorities_item }, +static const ber_sequence_t NameRegistrationAuthorities_sequence_of[1] = { + { &hf_pkixqualified_NameRegistrationAuthorities_item, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_x509ce_GeneralName }, }; static int dissect_pkixqualified_NameRegistrationAuthorities(gboolean 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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - NameRegistrationAuthorities_sequence_of, hf_index, ett_pkixqualified_NameRegistrationAuthorities); + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + NameRegistrationAuthorities_sequence_of, hf_index, ett_pkixqualified_NameRegistrationAuthorities); return offset; } -static int dissect_nameRegistrationAuthorities(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixqualified_NameRegistrationAuthorities(FALSE, tvb, offset, actx, tree, hf_pkixqualified_nameRegistrationAuthorities); -} -static const ber_old_sequence_t SemanticsInformation_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_semanticsIdentifier }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_nameRegistrationAuthorities }, - { 0, 0, 0, NULL } +static const ber_sequence_t SemanticsInformation_sequence[] = { + { &hf_pkixqualified_semanticsIdentifier, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixqualified_OBJECT_IDENTIFIER }, + { &hf_pkixqualified_nameRegistrationAuthorities, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixqualified_NameRegistrationAuthorities }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixqualified_SemanticsInformation(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - SemanticsInformation_sequence, hf_index, ett_pkixqualified_SemanticsInformation); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + SemanticsInformation_sequence, hf_index, ett_pkixqualified_SemanticsInformation); return offset; } diff --git a/epan/dissectors/packet-pkixqualified.h b/epan/dissectors/packet-pkixqualified.h index 398cbb9a63..d3b73e6c26 100644 --- a/epan/dissectors/packet-pkixqualified.h +++ b/epan/dissectors/packet-pkixqualified.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkixqualified.h */ -/* ../../tools/asn2wrs.py -b -e -p pkixqualified -c pkixqualified.cnf -s packet-pkixqualified-template PKIXqualified.asn */ +/* packet-pkixqualified.h */ +/* ../../tools/asn2wrs.py -b -X -T -p pkixqualified -c pkixqualified.cnf -s packet-pkixqualified-template PKIXqualified.asn */ /* Input file: packet-pkixqualified-template.h */ diff --git a/epan/dissectors/packet-pkixtsp.c b/epan/dissectors/packet-pkixtsp.c index 0f1d72c2d3..82e33c5e9c 100644 --- a/epan/dissectors/packet-pkixtsp.c +++ b/epan/dissectors/packet-pkixtsp.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkixtsp.c */ -/* ../../tools/asn2wrs.py -b -e -p pkixtsp -c pkixtsp.cnf -s packet-pkixtsp-template PKIXTSP.asn */ +/* packet-pkixtsp.c */ +/* ../../tools/asn2wrs.py -b -X -T -p pkixtsp -c pkixtsp.cnf -s packet-pkixtsp-template PKIXTSP.asn */ /* Input file: packet-pkixtsp-template.c */ @@ -69,7 +69,7 @@ static int hf_pkixtsp_status = -1; /* PKIStatusInfo */ static int hf_pkixtsp_timeStampToken = -1; /* TimeStampToken */ static int hf_pkixtsp_pki_status = -1; /* PKIStatus */ static int hf_pkixtsp_failInfo = -1; /* PKIFailureInfo */ -static int hf_pkixtsp_tst_version = -1; /* tst_version */ +static int hf_pkixtsp_tst_version = -1; /* Tst_version */ static int hf_pkixtsp_policy = -1; /* TSAPolicyId */ static int hf_pkixtsp_serialNumber = -1; /* INTEGER */ static int hf_pkixtsp_genTime = -1; /* GeneralizedTime */ @@ -112,18 +112,6 @@ static gint ett_pkixtsp_Accuracy = -1; /*--- Included file: packet-pkixtsp-fn.c ---*/ #line 1 "packet-pkixtsp-fn.c" -/*--- Fields for imported types ---*/ - -static int dissect_extensions_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_Extensions(TRUE, tvb, offset, actx, tree, hf_pkixtsp_extensions); -} -static int dissect_hashAlgorithm(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1explicit_AlgorithmIdentifier(FALSE, tvb, offset, actx, tree, hf_pkixtsp_hashAlgorithm); -} -static int dissect_tsa_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkix1implicit_GeneralName(TRUE, tvb, offset, actx, tree, hf_pkixtsp_tsa); -} - static const value_string pkixtsp_T_version_vals[] = { { 1, "v1" }, @@ -138,9 +126,6 @@ dissect_pkixtsp_T_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs return offset; } -static int dissect_version(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_T_version(FALSE, tvb, offset, actx, tree, hf_pkixtsp_version); -} @@ -151,27 +136,21 @@ dissect_pkixtsp_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o return offset; } -static int dissect_hashedMessage(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_OCTET_STRING(FALSE, tvb, offset, actx, tree, hf_pkixtsp_hashedMessage); -} -static const ber_old_sequence_t MessageImprint_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_hashAlgorithm }, - { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_hashedMessage }, - { 0, 0, 0, NULL } +static const ber_sequence_t MessageImprint_sequence[] = { + { &hf_pkixtsp_hashAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkix1explicit_AlgorithmIdentifier }, + { &hf_pkixtsp_hashedMessage, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_OCTET_STRING }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixtsp_MessageImprint(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - MessageImprint_sequence, hf_index, ett_pkixtsp_MessageImprint); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + MessageImprint_sequence, hf_index, ett_pkixtsp_MessageImprint); return offset; } -static int dissect_messageImprint(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_MessageImprint(FALSE, tvb, offset, actx, tree, hf_pkixtsp_messageImprint); -} @@ -181,12 +160,6 @@ dissect_pkixtsp_TSAPolicyId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of return offset; } -static int dissect_reqPolicy(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_TSAPolicyId(FALSE, tvb, offset, actx, tree, hf_pkixtsp_reqPolicy); -} -static int dissect_policy(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_TSAPolicyId(FALSE, tvb, offset, actx, tree, hf_pkixtsp_policy); -} @@ -197,15 +170,6 @@ dissect_pkixtsp_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_nonce(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkixtsp_nonce); -} -static int dissect_serialNumber(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkixtsp_serialNumber); -} -static int dissect_seconds(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_INTEGER(FALSE, tvb, offset, actx, tree, hf_pkixtsp_seconds); -} @@ -215,28 +179,22 @@ dissect_pkixtsp_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset return offset; } -static int dissect_certReq(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_BOOLEAN(FALSE, tvb, offset, actx, tree, hf_pkixtsp_certReq); -} -static int dissect_ordering(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_BOOLEAN(FALSE, tvb, offset, actx, tree, hf_pkixtsp_ordering); -} -static const ber_old_sequence_t TimeStampReq_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_version }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_messageImprint }, - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_reqPolicy }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_nonce }, - { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_certReq }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t TimeStampReq_sequence[] = { + { &hf_pkixtsp_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_T_version }, + { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint }, + { &hf_pkixtsp_reqPolicy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId }, + { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, + { &hf_pkixtsp_certReq , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN }, + { &hf_pkixtsp_extensions , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixtsp_TimeStampReq(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - TimeStampReq_sequence, hf_index, ett_pkixtsp_TimeStampReq); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TimeStampReq_sequence, hf_index, ett_pkixtsp_TimeStampReq); return offset; } @@ -260,9 +218,6 @@ dissect_pkixtsp_PKIStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs return offset; } -static int dissect_pki_status(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_PKIStatus(FALSE, tvb, offset, actx, tree, hf_pkixtsp_pki_status); -} static const asn_namedbit PKIFailureInfo_bits[] = { @@ -285,27 +240,21 @@ dissect_pkixtsp_PKIFailureInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_failInfo(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_PKIFailureInfo(FALSE, tvb, offset, actx, tree, hf_pkixtsp_failInfo); -} -static const ber_old_sequence_t PKIStatusInfo_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pki_status }, - { BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_failInfo }, - { 0, 0, 0, NULL } +static const ber_sequence_t PKIStatusInfo_sequence[] = { + { &hf_pkixtsp_pki_status , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatus }, + { &hf_pkixtsp_failInfo , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIFailureInfo }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixtsp_PKIStatusInfo(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - PKIStatusInfo_sequence, hf_index, ett_pkixtsp_PKIStatusInfo); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + PKIStatusInfo_sequence, hf_index, ett_pkixtsp_PKIStatusInfo); return offset; } -static int dissect_status(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_PKIStatusInfo(FALSE, tvb, offset, actx, tree, hf_pkixtsp_status); -} @@ -315,42 +264,36 @@ dissect_pkixtsp_TimeStampToken(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_timeStampToken(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_TimeStampToken(FALSE, tvb, offset, actx, tree, hf_pkixtsp_timeStampToken); -} -static const ber_old_sequence_t TimeStampResp_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_status }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_timeStampToken }, - { 0, 0, 0, NULL } +static const ber_sequence_t TimeStampResp_sequence[] = { + { &hf_pkixtsp_status , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_PKIStatusInfo }, + { &hf_pkixtsp_timeStampToken, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TimeStampToken }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixtsp_TimeStampResp(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - TimeStampResp_sequence, hf_index, ett_pkixtsp_TimeStampResp); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TimeStampResp_sequence, hf_index, ett_pkixtsp_TimeStampResp); return offset; } -static const value_string pkixtsp_tst_version_vals[] = { +static const value_string pkixtsp_Tst_version_vals[] = { { 1, "v1" }, { 0, NULL } }; static int -dissect_pkixtsp_tst_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +dissect_pkixtsp_Tst_version(gboolean 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_tst_version(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_tst_version(FALSE, tvb, offset, actx, tree, hf_pkixtsp_tst_version); -} @@ -360,9 +303,6 @@ dissect_pkixtsp_GeneralizedTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in return offset; } -static int dissect_genTime(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_GeneralizedTime(FALSE, tvb, offset, actx, tree, hf_pkixtsp_genTime); -} @@ -373,51 +313,42 @@ dissect_pkixtsp_INTEGER_1_999(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int return offset; } -static int dissect_millis_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_INTEGER_1_999(TRUE, tvb, offset, actx, tree, hf_pkixtsp_millis); -} -static int dissect_micros_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_INTEGER_1_999(TRUE, tvb, offset, actx, tree, hf_pkixtsp_micros); -} -static const ber_old_sequence_t Accuracy_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_seconds }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_millis_impl }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_micros_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t Accuracy_sequence[] = { + { &hf_pkixtsp_seconds , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, + { &hf_pkixtsp_millis , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 }, + { &hf_pkixtsp_micros , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkixtsp_INTEGER_1_999 }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixtsp_Accuracy(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - Accuracy_sequence, hf_index, ett_pkixtsp_Accuracy); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Accuracy_sequence, hf_index, ett_pkixtsp_Accuracy); return offset; } -static int dissect_accuracy(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_pkixtsp_Accuracy(FALSE, tvb, offset, actx, tree, hf_pkixtsp_accuracy); -} -static const ber_old_sequence_t TSTInfo_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_tst_version }, - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_policy }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_messageImprint }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_serialNumber }, - { BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_genTime }, - { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_accuracy }, - { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ordering }, - { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_nonce }, - { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tsa_impl }, - { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t TSTInfo_sequence[] = { + { &hf_pkixtsp_tst_version , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Tst_version }, + { &hf_pkixtsp_policy , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_TSAPolicyId }, + { &hf_pkixtsp_messageImprint, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_MessageImprint }, + { &hf_pkixtsp_serialNumber, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, + { &hf_pkixtsp_genTime , BER_CLASS_UNI, BER_UNI_TAG_GeneralizedTime, BER_FLAGS_NOOWNTAG, dissect_pkixtsp_GeneralizedTime }, + { &hf_pkixtsp_accuracy , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_Accuracy }, + { &hf_pkixtsp_ordering , BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_BOOLEAN }, + { &hf_pkixtsp_nonce , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pkixtsp_INTEGER }, + { &hf_pkixtsp_tsa , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1implicit_GeneralName }, + { &hf_pkixtsp_extensions , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pkix1explicit_Extensions }, + { NULL, 0, 0, 0, NULL } }; static int dissect_pkixtsp_TSTInfo(gboolean 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_old_sequence(implicit_tag, actx, tree, tvb, offset, - TSTInfo_sequence, hf_index, ett_pkixtsp_TSTInfo); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TSTInfo_sequence, hf_index, ett_pkixtsp_TSTInfo); return offset; } @@ -441,7 +372,7 @@ dissect_timestamp_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr if (check_col(pinfo->cinfo, COL_INFO)) { col_clear(pinfo->cinfo, COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "Reply"); + col_set_str(pinfo->cinfo, COL_INFO, "Reply"); } @@ -467,7 +398,7 @@ dissect_timestamp_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr if (check_col(pinfo->cinfo, COL_INFO)) { col_clear(pinfo->cinfo, COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "Query"); + col_set_str(pinfo->cinfo, COL_INFO, "Query"); } @@ -538,8 +469,8 @@ void proto_register_pkixtsp(void) { "pkixtsp.PKIFailureInfo", HFILL }}, { &hf_pkixtsp_tst_version, { "version", "pkixtsp.version", - FT_INT32, BASE_DEC, VALS(pkixtsp_tst_version_vals), 0, - "pkixtsp.tst_version", HFILL }}, + FT_INT32, BASE_DEC, VALS(pkixtsp_Tst_version_vals), 0, + "pkixtsp.Tst_version", HFILL }}, { &hf_pkixtsp_policy, { "policy", "pkixtsp.policy", FT_OID, BASE_NONE, NULL, 0, diff --git a/epan/dissectors/packet-pkixtsp.h b/epan/dissectors/packet-pkixtsp.h index 0418a1b83e..f8ae5ba24a 100644 --- a/epan/dissectors/packet-pkixtsp.h +++ b/epan/dissectors/packet-pkixtsp.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-pkixtsp.h */ -/* ../../tools/asn2wrs.py -b -e -p pkixtsp -c pkixtsp.cnf -s packet-pkixtsp-template PKIXTSP.asn */ +/* packet-pkixtsp.h */ +/* ../../tools/asn2wrs.py -b -X -T -p pkixtsp -c pkixtsp.cnf -s packet-pkixtsp-template PKIXTSP.asn */ /* Input file: packet-pkixtsp-template.h */ |