aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ber.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2007-08-24 08:12:39 +0000
committerJörg Mayer <jmayer@loplof.de>2007-08-24 08:12:39 +0000
commit733f78043ee8419661693293cfd6066f56434236 (patch)
tree7aef7aecfe52de533e5a744b7734f0f5d7461c97 /epan/dissectors/packet-ber.c
parentb312e64f6a6cec4782e8198396e906c581a86d82 (diff)
The ber header was missing from the object, resulting in
invalid saved certificates. svn path=/trunk/; revision=22628
Diffstat (limited to 'epan/dissectors/packet-ber.c')
-rw-r--r--epan/dissectors/packet-ber.c62
1 files changed, 36 insertions, 26 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index 85190dbdb8..8025acbe59 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -1343,8 +1343,25 @@ printf("SEQUENCE dissect_ber_sequence(%s) entered\n",name);
}
}
#endif
+ hoffset = offset;
+ if(!implicit_tag) {
+ offset = get_ber_identifier(tvb, offset, NULL, NULL, NULL);
+ offset = get_ber_length(tvb, offset, &len, NULL);
+ } else {
+ /* was implicit tag so just use the length of the tvb */
+ len=tvb_length_remaining(tvb,offset);
+ end_offset=offset+len;
+ }
+ /* create subtree */
+ if(hf_id >= 0) {
+ if(parent_tree){
+ item = proto_tree_add_item(parent_tree, hf_id, tvb, hoffset, len + offset - hoffset, FALSE);
+ tree = proto_item_add_subtree(item, ett_id);
+ }
+ }
+ offset = hoffset;
+
if(!implicit_tag){
- hoffset = offset;
/* first we must read the sequence header */
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
@@ -1371,18 +1388,6 @@ printf("SEQUENCE dissect_ber_sequence(%s) entered\n",name);
}
return end_offset;
}
- } else {
- /* was implicit tag so just use the length of the tvb */
- len=tvb_length_remaining(tvb,offset);
- end_offset=offset+len;
- }
-
- /* create subtree */
- if(hf_id >= 0) {
- if(parent_tree){
- item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, len, FALSE);
- tree = proto_item_add_subtree(item, ett_id);
- }
}
/* loop over all entries until we reach the end of the sequence */
while (offset < end_offset){
@@ -1667,8 +1672,25 @@ printf("SEQUENCE dissect_ber_old_sequence(%s) entered\n",name);
}
}
#endif
+ hoffset = offset;
+ if(!implicit_tag) {
+ offset = get_ber_identifier(tvb, offset, NULL, NULL, NULL);
+ offset = get_ber_length(tvb, offset, &len, NULL);
+ } else {
+ /* was implicit tag so just use the length of the tvb */
+ len=tvb_length_remaining(tvb,offset);
+ end_offset=offset+len;
+ }
+ /* create subtree */
+ if(hf_id >= 0) {
+ if(parent_tree){
+ item = proto_tree_add_item(parent_tree, hf_id, tvb, hoffset, len + offset - hoffset, FALSE);
+ tree = proto_item_add_subtree(item, ett_id);
+ }
+ }
+ offset = hoffset;
+
if(!implicit_tag){
- hoffset = offset;
/* first we must read the sequence header */
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
@@ -1695,18 +1717,6 @@ printf("SEQUENCE dissect_ber_old_sequence(%s) entered\n",name);
}
return end_offset;
}
- } else {
- /* was implicit tag so just use the length of the tvb */
- len=tvb_length_remaining(tvb,offset);
- end_offset=offset+len;
- }
-
- /* create subtree */
- if(hf_id >= 0) {
- if(parent_tree){
- item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, len, FALSE);
- tree = proto_item_add_subtree(item, ett_id);
- }
}
/* loop over all entries until we reach the end of the sequence */
while (offset < end_offset){