aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ns_cert_exts.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2014-10-06 15:31:47 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2014-10-13 11:24:07 +0000
commit4e1b5ea866dd332294246c4800efe77431010ad8 (patch)
tree8cda568a450b29fd7bbfcbbf03d840ab9f123190 /epan/dissectors/packet-ns_cert_exts.c
parent94d35481b773e785c3aec31f81dea4300fdb5669 (diff)
ASN1: Register PDU-dissectors as NEW
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan/dissectors/packet-ns_cert_exts.c')
-rw-r--r--epan/dissectors/packet-ns_cert_exts.c64
1 files changed, 40 insertions, 24 deletions
diff --git a/epan/dissectors/packet-ns_cert_exts.c b/epan/dissectors/packet-ns_cert_exts.c
index f7c80d5843..362efdb414 100644
--- a/epan/dissectors/packet-ns_cert_exts.c
+++ b/epan/dissectors/packet-ns_cert_exts.c
@@ -182,45 +182,61 @@ dissect_ns_cert_exts_CertType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
/*--- PDUs ---*/
-static void dissect_BaseUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_BaseUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_BaseUrl(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_BaseUrl_PDU);
+ offset = dissect_ns_cert_exts_BaseUrl(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_BaseUrl_PDU);
+ return offset;
}
-static void dissect_RevocationUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_RevocationUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_RevocationUrl(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_RevocationUrl_PDU);
+ offset = dissect_ns_cert_exts_RevocationUrl(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_RevocationUrl_PDU);
+ return offset;
}
-static void dissect_CaRevocationUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_CaRevocationUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_CaRevocationUrl(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_CaRevocationUrl_PDU);
+ offset = dissect_ns_cert_exts_CaRevocationUrl(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_CaRevocationUrl_PDU);
+ return offset;
}
-static void dissect_CaPolicyUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_CaPolicyUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_CaPolicyUrl(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_CaPolicyUrl_PDU);
+ offset = dissect_ns_cert_exts_CaPolicyUrl(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_CaPolicyUrl_PDU);
+ return offset;
}
-static void dissect_Comment_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_Comment_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_Comment(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_Comment_PDU);
+ offset = dissect_ns_cert_exts_Comment(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_Comment_PDU);
+ return offset;
}
-static void dissect_SslServerName_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_SslServerName_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_SslServerName(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_SslServerName_PDU);
+ offset = dissect_ns_cert_exts_SslServerName(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_SslServerName_PDU);
+ return offset;
}
-static void dissect_CertRenewalUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_CertRenewalUrl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_CertRenewalUrl(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_CertRenewalUrl_PDU);
+ offset = dissect_ns_cert_exts_CertRenewalUrl(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_CertRenewalUrl_PDU);
+ return offset;
}
-static void dissect_CertType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_CertType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
+ int offset = 0;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_ns_cert_exts_CertType(FALSE, tvb, 0, &asn1_ctx, tree, hf_ns_cert_exts_CertType_PDU);
+ offset = dissect_ns_cert_exts_CertType(FALSE, tvb, offset, &asn1_ctx, tree, hf_ns_cert_exts_CertType_PDU);
+ return offset;
}
@@ -331,14 +347,14 @@ void proto_reg_handoff_ns_cert_exts(void) {
/*--- Included file: packet-ns_cert_exts-dis-tab.c ---*/
#line 1 "../../asn1/ns_cert_exts/packet-ns_cert_exts-dis-tab.c"
- register_ber_oid_dissector("2.16.840.1.113730.1.1", dissect_CertType_PDU, proto_ns_cert_exts, "ns_cert_exts.cert_type");
- register_ber_oid_dissector("2.16.840.1.113730.1.2", dissect_BaseUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.base_url");
- register_ber_oid_dissector("2.16.840.1.113730.1.3", dissect_RevocationUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.revocation-url");
- register_ber_oid_dissector("2.16.840.1.113730.1.4", dissect_CaRevocationUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.ca-revocation-url");
- register_ber_oid_dissector("2.16.840.1.113730.1.7", dissect_CertRenewalUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.cert-renewal-url");
- register_ber_oid_dissector("2.16.840.1.113730.1.8", dissect_CaPolicyUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.ca-policy-url");
- register_ber_oid_dissector("2.16.840.1.113730.1.12", dissect_SslServerName_PDU, proto_ns_cert_exts, "ns_cert_exts.ssl-server-name");
- register_ber_oid_dissector("2.16.840.1.113730.1.13", dissect_Comment_PDU, proto_ns_cert_exts, "ns_cert_exts.comment");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.1", dissect_CertType_PDU, proto_ns_cert_exts, "ns_cert_exts.cert_type");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.2", dissect_BaseUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.base_url");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.3", dissect_RevocationUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.revocation-url");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.4", dissect_CaRevocationUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.ca-revocation-url");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.7", dissect_CertRenewalUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.cert-renewal-url");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.8", dissect_CaPolicyUrl_PDU, proto_ns_cert_exts, "ns_cert_exts.ca-policy-url");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.12", dissect_SslServerName_PDU, proto_ns_cert_exts, "ns_cert_exts.ssl-server-name");
+ new_register_ber_oid_dissector("2.16.840.1.113730.1.13", dissect_Comment_PDU, proto_ns_cert_exts, "ns_cert_exts.comment");
/*--- End of included file: packet-ns_cert_exts-dis-tab.c ---*/