Ethereal-dev: [Ethereal-dev] Updates for WTLS
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: "Alexandre P. Ferreira" <alexandref@xxxxxxxxxxxxxxx>
Date: Thu, 15 Feb 2001 17:00:43 -0200
Hi, Some updates for WTLS using the new packet-wtls.c code. Show sizes of keys and some other informations in higher folders. Regards, -- Alexandre P. Ferreira Coordenador de Plataforma Splice IP +55 61 3137504
*** packet-wtls.c.old Wed Feb 14 17:21:43 2001
--- packet-wtls.c Thu Feb 15 14:31:42 2001
***************
*** 382,389 ****
else {
count = tvb_length (tvb)-offset_wtls;
}
! ti = proto_tree_add_item(wtls_tree, hf_wtls_record, tvb, offset_wtls,
! count, bo_little_endian);
wtls_rec_tree = proto_item_add_subtree(ti, ett_wtls_rec);
offset = offset_wtls;
--- 382,389 ----
else {
count = tvb_length (tvb)-offset_wtls;
}
! ti = proto_tree_add_uint(wtls_tree, hf_wtls_record, tvb, offset_wtls,
! count, pdut);
wtls_rec_tree = proto_item_add_subtree(ti, ett_wtls_rec);
offset = offset_wtls;
***************
*** 450,455 ****
--- 450,456 ----
int size = 0;
guint public_key = 0;
guint signature = 0;
+ char valStr[1024];
proto_item *ti;
proto_item *cli_key_item;
***************
*** 458,467 ****
proto_tree *wtls_msg_type_item_sub_tree;
proto_tree *wtls_msg_type_item_sub_sub_tree;
! ti = proto_tree_add_item(tree, hf_wtls_hands, tvb, offset,count, bo_little_endian);
wtls_msg_type_tree = proto_item_add_subtree(ti, ett_wtls_msg_type);
- pdu_msg_type = tvb_get_guint8 (tvb, offset);
ti = proto_tree_add_item (wtls_msg_type_tree, hf_wtls_hands_type,
tvb,offset,1,bo_big_endian);
offset+=1;
--- 459,468 ----
proto_tree *wtls_msg_type_item_sub_tree;
proto_tree *wtls_msg_type_item_sub_sub_tree;
! pdu_msg_type = tvb_get_guint8 (tvb, offset);
! ti = proto_tree_add_uint(tree, hf_wtls_hands, tvb, offset,count, pdu_msg_type);
wtls_msg_type_tree = proto_item_add_subtree(ti, ett_wtls_msg_type);
ti = proto_tree_add_item (wtls_msg_type_tree, hf_wtls_hands_type,
tvb,offset,1,bo_big_endian);
offset+=1;
***************
*** 537,543 ****
offset+=2;
for (;count > 0;count-=client_size) {
value = tvb_get_guint8 (tvb, offset);
! cli_key_item = proto_tree_add_uint(wtls_msg_type_item_sub_tree,
hf_wtls_hands_cli_hello_key_exchange, tvb, offset,1,
value);
client_size=1;
--- 538,544 ----
offset+=2;
for (;count > 0;count-=client_size) {
value = tvb_get_guint8 (tvb, offset);
! cli_key_item = proto_tree_add_item(wtls_msg_type_item_sub_tree,
hf_wtls_hands_cli_hello_key_exchange, tvb, offset,1,
value);
client_size=1;
***************
*** 720,730 ****
offset+=2;
client_size+=2;
value = tvb_get_guint8 (tvb, offset);
! ti = proto_tree_add_item(
wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_issuer_name,
tvb, offset,1+value,
! bo_big_endian);
offset+=1+value;
client_size+=1+value;
break;
--- 721,733 ----
offset+=2;
client_size+=2;
value = tvb_get_guint8 (tvb, offset);
! strncpy(valStr,tvb_get_ptr (tvb, offset+1, value),value);
! valStr[value]=0;
! ti = proto_tree_add_string(
wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_issuer_name,
tvb, offset,1+value,
! valStr);
offset+=1+value;
client_size+=1+value;
break;
***************
*** 768,778 ****
offset+=2;
client_size+=2;
value = tvb_get_guint8 (tvb, offset);
! ti = proto_tree_add_item(
wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_subject_name,
tvb, offset,1+value,
! bo_big_endian);
offset+=1+value;
client_size+=1+value;
break;
--- 771,783 ----
offset+=2;
client_size+=2;
value = tvb_get_guint8 (tvb, offset);
! strncpy(valStr,tvb_get_ptr (tvb, offset+1, value),value);
! valStr[value]=0;
! ti = proto_tree_add_string(
wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_subject_name,
tvb, offset,1+value,
! valStr);
offset+=1+value;
client_size+=1+value;
break;
***************
*** 807,821 ****
switch (public_key) {
case PUBLIC_KEY_RSA :
value = tvb_get_ntohs (tvb, offset);
! ti = proto_tree_add_item(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_rsa_exponent,
! tvb,offset,value+2,bo_big_endian);
offset+=2+value;
client_size+=2+value;
value = tvb_get_ntohs (tvb, offset);
! ti = proto_tree_add_item(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_rsa_modules,
! tvb,offset,value+2,bo_big_endian);
offset+=2+value;
client_size+=2+value;
break;
--- 812,826 ----
switch (public_key) {
case PUBLIC_KEY_RSA :
value = tvb_get_ntohs (tvb, offset);
! ti = proto_tree_add_uint(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_rsa_exponent,
! tvb,offset,value+2,value*8);
offset+=2+value;
client_size+=2+value;
value = tvb_get_ntohs (tvb, offset);
! ti = proto_tree_add_uint(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_rsa_modules,
! tvb,offset,value+2,value*8);
offset+=2+value;
client_size+=2+value;
break;
***************
*** 825,833 ****
break;
}
value = tvb_get_ntohs (tvb, offset);
! ti = proto_tree_add_item(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_signature,
! tvb,offset,2+value,bo_big_endian);
offset+=2+value;
client_size+=2+value;
break;
--- 830,838 ----
break;
}
value = tvb_get_ntohs (tvb, offset);
! ti = proto_tree_add_uint(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_signature,
! tvb,offset,2+value,value*8);
offset+=2+value;
client_size+=2+value;
break;
***************
*** 866,879 ****
{ &hf_wtls_record,
{ "Record",
"wsp.wtls.record",
! FT_NONE, BASE_NONE, NULL, 0x00,
"Record"
}
},
{ &hf_wtls_record_type,
{ "Record Type",
"wsp.wtls.rec_type",
! FT_UINT8, BASE_DEC, VALS ( wtls_vals_record_type ), 0x0f,
"Record Type"
}
},
--- 871,884 ----
{ &hf_wtls_record,
{ "Record",
"wsp.wtls.record",
! FT_UINT8, BASE_NONE, VALS ( wtls_vals_record_type ), 0x0f,
"Record"
}
},
{ &hf_wtls_record_type,
{ "Record Type",
"wsp.wtls.rec_type",
! FT_UINT8, BASE_NONE, VALS ( wtls_vals_record_type ), 0x0f,
"Record Type"
}
},
***************
*** 901,907 ****
{ &hf_wtls_hands,
{ "Handshake",
"wsp.wtls.handshake",
! FT_NONE, BASE_DEC, NULL, 0x00,
"Handshake"
}
},
--- 906,912 ----
{ &hf_wtls_hands,
{ "Handshake",
"wsp.wtls.handshake",
! FT_UINT8, BASE_HEX, VALS ( wtls_vals_handshake_type ), 0x00,
"Handshake"
}
},
***************
*** 1179,1188 ****
}
},
{ &hf_wtls_hands_certificate_wtls_signature,
! { "Signature",
"wsp.wtls.handshake.certificate.signature.signature",
! FT_NONE, BASE_HEX, NULL, 0x00,
! "Signature"
}
},
{ &hf_wtls_hands_certificate_wtls_issuer_type,
--- 1184,1193 ----
}
},
{ &hf_wtls_hands_certificate_wtls_signature,
! { "Signature Size",
"wsp.wtls.handshake.certificate.signature.signature",
! FT_UINT32, BASE_DEC, NULL, 0x00,
! "Signature Size"
}
},
{ &hf_wtls_hands_certificate_wtls_issuer_type,
***************
*** 1202,1208 ****
{ &hf_wtls_hands_certificate_wtls_issuer_name,
{ "Name",
"wsp.wtls.handshake.certificate.issuer.name",
! FT_NONE, BASE_HEX, NULL, 0x00,
"Name"
}
},
--- 1207,1213 ----
{ &hf_wtls_hands_certificate_wtls_issuer_name,
{ "Name",
"wsp.wtls.handshake.certificate.issuer.name",
! FT_STRING, BASE_NONE, NULL, 0x00,
"Name"
}
},
***************
*** 1237,1243 ****
{ &hf_wtls_hands_certificate_wtls_subject_name,
{ "Name",
"wsp.wtls.handshake.certificate.subject.name",
! FT_NONE, BASE_HEX, NULL, 0x00,
"Name"
}
},
--- 1242,1248 ----
{ &hf_wtls_hands_certificate_wtls_subject_name,
{ "Name",
"wsp.wtls.handshake.certificate.subject.name",
! FT_STRING, BASE_NONE, NULL, 0x00,
"Name"
}
},
***************
*** 1263,1279 ****
}
},
{ &hf_wtls_hands_certificate_wtls_rsa_exponent,
! { "RSA Exponent",
"wsp.wtls.handshake.certificate.rsa.exponent",
! FT_NONE, BASE_HEX, NULL, 0x00,
! "RSA Exponent"
}
},
{ &hf_wtls_hands_certificate_wtls_rsa_modules,
! { "RSA Modulus",
"wsp.wtls.handshake.certificate.rsa.modulus",
! FT_NONE, BASE_HEX, NULL, 0x00,
! "RSA Modulus"
}
},
{ &hf_wtls_alert,
--- 1268,1284 ----
}
},
{ &hf_wtls_hands_certificate_wtls_rsa_exponent,
! { "RSA Exponent Size",
"wsp.wtls.handshake.certificate.rsa.exponent",
! FT_UINT32, BASE_DEC, NULL, 0x00,
! "RSA Exponent Size"
}
},
{ &hf_wtls_hands_certificate_wtls_rsa_modules,
! { "RSA Modulus Size",
"wsp.wtls.handshake.certificate.rsa.modulus",
! FT_UINT32, BASE_DEC, NULL, 0x00,
! "RSA Modulus Size"
}
},
{ &hf_wtls_alert,
begin:vcard n:Peixoto Ferreira;Alexandre tel;work:+55 61 3137504 x-mozilla-html:FALSE org:Splice IP adr:;;;;;; version:2.1 email;internet:alexandref@xxxxxxxxxxxxxxx title:Coordenador de Plataforma x-mozilla-cpt:;-9472 fn:Alexandre Peixoto Ferreira end:vcard
- Follow-Ups:
- Re: [Ethereal-dev] Updates for WTLS
- From: Guy Harris
- Re: [Ethereal-dev] Updates for WTLS
- Prev by Date: Re: [Ethereal-dev] TCP reconstruction WAS:[Another Stupid Question]
- Next by Date: Re: [Ethereal-dev] TCP reconstruction WAS:[Another Stupid Question]
- Previous by thread: Re: [Ethereal-dev] Add new protocol ???
- Next by thread: Re: [Ethereal-dev] Updates for WTLS
- Index(es):





